Skip to content

Commit

Permalink
Adjust CELLxGENE Census chunk in Get Started
Browse files Browse the repository at this point in the history
  • Loading branch information
lazappi committed Nov 26, 2024
1 parent 6e25d8e commit ebc1959
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions vignettes/laminr.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ knitr::opts_chunk$set(
# actually upload results to the LaminDB instance
# -> testuser1 is a test account that cannot upload results
submit_eval <- laminr:::.get_user_settings()$handle != "testuser1"
submit_eval <- FALSE
```

This vignette introduces the basic **{laminr}** workflow.
Expand Down Expand Up @@ -126,8 +127,10 @@ seurat_obj <- SeuratObject::CreateSeuratObject(
counts = as(Matrix::t(adata$X), "CsparseMatrix"),
meta.data = adata$obs
)
# add gene metadata
seurat_obj[["RNA"]] <- AddMetaData(GetAssay(seurat_obj), adata$var)
# Add gene metadata
seurat_obj[["RNA"]] <- SeuratObject::AddMetaData(
Seurat::GetAssay(seurat_obj), adata$var
)
# Set cell identities to the provided cell type annotation
SeuratObject::Idents(seurat_obj) <- "cell_type"
# Normalise the data
Expand All @@ -146,18 +149,19 @@ Seurat::DotPlot(seurat_obj, features = unique(markers$gene)) +

# Slice the tiledbsoma array store

Alternatively to querying individual datasets, you can also slice the `.tiledbsoma` array store, which stores Census, a concatenated version of most datasets in CELLxGENE.

```{r slice-tiledb}
Alternatively to accessing individual CELLxGENE datasets from LaminDB, the **{cellxgene.census}** package can be used to slice the TileDB-SOMA array store for CELLxGENE Census, a concatenated version of most datasets in CELLxGENE.

```{r cellxgene-census}
library("cellxgene.census")
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")
cell_columns <- c(
"assay", "cell_type", "tissue", "tissue_general", "suspension_type", "disease"
)
seurat_obj2 <- get_seurat(
census = census,

Check warning on line 167 in vignettes/laminr.Rmd

View workflow job for this annotation

GitHub Actions / lint

file=vignettes/laminr.Rmd,line=167,col=3,[indentation_linter] Indentation should be 2 spaces but is 3 spaces.
Expand Down

0 comments on commit ebc1959

Please sign in to comment.