diff --git a/aio.html b/aio.html index 7f04cd9..2148e88 100644 --- a/aio.html +++ b/aio.html @@ -3228,7 +3228,7 @@
The NNGraphParam
constructor has an argument
cluster.args
. This allows to specify arguments passed on to
@@ -3245,7 +3245,7 @@
TODO
Use the goana()
function from the limma
package to identify GO BP terms that are overrepresented in the list of
@@ -3289,7 +3289,7 @@
TODO
TODO
See the HDF5Array
function for reading from HDF5 and the
writeHDF5Array
function for writing to HDF5 from the HDF5Array
@@ -5369,7 +5369,7 @@
TODO
Use the function system.time
to obtain the runtime of
each job.
TODO
Use Seurat’s DimPlot
function.
Use Seurat’s DimPlot
function.
Content from Accessing data from the Human Cell Atlas (HCA)
Last updated on 2024-04-09 | +
Last updated on 2024-04-18 | Edit this page
Error in knitr::include_graphics("figures/HCA_sccomp_SUPPLEMENTARY_technical_cartoon_curatedAtlasQuery.png"): Cannot find the file(s): "figures/HCA_sccomp_SUPPLEMENTARY_technical_cartoon_curatedAtlasQuery.png"
-
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
-BiocManager::install("stemangiola/CuratedAtlasQueryR")
+BiocManager::install("CuratedAtlasQueryR")
@@ -5644,25 +5646,15 @@HCA Metadata +
-R
metadata <- get_metadata(remote_url = CuratedAtlasQueryR::SAMPLE_DATABASE_URL)
--OUTPUT -
--ℹ Downloading 1 file, totalling 0 GB
-OUTPUT -
--ℹ Downloading https://object-store.rc.nectar.org.au/v1/AUTH_06d6e008e3e642da99d806ba3ea629c5/metadata/sample_metadata.0.2.3.parquet to /home/runner/.cache/R/CuratedAtlasQueryR/metadata.0.2.3.parquet
Get a view of the first 10 columns in the metadata with
-glimpse
+R
@@ -5675,7 +5667,7 @@OUTPUT<
Rows: ?? Columns: 10 -Database: DuckDB v0.10.1 [unknown@Linux 6.5.0-1017-azure:R 4.3.3/:memory:] +Database: DuckDB v0.10.1 [unknown@Linux 6.5.0-1018-azure:R 4.3.3/:memory:] $ cell_ <chr> "TTATGCTAGGGTGTTG_12", "GCTTGAACATGG… $ sample_ <chr> "039c558ca1c43dc74c563b58fe0d6289", … $ cell_type <chr> "mature NK T cell", "mature NK T cel… @@ -5702,7 +5694,7 @@
A note on the piping operator +
R
@@ -5726,7 +5718,7 @@Summarizing the metadata
For each distinct tissue and dataset combination, count the number of datasets by tissue type.
-+R
@@ -5738,26 +5730,26 @@ROUTPUT
# Source: SQL [?? x 2] -# Database: DuckDB v0.10.1 [unknown@Linux 6.5.0-1017-azure:R 4.3.3/:memory:] +# Database: DuckDB v0.10.1 [unknown@Linux 6.5.0-1018-azure:R 4.3.3/:memory:] tissue n <chr> <dbl> 1 renal medulla 6 2 caecum 1 3 ileum 1 - 4 lymph node 2 - 5 transition zone of prostate 2 - 6 peripheral zone of prostate 2 + 4 transition zone of prostate 2 + 5 peripheral zone of prostate 2 + 6 lymph node 2 7 fovea centralis 1 8 adrenal gland 1 - 9 heart left ventricle 7 -10 bone marrow 4 + 9 blood 17 +10 kidney 8 # ℹ more rows
Columns available in the metadata
-+-R
@@ -5766,19 +5758,13 @@R
OUTPUT
--! The `names()` method of <tbl_lazy> is for internal use only. -ℹ Did you mean `colnames()`?
-OUTPUT -
[1] "src" "lazy_query"
Available assays
-+R
@@ -5790,26 +5776,26 @@ROUTPUT
# Source: SQL [?? x 2] -# Database: DuckDB v0.10.1 [unknown@Linux 6.5.0-1017-azure:R 4.3.3/:memory:] +# Database: DuckDB v0.10.1 [unknown@Linux 6.5.0-1018-azure:R 4.3.3/:memory:] assay n <chr> <dbl> - 1 10x 5' v2 2 - 2 sci-RNA-seq 1 - 3 10x 3' v1 1 - 4 Smart-seq2 1 - 5 10x 3' v3 21 - 6 Slide-seq 4 - 7 scRNA-seq 4 - 8 Seq-Well 2 - 9 10x 3' v2 27 -10 10x 5' v1 7 + 1 10x 3' v2 27 + 2 10x 5' v1 7 + 3 10x 3' v3 21 + 4 Slide-seq 4 + 5 10x 5' v2 2 + 6 sci-RNA-seq 1 + 7 10x 3' v1 1 + 8 Smart-seq2 1 + 9 scRNA-seq 4 +10 Seq-Well 2 # ℹ more rows
Available organisms
-+R
@@ -5821,7 +5807,7 @@ROUTPUT
@@ -5837,7 +5823,7 @@# Source: SQL [1 x 2] -# Database: DuckDB v0.10.1 [unknown@Linux 6.5.0-1017-azure:R 4.3.3/:memory:] +# Database: DuckDB v0.10.1 [unknown@Linux 6.5.0-1018-azure:R 4.3.3/:memory:] organism n <chr> <dbl> 1 Homo sapiens 63
Download single-cell RNA seq
Query raw counts
-+-R
@@ -5849,49 +5835,9 @@-R tissue == "lung parenchyma" & stringr::str_like(cell_type, "%CD4%") ) |> - get_single_cell_experiment()
--OUTPUT -
--ℹ Realising metadata.
--OUTPUT -
--ℹ Synchronising files
--OUTPUT -
--ℹ Downloading 2 files, totalling 0.17 GB
--OUTPUT -
--ℹ Downloading https://object-store.rc.nectar.org.au/v1/AUTH_06d6e008e3e642da99d806ba3ea629c5/cellxgene-0.2.1-hdf5/original/bc380dae8b14313a870973697842878b/assays.h5 to /home/runner/.cache/R/CuratedAtlasQueryR/0.2.1/original/bc380dae8b14313a870973697842878b/assays.h5
--OUTPUT -
--Downloading files ■■■■■■■■■■■■■■■■ 50% | ETA: 13s
--OUTPUT -
--ℹ Downloading https://object-store.rc.nectar.org.au/v1/AUTH_06d6e008e3e642da99d806ba3ea629c5/cellxgene-0.2.1-hdf5/original/bc380dae8b14313a870973697842878b/se.rds to /home/runner/.cache/R/CuratedAtlasQueryR/0.2.1/original/bc380dae8b14313a870973697842878b/se.rds
--OUTPUT -
--Downloading files ■■■■■■■■■■■■■■■■ 50% | ETA: 13sℹ Reading files. -ℹ Compiling Single Cell Experiment.
-R -
--+ get_single_cell_experiment() + +single_cell_countssingle_cell_counts
OUTPUT @@ -5915,7 +5861,7 @@
Query counts scaled per million
This is helpful if just few genes are of interest, as they can be compared across samples.
-+-R
@@ -5931,42 +5877,6 @@R
OUTPUT
--ℹ Realising metadata.
--OUTPUT -
--ℹ Synchronising files
--OUTPUT -
--ℹ Downloading 2 files, totalling 0.29 GB
--OUTPUT -
--ℹ Downloading https://object-store.rc.nectar.org.au/v1/AUTH_06d6e008e3e642da99d806ba3ea629c5/cellxgene-0.2.1-hdf5/cpm/bc380dae8b14313a870973697842878b/assays.h5 to /home/runner/.cache/R/CuratedAtlasQueryR/0.2.1/cpm/bc380dae8b14313a870973697842878b/assays.h5
--OUTPUT -
--Downloading files ■■■■■■■■■■■■■■■■ 50% | ETA: 21s
--OUTPUT -
--ℹ Downloading https://object-store.rc.nectar.org.au/v1/AUTH_06d6e008e3e642da99d806ba3ea629c5/cellxgene-0.2.1-hdf5/cpm/bc380dae8b14313a870973697842878b/se.rds to /home/runner/.cache/R/CuratedAtlasQueryR/0.2.1/cpm/bc380dae8b14313a870973697842878b/se.rds
--OUTPUT -
--Downloading files ■■■■■■■■■■■■■■■■ 50% | ETA: 21sℹ Reading files. -ℹ Compiling Single Cell Experiment.
-OUTPUT -
class: SingleCellExperiment dim: 36229 1571 metadata(0): @@ -5984,7 +5894,7 @@
OUTPUT<
Extract only a subset of genes
-+-R
@@ -5996,38 +5906,9 @@-R tissue == "lung parenchyma" & stringr::str_like(cell_type, "%CD4%") ) |> - get_single_cell_experiment(assays = "cpm", features = "PUM1")
--OUTPUT -
--ℹ Realising metadata.
--OUTPUT -
--ℹ Synchronising files
--OUTPUT -
--ℹ Downloading 0 files, totalling 0 GB
--OUTPUT -
--ℹ Reading files.
--OUTPUT -
--ℹ Compiling Single Cell Experiment.
-R -
--+ get_single_cell_experiment(assays = "cpm", features = "PUM1") + +single_cell_countssingle_cell_counts
OUTPUT @@ -6052,7 +5933,7 @@
Extracting counts as a Seurat obje
If needed, the H5
-SingleCellExperiment
can be converted into a Seurat object. Note that it may take a long time and use a lot of memory depending on how many cells you are requesting.+R
@@ -6081,7 +5962,7 @@Saving as HDF5saveHDF5SummarizedExperiment from the
HDF5Array
package. -+R
@@ -6111,9 +5992,9 @@Exercise 1
Show me the solution
-+-+R
@@ -6145,9 +6026,9 @@Exercise 2
Show me the solution
-+-+R
@@ -6179,9 +6060,9 @@Exercise 3
Show me the solution
-+-+R
@@ -6221,9 +6102,9 @@Exercise 4
Show me the solution
-++-@@ -5579,11 +5585,7 @@+@@ -5515,7 +5516,12 @@-R
@@ -6241,41 +6122,6 @@R
OUTPUT
--ℹ Realising metadata.
--OUTPUT -
--ℹ Synchronising files
--OUTPUT -
--ℹ Downloading 2 files, totalling 0 GB
--OUTPUT -
--ℹ Downloading https://object-store.rc.nectar.org.au/v1/AUTH_06d6e008e3e642da99d806ba3ea629c5/cellxgene-0.2.1-hdf5/original/893d8537e318769108b4962020ddd846/assays.h5 to /home/runner/.cache/R/CuratedAtlasQueryR/0.2.1/original/893d8537e318769108b4962020ddd846/assays.h5
--OUTPUT -
--ℹ Downloading https://object-store.rc.nectar.org.au/v1/AUTH_06d6e008e3e642da99d806ba3ea629c5/cellxgene-0.2.1-hdf5/original/893d8537e318769108b4962020ddd846/se.rds to /home/runner/.cache/R/CuratedAtlasQueryR/0.2.1/original/893d8537e318769108b4962020ddd846/se.rds
--OUTPUT -
--ℹ Reading files.
--OUTPUT -
--ℹ Compiling Single Cell Experiment.
-OUTPUT -
class: SingleCellExperiment dim: 36229 12 metadata(0): @@ -6307,15 +6153,6 @@
Key Points -
Acknowledgements -
-Thank you to Stefano -Mangiola and his team for developing CuratedAtlasQueryR -and graciously providing the content from their vignette. Make sure to -keep an eye out for their publication for proper citation. Their bioRxiv -paper can be found at https://www.biorxiv.org/content/10.1101/2023.06.08.542671v1.
Content from Accessing data from the Human Cell Atlas (HCA)
-Last updated on 2024-04-09 | +
Last updated on 2024-04-18 | Edit this page
Estimated time: 30 minutes
@@ -5505,7 +5505,8 @@Overview
Questions
-
- TODO
+- How to obtain comprehensive single-cell reference maps from the +Human Cell Atlas?
Questions
Objectives
-
- TODO
+- Learn about different resources for public single-cell RNA-seq +data.
+- Learn how to access data from the Human Cell Atlas using the +CuratedAtlasQueryR package.
+- Learn how to query for cells of interest and how to download them +into a SingleCellExperiment object.
The CuratedAtlasQueryR Project -
ERROR -
--Error in knitr::include_graphics("figures/HCA_sccomp_SUPPLEMENTARY_technical_cartoon_curatedAtlasQuery.png"): Cannot find the file(s): "figures/HCA_sccomp_SUPPLEMENTARY_technical_cartoon_curatedAtlasQuery.png"
Data Sources in R / Bioconductor @@ -5624,20 +5626,20 @@
Data Sources in R / Bioconductor
Installation
-+R
+BiocManager::install("CuratedAtlasQueryR")if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("BiocManager") -BiocManager::install("stemangiola/CuratedAtlasQueryR")
Package load
-+R
@@ -5652,25 +5654,15 @@HCA Metadata +
-R
metadata <- get_metadata(remote_url = CuratedAtlasQueryR::SAMPLE_DATABASE_URL)
--OUTPUT -
--ℹ Downloading 1 file, totalling 0 GB
-OUTPUT -
--ℹ Downloading https://object-store.rc.nectar.org.au/v1/AUTH_06d6e008e3e642da99d806ba3ea629c5/metadata/sample_metadata.0.2.3.parquet to /home/runner/.cache/R/CuratedAtlasQueryR/metadata.0.2.3.parquet
Get a view of the first 10 columns in the metadata with
-glimpse
+R
@@ -5683,7 +5675,7 @@OUTPUT<
Rows: ?? Columns: 10 -Database: DuckDB v0.10.1 [unknown@Linux 6.5.0-1017-azure:R 4.3.3/:memory:] +Database: DuckDB v0.10.1 [unknown@Linux 6.5.0-1018-azure:R 4.3.3/:memory:] $ cell_ <chr> "TTATGCTAGGGTGTTG_12", "GCTTGAACATGG… $ sample_ <chr> "039c558ca1c43dc74c563b58fe0d6289", … $ cell_type <chr> "mature NK T cell", "mature NK T cel… @@ -5710,7 +5702,7 @@
A note on the piping operator +
R
@@ -5734,7 +5726,7 @@Summarizing the metadata
For each distinct tissue and dataset combination, count the number of datasets by tissue type.
-+R
@@ -5746,26 +5738,26 @@ROUTPUT
# Source: SQL [?? x 2] -# Database: DuckDB v0.10.1 [unknown@Linux 6.5.0-1017-azure:R 4.3.3/:memory:] +# Database: DuckDB v0.10.1 [unknown@Linux 6.5.0-1018-azure:R 4.3.3/:memory:] tissue n <chr> <dbl> 1 renal medulla 6 2 caecum 1 3 ileum 1 - 4 lymph node 2 - 5 transition zone of prostate 2 - 6 peripheral zone of prostate 2 + 4 transition zone of prostate 2 + 5 peripheral zone of prostate 2 + 6 lymph node 2 7 fovea centralis 1 8 adrenal gland 1 - 9 heart left ventricle 7 -10 bone marrow 4 + 9 blood 17 +10 kidney 8 # ℹ more rows
Columns available in the metadata
-+-R
@@ -5774,19 +5766,13 @@R
OUTPUT
--! The `names()` method of <tbl_lazy> is for internal use only. -ℹ Did you mean `colnames()`?
-OUTPUT -
[1] "src" "lazy_query"
Available assays
-+R
@@ -5798,26 +5784,26 @@ROUTPUT
# Source: SQL [?? x 2] -# Database: DuckDB v0.10.1 [unknown@Linux 6.5.0-1017-azure:R 4.3.3/:memory:] +# Database: DuckDB v0.10.1 [unknown@Linux 6.5.0-1018-azure:R 4.3.3/:memory:] assay n <chr> <dbl> - 1 10x 5' v2 2 - 2 sci-RNA-seq 1 - 3 10x 3' v1 1 - 4 Smart-seq2 1 - 5 10x 3' v3 21 - 6 Slide-seq 4 - 7 scRNA-seq 4 - 8 Seq-Well 2 - 9 10x 3' v2 27 -10 10x 5' v1 7 + 1 10x 3' v2 27 + 2 10x 5' v1 7 + 3 10x 3' v3 21 + 4 Slide-seq 4 + 5 10x 5' v2 2 + 6 sci-RNA-seq 1 + 7 10x 3' v1 1 + 8 Smart-seq2 1 + 9 scRNA-seq 4 +10 Seq-Well 2 # ℹ more rows
Available organisms
-+R
@@ -5829,7 +5815,7 @@ROUTPUT
@@ -5845,7 +5831,7 @@# Source: SQL [1 x 2] -# Database: DuckDB v0.10.1 [unknown@Linux 6.5.0-1017-azure:R 4.3.3/:memory:] +# Database: DuckDB v0.10.1 [unknown@Linux 6.5.0-1018-azure:R 4.3.3/:memory:] organism n <chr> <dbl> 1 Homo sapiens 63
Download single-cell RNA seq
Query raw counts
-+-R
@@ -5857,49 +5843,9 @@-R tissue == "lung parenchyma" & stringr::str_like(cell_type, "%CD4%") ) |> - get_single_cell_experiment()
--OUTPUT -
--ℹ Realising metadata.
--OUTPUT -
--ℹ Synchronising files
--OUTPUT -
--ℹ Downloading 2 files, totalling 0.17 GB
--OUTPUT -
--ℹ Downloading https://object-store.rc.nectar.org.au/v1/AUTH_06d6e008e3e642da99d806ba3ea629c5/cellxgene-0.2.1-hdf5/original/bc380dae8b14313a870973697842878b/assays.h5 to /home/runner/.cache/R/CuratedAtlasQueryR/0.2.1/original/bc380dae8b14313a870973697842878b/assays.h5
--OUTPUT -
--Downloading files ■■■■■■■■■■■■■■■■ 50% | ETA: 13s
--OUTPUT -
--ℹ Downloading https://object-store.rc.nectar.org.au/v1/AUTH_06d6e008e3e642da99d806ba3ea629c5/cellxgene-0.2.1-hdf5/original/bc380dae8b14313a870973697842878b/se.rds to /home/runner/.cache/R/CuratedAtlasQueryR/0.2.1/original/bc380dae8b14313a870973697842878b/se.rds
--OUTPUT -
--Downloading files ■■■■■■■■■■■■■■■■ 50% | ETA: 13sℹ Reading files. -ℹ Compiling Single Cell Experiment.
-R -
--+ get_single_cell_experiment() + +single_cell_countssingle_cell_counts
OUTPUT @@ -5923,7 +5869,7 @@
Query counts scaled per million
This is helpful if just few genes are of interest, as they can be compared across samples.
-+-R
@@ -5939,42 +5885,6 @@R
OUTPUT
--ℹ Realising metadata.
--OUTPUT -
--ℹ Synchronising files
--OUTPUT -
--ℹ Downloading 2 files, totalling 0.29 GB
--OUTPUT -
--ℹ Downloading https://object-store.rc.nectar.org.au/v1/AUTH_06d6e008e3e642da99d806ba3ea629c5/cellxgene-0.2.1-hdf5/cpm/bc380dae8b14313a870973697842878b/assays.h5 to /home/runner/.cache/R/CuratedAtlasQueryR/0.2.1/cpm/bc380dae8b14313a870973697842878b/assays.h5
--OUTPUT -
--Downloading files ■■■■■■■■■■■■■■■■ 50% | ETA: 21s
--OUTPUT -
--ℹ Downloading https://object-store.rc.nectar.org.au/v1/AUTH_06d6e008e3e642da99d806ba3ea629c5/cellxgene-0.2.1-hdf5/cpm/bc380dae8b14313a870973697842878b/se.rds to /home/runner/.cache/R/CuratedAtlasQueryR/0.2.1/cpm/bc380dae8b14313a870973697842878b/se.rds
--OUTPUT -
--Downloading files ■■■■■■■■■■■■■■■■ 50% | ETA: 21sℹ Reading files. -ℹ Compiling Single Cell Experiment.
-OUTPUT -
class: SingleCellExperiment dim: 36229 1571 metadata(0): @@ -5992,7 +5902,7 @@
OUTPUT<
Extract only a subset of genes
-+-R
@@ -6004,38 +5914,9 @@-R tissue == "lung parenchyma" & stringr::str_like(cell_type, "%CD4%") ) |> - get_single_cell_experiment(assays = "cpm", features = "PUM1")
--OUTPUT -
--ℹ Realising metadata.
--OUTPUT -
--ℹ Synchronising files
--OUTPUT -
--ℹ Downloading 0 files, totalling 0 GB
--OUTPUT -
--ℹ Reading files.
--OUTPUT -
--ℹ Compiling Single Cell Experiment.
-R -
--+ get_single_cell_experiment(assays = "cpm", features = "PUM1") + +single_cell_countssingle_cell_counts
OUTPUT @@ -6060,7 +5941,7 @@
Extracting counts as a Seurat obje
If needed, the H5
-SingleCellExperiment
can be converted into a Seurat object. Note that it may take a long time and use a lot of memory depending on how many cells you are requesting.+R
@@ -6089,7 +5970,7 @@Saving as HDF5saveHDF5SummarizedExperiment from the
HDF5Array
package. -+R
@@ -6119,9 +6000,9 @@Exercise 1
Show me the solution
-+-+R
@@ -6153,9 +6034,9 @@Exercise 2
Show me the solution
-+-+R
@@ -6187,9 +6068,9 @@Exercise 3
Show me the solution
-+-+R
@@ -6229,9 +6110,9 @@Exercise 4
Show me the solution
-+-+-R
@@ -6249,41 +6130,6 @@R
OUTPUT
--ℹ Realising metadata.
--OUTPUT -
--ℹ Synchronising files
--OUTPUT -
--ℹ Downloading 2 files, totalling 0 GB
--OUTPUT -
--ℹ Downloading https://object-store.rc.nectar.org.au/v1/AUTH_06d6e008e3e642da99d806ba3ea629c5/cellxgene-0.2.1-hdf5/original/893d8537e318769108b4962020ddd846/assays.h5 to /home/runner/.cache/R/CuratedAtlasQueryR/0.2.1/original/893d8537e318769108b4962020ddd846/assays.h5
--OUTPUT -
--ℹ Downloading https://object-store.rc.nectar.org.au/v1/AUTH_06d6e008e3e642da99d806ba3ea629c5/cellxgene-0.2.1-hdf5/original/893d8537e318769108b4962020ddd846/se.rds to /home/runner/.cache/R/CuratedAtlasQueryR/0.2.1/original/893d8537e318769108b4962020ddd846/se.rds
--OUTPUT -
--ℹ Reading files.
--OUTPUT -
--ℹ Compiling Single Cell Experiment.
-OUTPUT -
class: SingleCellExperiment dim: 36229 12 metadata(0): @@ -6315,15 +6161,6 @@
Key Points -
Acknowledgements -
-Thank you to Stefano -Mangiola and his team for developing CuratedAtlasQueryR -and graciously providing the content from their vignette. Make sure to -keep an eye out for their publication for proper citation. Their bioRxiv -paper can be found at https://www.biorxiv.org/content/10.1101/2023.06.08.542671v1.