Skip to content

Commit

Permalink
📝 Polish
Browse files Browse the repository at this point in the history
  • Loading branch information
falexwolf committed Nov 7, 2023
1 parent 6438202 commit 51c2eda
Showing 1 changed file with 31 additions and 23 deletions.
54 changes: 31 additions & 23 deletions docs/scrna.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"\n",
"Along the way, you'll see how to create reports, leverage data lineage, and query individual data batches stored as files.\n",
"\n",
"If you're interested in directly using the type of large curated atlas of scRNA-seq datasets that arises from the present guide, see the [CELLxGENE Census guide](docs:cellxgene-census).\n",
"If you're only interested in _using_ a large curated scRNA-seq dataset, see the [CELLxGENE Census guide](docs:cellxgene-census).\n",
"\n",
"Here, you will:\n",
"\n",
Expand Down Expand Up @@ -71,15 +71,19 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"tags": [
"hide-output"
]
},
"outputs": [],
"source": [
"import lamindb as ln\n",
"import lnschema_bionty as lb\n",
"\n",
"ln.track()\n",
"ln.settings.verbosity = \"hint\"\n",
"lb.settings.organism = \"human\""
"lb.settings.organism = \"human\"\n",
"ln.track()"
]
},
{
Expand Down Expand Up @@ -108,27 +112,19 @@
},
"outputs": [],
"source": [
"adata = ln.dev.datasets.anndata_human_immune_cells(populate_registries=True)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"adata = ln.dev.datasets.anndata_human_immune_cells(populate_registries=True)\n",
"adata"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"This `AnnData` is standardized using the [CZI single-cell-curation validator](https://github.com/chanzuckerberg/single-cell-curation) with the same public ontologies that underlie {mod}`lnschema_bionty`. Because registries are pre-populated, validation passes.\n",
"This `AnnData` object is standardized using the [CZI single-cell-curation validator](https://github.com/chanzuckerberg/single-cell-curation) with the same public ontologies that underlie {mod}`lnschema_bionty`. Because registries are pre-populated, validation passes.\n",
"\n",
"```{note}\n",
"\n",
"In the [next guide](/scrna2), we'll curate a non-standardized dataset as you might get from an external partner.\n",
"In the [next guide](/scrna2), we'll curate a non-standardized dataset.\n",
"\n",
"```"
]
Expand All @@ -137,7 +133,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The gene registry provides metadata for each of the 36k gene measured in the `AnnData`:"
"The gene registry provides metadata for each of the 36k genes measured in the `AnnData`:"
]
},
{
Expand All @@ -150,14 +146,14 @@
},
"outputs": [],
"source": [
"lb.Gene.filter().df().head()"
"lb.Gene.filter().df()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"When we create a `File` object from an `AnnData`, we automatically link its features:"
"When we create a {class}`~lamindb.File` object from an `AnnData`, we automatically link its features:"
]
},
{
Expand All @@ -184,7 +180,11 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"tags": [
"hide-output"
]
},
"outputs": [],
"source": [
"file.save()"
Expand All @@ -200,7 +200,11 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"tags": [
"hide-output"
]
},
"outputs": [],
"source": [
"file.features"
Expand All @@ -210,7 +214,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Let's now validate the corresponding label slots in the `AnnData` and annotate the file with labels:"
"Let's now annotate the file with labels:"
]
},
{
Expand Down Expand Up @@ -239,7 +243,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The file is now queryable by everything we linked:"
"The file is now validated & queryable by everything we linked:"
]
},
{
Expand Down Expand Up @@ -278,7 +282,11 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"tags": [
"hide-output"
]
},
"outputs": [],
"source": [
"dataset = ln.Dataset(file, name=\"My versioned scRNA-seq dataset\", version=\"1\")\n",
Expand Down

0 comments on commit 51c2eda

Please sign in to comment.