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

Update R docs and doc-site #684

Merged
merged 16 commits into from
Aug 4, 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
2 changes: 1 addition & 1 deletion api/r/cellxgene.census/DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: cellxgene.census
Title: CZ CELLxGENE Discover Cell Census
Version: 0.0.0.9000
Version: 0.0.9.9
Authors@R:
person("Chan Zuckerberg Initiative", email = "soma@chanzuckerberg.com",
role = c("aut", "cre", "cph", "fnd"))
Expand Down
87 changes: 69 additions & 18 deletions api/r/cellxgene.census/README.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,90 @@

# CZ CELLxGENE Discover Census
# R package of CZ CELLxGENE Discover Census

<!-- badges: start -->
<!-- badges: end -->

This is the documentation for the R package `cellxgene.census` which is part of CZ CELLxGENE Discover Census. For full details on Census data and capabilities please go to the [main Census site](https://chanzuckerberg.github.io/cellxgene-census/).

The `cellxgene.census` package provides an API to facilitate the use of the CZ CELLxGENE Discover Census. For more information about the API and the project visit the [chanzuckerberg/cellxgene-census GitHub repo](https://github.com/chanzuckerberg/cellxgene-census/).
`cellxgene.census` provides an API to efficiently access the cloud-hosted Census single-cell data from R. In just a few seconds users can access any slice of Census data using cell or gene filters across hundreds of single-cell datasets.

**Status**: Pre-release, under rapid development. Expect API changes.

Also see the [Python API](https://cellxgene-census.readthedocs.io/).
Census data can be fetched in an iterative fashion for bigger-than-memory slices of data, or quickly exported to basic R structures, as well as `Seurat` or `SingleCellExperiment` objects for downstream analysis.

## Installation

You can install the development version of `cellxgene.census` from [GitHub](https://github.com/) with:
From an R session, first install `tiledb` from R-Universe, the latest release in CRAN is not yet available.
pablo-gar marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is repeated in online docs, checking that you definitely want to repeat it here rather than linking out? It's not unreasonable, as is.


If installing from Ubuntu, you may need to install the following libraries via `apt install`: `libxml2-dev` `libssl-dev` `libcurl4-openssl-dev`.

If installing from MacOS, you will need to install the [developer tools `Xcode`](https://apps.apple.com/us/app/xcode/id497799835?mt=12).

``` r
# install.packages("devtools")
devtools::install_github("chanzuckerberg/cellxgene-census/api/r/cellxgene.census")
print(cellxgene.census::open_soma())
```r
install.packages(
"tiledb",
version = "0.20.3",
repos=c('https://tiledb-inc.r-universe.dev','https://cloud.r-project.org')
)
```

(minimal apt dependencies: r-base cmake git)
Then install `cellxgene.census` from R-Universe.

```r
install.packages(
"cellxgene.census",
repos=c('https://chanzuckerberg.r-universe.dev', 'https://cloud.r-project.org')
)
```

## Usage

Check out the vignettes in the "Articles" section of the navigation bar on this site. We highly recommend the following vignettes as a starting point:

* [Querying and fetching the single-cell data and cell/gene metadata](./articles/census_query_extract.html)
* [Learning about the CZ CELLxGENE Discover Census](./articles/comp_bio_census_info.html)

You can also check out out the [quick start guide](https://chanzuckerberg.github.io/cellxgene-census/cellxgene_census_docsite_quick_start.html) in the main Census site.


### Example `Seurat` and `SingleCellExperiment` query

The following creates a `Seurat` object on-demand with all sympathetic neurons in Census and filtering only for the genes `ENSG00000161798`, `ENSG00000188229`.

```r
library("cellxgene.census")
library("Seurat")

census <- open_soma()

organism <- "Homo sapiens"
gene_filter <- "feature_id %in% c('ENSG00000107317', 'ENSG00000106034')"
cell_filter <- "cell_type == 'sympathetic neuron'"
cell_columns <- c("assay", "cell_type", "tissue", "tissue_general", "suspension_type", "disease")

seurat_obj <- get_seurat(
census = census,
organism = organism,
var_value_filter = gene_filter,
obs_value_filter = cell_filter,
obs_column_names = cell_columns
)
```

## Example
And the following retrieves the same data as a `SingleCellExperiment` object.

This is a basic example which shows you how to solve a common problem:
```r
library("SingleCellExperiment")

``` r
library(cellxgene.census)
## basic example code
sce_obj <- get_single_cell_experiment(
census = census,
organism = organism,
var_value_filter = gene_filter,
obs_value_filter = cell_filter,
obs_column_names = cell_columns
)
```

## For More Help

For more help, please file a issue on the repo, or contact us at <soma@chanzuckerberg.com>
For more help, please go visit the [main Census site](https://chanzuckerberg.github.io/cellxgene-census/).

If you believe you have found a security issue, we would appreciate notification. Please send email to <security@chanzuckerberg.com>.
If you believe you have found a security issue, we would appreciate notification. Please send an email to <security@chanzuckerberg.com>.
2 changes: 1 addition & 1 deletion api/r/cellxgene.census/docs/404.html

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

2 changes: 1 addition & 1 deletion api/r/cellxgene.census/docs/LICENSE-text.html

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

2 changes: 1 addition & 1 deletion api/r/cellxgene.census/docs/LICENSE.html

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.

4 changes: 2 additions & 2 deletions api/r/cellxgene.census/docs/articles/census_datasets.html

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

22 changes: 11 additions & 11 deletions api/r/cellxgene.census/docs/articles/comp_bio_data_integration.html

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.

2 changes: 1 addition & 1 deletion api/r/cellxgene.census/docs/articles/index.html

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

6 changes: 3 additions & 3 deletions api/r/cellxgene.census/docs/authors.html

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

Loading
Loading