Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[r] rename CellCensus to cellxgene.census #344

Merged
merged 2 commits into from
Apr 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/r-check.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: R CellCensus package checks
name: R cellxgene.census package checks

on:
pull_request:
Expand All @@ -18,16 +18,16 @@ jobs:
extra-repositories: https://tiledb-inc.r-universe.dev
- uses: r-lib/actions/setup-r-dependencies@v2
with:
working-directory: ./api/r/CellCensus
working-directory: ./api/r/cellxgene.census
extra-packages: any::rcmdcheck, any::styler
needs: check
# Disable dependency caching so long as we depend on bleeding-edge
# builds of tiledbsoma from r-universe. Its DESCRIPTION version
# number isn't routinely updated to invalidate our cache.
cache: false
- name: styler
run: Rscript -e 'library("styler"); style_pkg("api/r/CellCensus", dry="fail")'
run: Rscript -e 'library("styler"); style_pkg("api/r/cellxgene.census", dry="fail")'
- uses: r-lib/actions/check-r-package@v2
with:
working-directory: ./api/r/CellCensus
working-directory: ./api/r/cellxgene.census
args: 'c("--no-manual", "--as-cran")'
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
^CellCensus\.Rproj$
^cellxgene.census\.Rproj$
^\.Rproj\.user$
^LICENSE\.md$
^_pkgdown\.yml$
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
Package: CellCensus
Package: cellxgene.census
Title: CZ CELLxGENE Discover Cell Census
Version: 0.0.0.9000
Authors@R:
person("Chan Zuckerberg Initiative", email = "[email protected]",
role = c("aut", "cre", "cph", "fnd"))
Description: API to facilitate the use of the CZ CELLxGENE Discover Cell
Census. For more information about the API and the project visit
https://github.com/chanzuckerberg/cell-census/
https://github.com/chanzuckerberg/cellxgene-census/
License: MIT + file LICENSE
URL: https://github.com/chanzuckerberg/cell-census
BugReports: https://github.com/chanzuckerberg/cell-census/issues
URL: https://github.com/chanzuckerberg/cellxgene-census
BugReports: https://github.com/chanzuckerberg/cellxgene-census/issues
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#' Read the feature dataset presence matrix.
#'
#' @param census The census object, usually returned by `CellCensus::open_soma()`.
#' @param census The census object, usually returned by `cellxgene.census::open_soma()`.
#' @param organism The organism to query, usually one of `Homo sapiens` or `Mus musculus`
#' @param measurement_name The measurement object to query. Defaults to `RNA`.
#'
Expand All @@ -18,7 +18,7 @@ get_presence_matrix <- function(census, organism, measurement_name = "RNA") {
#' Convenience wrapper around `SOMAExperimentAxisQuery`, to build and execute a
#' query, and return it as a `Seurat` object.
#'
#' @param census The census object, usually returned by `CellCensus::open_soma()`.
#' @param census The census object, usually returned by `cellxgene.census::open_soma()`.
#' @param organism The organism to query, usually one of `Homo sapiens` or `Mus musculus`
#' @param measurement_name The measurement object to query. Defaults to `RNA`.
#' @param X_name The `X` layer to query. Defaults to `raw`.
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ Also see the [Python API](https://chanzuckerberg.github.io/cellxgene-census/).

## Installation

You can install the development version of cellxgene.census from [GitHub](https://github.com/) with:
You can install the development version of `cellxgene.census` from [GitHub](https://github.com/) with:

``` r
# install.packages("devtools")
devtools::install_github("chanzuckerberg/cellxgene-census/api/r/CellCensus")
print(CellCensus::open_soma())
devtools::install_github("chanzuckerberg/cellxgene-census/api/r/cellxgene.census")
print(cellxgene.census::open_soma())
```

(minimal apt dependencies: r-base cmake git)
Expand All @@ -28,7 +28,7 @@ print(CellCensus::open_soma())
This is a basic example which shows you how to solve a common problem:

``` r
library(CellCensus)
library(cellxgene.census)
## basic example code
```

Expand Down
File renamed without changes.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
# * https://testthat.r-lib.org/reference/test_package.html#special-files

library(testthat)
library(CellCensus)
library(cellxgene.census)

test_check("CellCensus")
test_check("cellxgene.census")
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ https://github.com/chanzuckerberg/cell-census/blob/main/api/python/notebooks/api
Each Cell Census contains a top-level data frame itemizing the datasets contained therein. You can read this `SOMADataFrame` into an [Arrow Table](https://arrow.apache.org/docs/r/reference/Table.html):

```{r}
census <- CellCensus::open_soma()
census <- cellxgene.census::open_soma()
census_datasets <- census$get("census_info")$get("datasets")$read()
print(census_datasets)
```
Expand Down Expand Up @@ -80,12 +80,12 @@ dataset_seurat <- expt_query$to_seurat(c(counts = "raw"))
print(dataset_seurat)
```

You can also use the `CellCensus::get_source_h5ad_uri()` API to fetch a URI pointing to the H5AD associated with this `dataset_id`. This is the same H5AD you can download from the CELLxGENE Portal, and may contain additional data-submitter provided information which was not included in the Cell Census.
You can also use the `cellxgene.census::get_source_h5ad_uri()` API to fetch a URI pointing to the H5AD associated with this `dataset_id`. This is the same H5AD you can download from the CELLxGENE Portal, and may contain additional data-submitter provided information which was not included in the Cell Census.

The "locator" returned by this API will include a URI and additional information that may be necessary to use the URI (eg, the S3 region).

```{r}
CellCensus::get_source_h5ad_uri("0bd1a1de-3aee-40e0-b2ec-86c7a30c7149")
cellxgene.census::get_source_h5ad_uri("0bd1a1de-3aee-40e0-b2ec-86c7a30c7149")
```

The `CellCensus::download_source_h5ad()` API downloads the H5AD to a local file, which can then be used in R using [SeuratDisk's anndata converter](https://mojaveazure.github.io/seurat-disk/articles/convert-anndata.html).
The `cellxgene.census::download_source_h5ad()` API downloads the H5AD to a local file, which can then be used in R using [SeuratDisk's anndata converter](https://mojaveazure.github.io/seurat-disk/articles/convert-anndata.html).