-
Notifications
You must be signed in to change notification settings - Fork 22
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
Changes from 13 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
ac2ff6e
update docs
pablo-gar 220fb9d
Editorial changes
pablo-gar 888b0d0
Editorial changes
pablo-gar e0c9187
Add docs
pablo-gar cefc46c
Merge branch 'main' into pablo-gar/update-r-docs
pablo-gar 07dada7
Render R doc-site
pablo-gar f657dfc
Make doc site clearer
pablo-gar c109498
Update api/r/cellxgene.census/README.md
pablo-gar 5a8b79a
Update api/r/cellxgene.census/README.md
pablo-gar 1428d58
Update api/r/cellxgene.census/README.md
pablo-gar 94f3db8
Update docs/cellxgene_census_docsite_quick_start.md
pablo-gar 7ce53c4
Replace '=' with '<-'
pablo-gar b1f3051
Update install instructions
pablo-gar 39eda12
Fix installation instructions
pablo-gar a83656b
merge to main
pablo-gar 200f361
Update installation instructions, and R version
pablo-gar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,86 @@ | ||
|
||
# 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, as the latest release in CRAN is not yet available. | ||
|
||
```r | ||
install.packages( | ||
"tiledb", | ||
version = "0.20.2", | ||
repos=c('https://tiledb-inc.r-universe.dev','https://cloud.r-project.org') | ||
) | ||
``` | ||
|
||
Then install `cellxgene.census` from R-Universe. | ||
|
||
``` r | ||
# install.packages("devtools") | ||
devtools::install_github("chanzuckerberg/cellxgene-census/api/r/cellxgene.census") | ||
print(cellxgene.census::open_soma()) | ||
```r | ||
install.packages( | ||
"cellxgene.census", | ||
repos=c('https://tiledb-inc.r-universe.dev','https://cloud.r-project.org') | ||
) | ||
``` | ||
|
||
(minimal apt dependencies: r-base cmake git) | ||
## 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>. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -29,11 +29,21 @@ If installing in a Databricks notebook environment, use `%pip install`. Do not u | |||||
|
||||||
## R | ||||||
|
||||||
The R package will be soon deposited into R-Universe. In the meantime you can directly install from github using the [devtools](https://devtools.r-lib.org/) R package. | ||||||
|
||||||
From an R session: | ||||||
From an R session, first install `tiledb` from R-Universe, the latest release in CRAN is not yet available. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
```r | ||||||
install.packages("devtools") | ||||||
devtools::install_github("chanzuckerberg/cellxgene-census/api/r/cellxgene.census") | ||||||
install.packages( | ||||||
"tiledb", | ||||||
version = "0.20.2", | ||||||
repos=c('https://tiledb-inc.r-universe.dev','https://cloud.r-project.org') | ||||||
) | ||||||
``` | ||||||
|
||||||
Then install `cellxgene.census` from R-Universe. | ||||||
|
||||||
```r | ||||||
install.packages( | ||||||
"cellxgene.census", | ||||||
repos=c('https://tiledb-inc.r-universe.dev','https://cloud.r-project.org') | ||||||
) | ||||||
``` |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!