From bf4b8ecb99846d2ddbd203ee348907625f627330 Mon Sep 17 00:00:00 2001 From: rcannood Date: Fri, 1 Dec 2023 21:14:25 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20scverse/?= =?UTF-8?q?anndataR@cd0dfffc25bd20fe3e93f02bb90118615f7863c9=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- articles/design.html | 40 +++++++++++++-------------- articles/getting-started.html | 2 +- pkgdown.yml | 2 +- reference/HDF5AnnData.html | 9 +++++- reference/SingleCellExperiment.html | 1 + reference/to_HDF5AnnData.html | 8 +++++- reference/write_h5ad.html | 8 +++++- reference/write_h5ad_dense_array.html | 7 ++++- search.json | 2 +- 9 files changed, 52 insertions(+), 27 deletions(-) diff --git a/articles/design.html b/articles/design.html index 50eb93e..206fe18 100644 --- a/articles/design.html +++ b/articles/design.html @@ -161,37 +161,37 @@

HDF5AnnData layers - + - + obs - + - + obs_names - + - + obsm - + - + obsp - + - + @@ -203,37 +203,37 @@

HDF5AnnData var - + - + var_names - + - + varm - + - + varp - + - + X - + - + diff --git a/articles/getting-started.html b/articles/getting-started.html index d580a4f..129a87d 100644 --- a/articles/getting-started.html +++ b/articles/getting-started.html @@ -230,7 +230,7 @@

Session info#> [4] bslib_0.6.1 rhdf5_2.44.0 lattice_0.21-9 #> [7] rhdf5filters_1.12.1 vctrs_0.6.4 tools_4.3.2 #> [10] bitops_1.0-7 generics_0.1.3 parallel_4.3.2 -#> [13] Matrix_1.6-3 desc_1.4.2 lifecycle_1.0.4 +#> [13] Matrix_1.6-4 desc_1.4.2 lifecycle_1.0.4 #> [16] GenomeInfoDbData_1.2.10 compiler_4.3.2 stringr_1.5.1 #> [19] textshaping_0.3.7 codetools_0.2-19 htmltools_0.5.7 #> [22] sass_0.4.7 RCurl_1.98-1.13 yaml_2.3.7 diff --git a/pkgdown.yml b/pkgdown.yml index 8642454..7ffe9e0 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -4,7 +4,7 @@ pkgdown_sha: ~ articles: design: design.html getting-started: getting-started.html -last_built: 2023-11-30T15:52Z +last_built: 2023-12-01T21:13Z urls: reference: https://scverse.org/anndataR/reference article: https://scverse.org/anndataR/articles diff --git a/reference/HDF5AnnData.html b/reference/HDF5AnnData.html index 6d1d18f..05924c1 100644 --- a/reference/HDF5AnnData.html +++ b/reference/HDF5AnnData.html @@ -149,7 +149,8 @@

Usage

obsm = NULL, varm = NULL, obsp = NULL, - varp = NULL + varp = NULL, + compression = c("none", "gzip", "lzf") )

@@ -221,6 +222,12 @@

Arguments, "gzip" or "lzf". Defaults to +"none".

+ +

diff --git a/reference/SingleCellExperiment.html b/reference/SingleCellExperiment.html index 5ed987c..1c3afc5 100644 --- a/reference/SingleCellExperiment.html +++ b/reference/SingleCellExperiment.html @@ -128,6 +128,7 @@

Examples ## construct a SingleCellExperiment from an AnnData object sce <- to_SingleCellExperiment(ad) +#> Warning: replacing previous import ‘S4Arrays::makeNindexFromArrayViewport’ by ‘DelayedArray::makeNindexFromArrayViewport’ when loading ‘SummarizedExperiment’ sce #> class: SingleCellExperiment #> dim: 5 3 diff --git a/reference/to_HDF5AnnData.html b/reference/to_HDF5AnnData.html index 247320a..7ba1dc0 100644 --- a/reference/to_HDF5AnnData.html +++ b/reference/to_HDF5AnnData.html @@ -61,7 +61,7 @@

Usage

-
to_HDF5AnnData(adata, file)
+
to_HDF5AnnData(adata, file, compression = c("none", "gzip", "lzf"))
@@ -73,6 +73,12 @@

Arguments, "gzip" or "lzf". Defaults to +"none".

+

Value

diff --git a/reference/write_h5ad.html b/reference/write_h5ad.html index a2c21c4..7dc6ff5 100644 --- a/reference/write_h5ad.html +++ b/reference/write_h5ad.html @@ -58,7 +58,7 @@

Usage

-
write_h5ad(object, path)
+
write_h5ad(object, path, compression = c("none", "gzip", "lzf"))
@@ -71,6 +71,12 @@

Arguments, "gzip" or "lzf". Defaults to +"none".

+

Value

diff --git a/reference/write_h5ad_dense_array.html b/reference/write_h5ad_dense_array.html index 02ab839..2532d8b 100644 --- a/reference/write_h5ad_dense_array.html +++ b/reference/write_h5ad_dense_array.html @@ -58,7 +58,7 @@

Usage

-
write_h5ad_dense_array(value, file, name, version = "0.2.0")
+
write_h5ad_dense_array(value, file, name, compression, version = "0.2.0")
@@ -75,6 +75,11 @@

Arguments, "gzip" or "lzf". Defaults to "none".

+ +
version

Encoding version of the element to write

diff --git a/search.json b/search.json index a573608..b077b97 100644 --- a/search.json +++ b/search.json @@ -1 +1 @@ -[{"path":"https://scverse.org/anndataR/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"MIT License","title":"MIT License","text":"Copyright (c) 2023 Robrecht Cannoodt, Luke Zappia, Martin Morgan, Louise Deconinck Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":"https://scverse.org/anndataR/articles/design.html","id":"desired-feature-list","dir":"Articles","previous_headings":"","what":"Desired feature list","title":"Design","text":"Provide R6 class work AnnData objects R (either -memory -disk). Read/write *.h5ad files natively Convert /SingleCellExperiment objects Convert /Seurat objects","code":""},{"path":"https://scverse.org/anndataR/articles/design.html","id":"class-diagram","dir":"Articles","previous_headings":"","what":"Class diagram","title":"Design","text":"diagram main R6 classes provided package: Notation: X: Matrix - variable X type Matrix *X: Matrix - variable X abstract to_SingleCellExperiment(): SingleCellExperiment - function to_SingleCellExperiment returns object type SingleCellExperiment *to_SingleCellExperiment() - function to_SingleCellExperiment abstract","code":""},{"path":"https://scverse.org/anndataR/articles/design.html","id":"feature-tracking","dir":"Articles","previous_headings":"","what":"Feature tracking","title":"Design","text":"following tables show status implementation feature package:","code":""},{"path":[]},{"path":[]},{"path":[]},{"path":[]},{"path":"https://scverse.org/anndataR/articles/getting-started.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Using anndataR to read and convert","text":"package allows users work .h5ad files, access various slots datasets convert files SingleCellExperiment objects SeuratObjects, vice versa. Check ?anndataR full list functions provided package.","code":""},{"path":"https://scverse.org/anndataR/articles/getting-started.html","id":"installation","dir":"Articles","previous_headings":"","what":"Installation","title":"Using anndataR to read and convert","text":"Install using:","code":"if (!require(\"BiocManager\", quietly = TRUE)) { install.packages(\"BiocManager\") } BiocManager::install(\"anndataR\")"},{"path":"https://scverse.org/anndataR/articles/getting-started.html","id":"usage","dir":"Articles","previous_headings":"","what":"Usage","title":"Using anndataR to read and convert","text":"package provides abstract interface AnnData objects. abstract interface models Python counterpart closely, stores data matrix X annotations corresponding observations (obs, obsm, obsp) variables (var, varm, varp) unstructured metadata uns. abstract interface implemented different backends. Currently, following backends implemented: InMemoryAnnData HDF5AnnData InMemoryAnnData backend allows construct AnnData object memory. HDF5AnnData backend allows read AnnData object .h5ad file.","code":""},{"path":"https://scverse.org/anndataR/articles/getting-started.html","id":"hdf5anndata-backend","dir":"Articles","previous_headings":"Usage","what":"HDF5AnnData backend","title":"Using anndataR to read and convert","text":"example read .h5ad file. contents can accessed well:","code":"library(anndataR) file <- system.file(\"extdata\", \"example.h5ad\", package = \"anndataR\") adata <- read_h5ad(file, to = \"InMemoryAnnData\") #> Warning in H5Aread(A, ...): Reading attribute data of type 'ENUM' not yet #> implemented. Values replaced by NA's. #> Warning in H5Aread(A, ...): Reading attribute data of type 'ENUM' not yet #> implemented. Values replaced by NA's. #> Warning in read_fun(file = file, name = name, version = version, ...): Unable #> to determine if categorical '/obs/leiden' is ordered, assuming it isn't X <- adata$X layers <- adata$layers obs <- adata$obs var <- adata$var"},{"path":"https://scverse.org/anndataR/articles/getting-started.html","id":"inmemoryanndata-backend","dir":"Articles","previous_headings":"Usage","what":"InMemoryAnnData backend","title":"Using anndataR to read and convert","text":"following example details construct InMemoryAnnData access contents. contents can accessed well: can convert AnnData object SingleCellExperiment object SeuratObject following way:","code":"adata <- AnnData( X = matrix(1:15, 3L, 5L), layers = list( A = matrix(5:1, 3L, 5L), B = matrix(letters[1:5], 3L, 5L) ), obs = data.frame(cell = 1:3), var = data.frame(gene = 1:5), obs_names = LETTERS[1:3], var_names = letters[1:5] ) adata #> AnnData object with n_obs × n_vars = 3 × 5 #> obs:' cell ' #> var:' gene ' #> layers:' A ', ' B ' X <- adata$X layers <- adata$layers obs <- adata$obs var <- adata$var sce <- to_SingleCellExperiment(adata) seurat <- to_Seurat(adata) #> Warning in matrix(data = as.numeric(x = x), ncol = nc): NAs introduced by #> coercion"},{"path":"https://scverse.org/anndataR/articles/getting-started.html","id":"session-info","dir":"Articles","previous_headings":"","what":"Session info","title":"Using anndataR to read and convert","text":"","code":"sessionInfo() #> R version 4.3.2 (2023-10-31) #> Platform: x86_64-pc-linux-gnu (64-bit) #> Running under: Ubuntu 22.04.3 LTS #> #> Matrix products: default #> BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 #> LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0 #> #> locale: #> [1] LC_CTYPE=C.UTF-8 LC_NUMERIC=C LC_TIME=C.UTF-8 #> [4] LC_COLLATE=C.UTF-8 LC_MONETARY=C.UTF-8 LC_MESSAGES=C.UTF-8 #> [7] LC_PAPER=C.UTF-8 LC_NAME=C LC_ADDRESS=C #> [10] LC_TELEPHONE=C LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C #> #> time zone: UTC #> tzcode source: system (glibc) #> #> attached base packages: #> [1] stats4 stats graphics grDevices utils datasets methods #> [8] base #> #> other attached packages: #> [1] anndataR_0.0.0.9000 SingleCellExperiment_1.22.0 #> [3] SummarizedExperiment_1.30.2 Biobase_2.60.0 #> [5] GenomicRanges_1.52.1 GenomeInfoDb_1.36.4 #> [7] IRanges_2.34.1 S4Vectors_0.38.2 #> [9] BiocGenerics_0.46.0 MatrixGenerics_1.12.3 #> [11] matrixStats_1.1.0 SeuratObject_5.0.1 #> [13] sp_2.1-2 BiocStyle_2.28.1 #> #> loaded via a namespace (and not attached): #> [1] dotCall64_1.1-1 spam_2.10-0 xfun_0.41 #> [4] bslib_0.6.1 rhdf5_2.44.0 lattice_0.21-9 #> [7] rhdf5filters_1.12.1 vctrs_0.6.4 tools_4.3.2 #> [10] bitops_1.0-7 generics_0.1.3 parallel_4.3.2 #> [13] Matrix_1.6-3 desc_1.4.2 lifecycle_1.0.4 #> [16] GenomeInfoDbData_1.2.10 compiler_4.3.2 stringr_1.5.1 #> [19] textshaping_0.3.7 codetools_0.2-19 htmltools_0.5.7 #> [22] sass_0.4.7 RCurl_1.98-1.13 yaml_2.3.7 #> [25] pkgdown_2.0.7 crayon_1.5.2 jquerylib_0.1.4 #> [28] cachem_1.0.8 DelayedArray_0.26.7 abind_1.4-5 #> [31] parallelly_1.36.0 digest_0.6.33 stringi_1.8.2 #> [34] future_1.33.0 purrr_1.0.2 bookdown_0.36 #> [37] listenv_0.9.0 rprojroot_2.0.4 fastmap_1.1.1 #> [40] grid_4.3.2 cli_3.6.1 magrittr_2.0.3 #> [43] S4Arrays_1.0.6 future.apply_1.11.0 rmarkdown_2.25 #> [46] XVector_0.40.0 globals_0.16.2 progressr_0.14.0 #> [49] ragg_1.2.6 memoise_2.0.1 evaluate_0.23 #> [52] knitr_1.45 rlang_1.1.2 Rcpp_1.0.11 #> [55] glue_1.6.2 BiocManager_1.30.22 jsonlite_1.8.7 #> [58] Rhdf5lib_1.22.1 R6_2.5.1 systemfonts_1.0.5 #> [61] fs_1.6.3 zlibbioc_1.46.0"},{"path":"https://scverse.org/anndataR/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Robrecht Cannoodt. Author, maintainer. rcannood Luke Zappia. Author. lazappi Martin Morgan. Author. mtmorgan Louise Deconinck. Author. LouiseDck Danila Bredikhin. Contributor. gtca Isaac Virshup. Contributor. ivirshup Brian Schilder. Author. bschilder Chananchida Sang-aram. Contributor. csangara","code":""},{"path":"https://scverse.org/anndataR/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Cannoodt R, Zappia L, Morgan M, Deconinck L, Schilder B (2023). anndataR: AnnData interoperability R. R package version 0.0.0.9000, https://github.com/scverse/anndataR, https://scverse.org/anndataR.","code":"@Manual{, title = {anndataR: AnnData interoperability in R}, author = {Robrecht Cannoodt and Luke Zappia and Martin Morgan and Louise Deconinck and Brian Schilder}, year = {2023}, note = {R package version 0.0.0.9000, https://github.com/scverse/anndataR}, url = {https://scverse.org/anndataR}, }"},{"path":"https://scverse.org/anndataR/index.html","id":"anndatar","dir":"","previous_headings":"","what":"AnnData interoperability in R","title":"AnnData interoperability in R","text":"anndataR aims make AnnData format first-class citizen R ecosystem, make easy work AnnData files R, either directly converting SingleCellExperiment Seurat object. Feature list: Provide R6 class work AnnData objects R (either -memory -disk). Read/write *.h5ad files natively Convert /SingleCellExperiment objects Convert /Seurat objects","code":""},{"path":"https://scverse.org/anndataR/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"AnnData interoperability in R","text":"can install development version anndataR like : might need install suggested dependencies manually, depending task want perform. read/write *.h5ad files, need install rhdf5:BiocManager::install(\"rhdf5\") convert /SingleCellExperiment objects, need install SingleCellExperiment:BiocManager::install(\"SingleCellExperiment\") convert /Seurat objects, need install SeuratObject:install.packages(\"SeuratObject\") can also install suggested dependencies (though note might take run):","code":"devtools::install_github(\"scverse/anndataR\") devtools::install_github(\"scverse/anndataR\", dependencies = TRUE)"},{"path":"https://scverse.org/anndataR/index.html","id":"example","dir":"","previous_headings":"","what":"Example","title":"AnnData interoperability in R","text":"’s quick example use anndataR. First, download h5ad file. Read h5ad file: View structure: Access AnnData slots:","code":"library(anndataR) h5ad_path <- system.file(\"extdata\", \"example.h5ad\", package = \"anndataR\") adata <- read_h5ad(h5ad_path, to = \"InMemoryAnnData\") adata #> class: InMemoryAnnData #> dim: 50 obs x 100 var #> X: dgRMatrix #> layers: counts csc_counts dense_X dense_counts #> obs: Float FloatNA Int IntNA Bool BoolNA n_genes_by_counts #> log1p_n_genes_by_counts total_counts log1p_total_counts leiden #> var: String n_cells_by_counts mean_counts log1p_mean_counts #> pct_dropout_by_counts total_counts log1p_total_counts highly_variable #> means dispersions dispersions_norm dim(adata$X) #> [1] 50 100 adata$obs[1:5, 1:6] #> Float FloatNA Int IntNA Bool BoolNA #> 1 42.42 NaN 0 NA FALSE FALSE #> 2 42.42 42.42 1 42 TRUE NA #> 3 42.42 42.42 2 42 TRUE TRUE #> 4 42.42 42.42 3 42 TRUE TRUE #> 5 42.42 42.42 4 42 TRUE TRUE adata$var[1:5, 1:6] #> String n_cells_by_counts mean_counts log1p_mean_counts pct_dropout_by_counts #> 1 String0 44 1.94 1.078410 12 #> 2 String1 42 2.04 1.111858 16 #> 3 String2 43 2.12 1.137833 14 #> 4 String3 41 1.72 1.000632 18 #> 5 String4 42 2.06 1.118415 16 #> total_counts #> 1 97 #> 2 102 #> 3 106 #> 4 86 #> 5 103"},{"path":"https://scverse.org/anndataR/index.html","id":"interoperability","dir":"","previous_headings":"","what":"Interoperability","title":"AnnData interoperability in R","text":"Convert AnnData object SingleCellExperiment object: Convert AnnData object Seurat object:","code":"sce <- adata$to_SingleCellExperiment() sce #> class: SingleCellExperiment #> dim: 100 50 #> metadata(0): #> assays(5): X counts csc_counts dense_X dense_counts #> rownames(100): Gene000 Gene001 ... Gene098 Gene099 #> rowData names(11): String n_cells_by_counts ... dispersions #> dispersions_norm #> colnames(50): Cell000 Cell001 ... Cell048 Cell049 #> colData names(11): Float FloatNA ... log1p_total_counts leiden #> reducedDimNames(0): #> mainExpName: NULL #> altExpNames(0): obj <- adata$to_Seurat() #> Warning: Keys should be one or more alphanumeric characters followed by an #> underscore, setting key from rna to rna_ #> Warning: Keys should be one or more alphanumeric characters followed by an #> underscore, setting key from csc_counts_ to csccounts_ #> Warning: Keys should be one or more alphanumeric characters followed by an #> underscore, setting key from dense_x_ to densex_ #> Warning: Keys should be one or more alphanumeric characters followed by an #> underscore, setting key from dense_counts_ to densecounts_ obj #> An object of class Seurat #> 500 features across 50 samples within 5 assays #> Active assay: RNA (100 features, 0 variable features) #> 4 other assays present: counts, csc_counts, dense_X, dense_counts"},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":null,"dir":"Reference","previous_headings":"","what":"AbstractAnnData — AbstractAnnData","title":"AbstractAnnData — AbstractAnnData","text":"Abstract R6 class representing AnnData object. Defines interface.","code":""},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"AbstractAnnData — AbstractAnnData","text":"X NULL observation x variable matrix (without dimnames) consistent number rows obs var. layers layers slot. Must NULL named list elements dimensions consistent obs var. obs data.frame columns containing information observations. number rows obs defines observation dimension AnnData object. var data.frame columns containing information variables. number rows var defines variable dimension AnnData object. obs_names Either NULL vector unique identifiers used identify row obs act index observation dimension AnnData object. compatibility R representations, obs_names character vector. var_names Either NULL vector unique identifiers used identify row var act index variable dimension AnnData object. compatibility R representations, var_names character vector. obsm obsm slot. Must NULL named list elements number rows obs. varm varm slot. Must NULL named list elements number rows var. obsp obsp slot. Must NULL named list elements number rows columns obs. varp varp slot. Must NULL named list elements number rows columns var.","code":""},{"path":[]},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"AbstractAnnData — AbstractAnnData","text":"AbstractAnnData$print() AbstractAnnData$shape() AbstractAnnData$n_obs() AbstractAnnData$n_vars() AbstractAnnData$obs_keys() AbstractAnnData$var_keys() AbstractAnnData$layers_keys() AbstractAnnData$obsm_keys() AbstractAnnData$varm_keys() AbstractAnnData$obsp_keys() AbstractAnnData$varp_keys() AbstractAnnData$to_SingleCellExperiment() AbstractAnnData$to_Seurat() AbstractAnnData$to_InMemoryAnnData() AbstractAnnData$to_HDF5AnnData() AbstractAnnData$clone()","code":""},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"method-print-","dir":"Reference","previous_headings":"","what":"Method print()","title":"AbstractAnnData — AbstractAnnData","text":"Print summary AnnData object. print() methods implemented computationally expensive.","code":""},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"AbstractAnnData — AbstractAnnData","text":"","code":"AbstractAnnData$print(...)"},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"AbstractAnnData — AbstractAnnData","text":"... Optional arguments print method.","code":""},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"method-shape-","dir":"Reference","previous_headings":"","what":"Method shape()","title":"AbstractAnnData — AbstractAnnData","text":"Dimensions (observations x variables) AnnData object.","code":""},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"AbstractAnnData — AbstractAnnData","text":"","code":"AbstractAnnData$shape()"},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"method-n-obs-","dir":"Reference","previous_headings":"","what":"Method n_obs()","title":"AbstractAnnData — AbstractAnnData","text":"Number observations AnnData object.","code":""},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"AbstractAnnData — AbstractAnnData","text":"","code":"AbstractAnnData$n_obs()"},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"method-n-vars-","dir":"Reference","previous_headings":"","what":"Method n_vars()","title":"AbstractAnnData — AbstractAnnData","text":"Number variables AnnData object.","code":""},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"AbstractAnnData — AbstractAnnData","text":"","code":"AbstractAnnData$n_vars()"},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"method-obs-keys-","dir":"Reference","previous_headings":"","what":"Method obs_keys()","title":"AbstractAnnData — AbstractAnnData","text":"Keys ('column names') obs.","code":""},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"usage-4","dir":"Reference","previous_headings":"","what":"Usage","title":"AbstractAnnData — AbstractAnnData","text":"","code":"AbstractAnnData$obs_keys()"},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"method-var-keys-","dir":"Reference","previous_headings":"","what":"Method var_keys()","title":"AbstractAnnData — AbstractAnnData","text":"Keys ('column names') var.","code":""},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"usage-5","dir":"Reference","previous_headings":"","what":"Usage","title":"AbstractAnnData — AbstractAnnData","text":"","code":"AbstractAnnData$var_keys()"},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"method-layers-keys-","dir":"Reference","previous_headings":"","what":"Method layers_keys()","title":"AbstractAnnData — AbstractAnnData","text":"Keys (element names) layers.","code":""},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"usage-6","dir":"Reference","previous_headings":"","what":"Usage","title":"AbstractAnnData — AbstractAnnData","text":"","code":"AbstractAnnData$layers_keys()"},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"method-obsm-keys-","dir":"Reference","previous_headings":"","what":"Method obsm_keys()","title":"AbstractAnnData — AbstractAnnData","text":"Keys (element names) obsm.","code":""},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"usage-7","dir":"Reference","previous_headings":"","what":"Usage","title":"AbstractAnnData — AbstractAnnData","text":"","code":"AbstractAnnData$obsm_keys()"},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"method-varm-keys-","dir":"Reference","previous_headings":"","what":"Method varm_keys()","title":"AbstractAnnData — AbstractAnnData","text":"Keys (element names) varm.","code":""},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"usage-8","dir":"Reference","previous_headings":"","what":"Usage","title":"AbstractAnnData — AbstractAnnData","text":"","code":"AbstractAnnData$varm_keys()"},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"method-obsp-keys-","dir":"Reference","previous_headings":"","what":"Method obsp_keys()","title":"AbstractAnnData — AbstractAnnData","text":"Keys (element names) obsp.","code":""},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"usage-9","dir":"Reference","previous_headings":"","what":"Usage","title":"AbstractAnnData — AbstractAnnData","text":"","code":"AbstractAnnData$obsp_keys()"},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"method-varp-keys-","dir":"Reference","previous_headings":"","what":"Method varp_keys()","title":"AbstractAnnData — AbstractAnnData","text":"Keys (element names) varp.","code":""},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"usage-10","dir":"Reference","previous_headings":"","what":"Usage","title":"AbstractAnnData — AbstractAnnData","text":"","code":"AbstractAnnData$varp_keys()"},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"method-to-singlecellexperiment-","dir":"Reference","previous_headings":"","what":"Method to_SingleCellExperiment()","title":"AbstractAnnData — AbstractAnnData","text":"Convert SingleCellExperiment","code":""},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"usage-11","dir":"Reference","previous_headings":"","what":"Usage","title":"AbstractAnnData — AbstractAnnData","text":"","code":"AbstractAnnData$to_SingleCellExperiment()"},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"method-to-seurat-","dir":"Reference","previous_headings":"","what":"Method to_Seurat()","title":"AbstractAnnData — AbstractAnnData","text":"Convert Seurat","code":""},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"usage-12","dir":"Reference","previous_headings":"","what":"Usage","title":"AbstractAnnData — AbstractAnnData","text":"","code":"AbstractAnnData$to_Seurat()"},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"method-to-inmemoryanndata-","dir":"Reference","previous_headings":"","what":"Method to_InMemoryAnnData()","title":"AbstractAnnData — AbstractAnnData","text":"Convert InMemory AnnData","code":""},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"usage-13","dir":"Reference","previous_headings":"","what":"Usage","title":"AbstractAnnData — AbstractAnnData","text":"","code":"AbstractAnnData$to_InMemoryAnnData()"},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"method-to-hdf-anndata-","dir":"Reference","previous_headings":"","what":"Method to_HDF5AnnData()","title":"AbstractAnnData — AbstractAnnData","text":"Convert HDF5 Backed AnnData","code":""},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"usage-14","dir":"Reference","previous_headings":"","what":"Usage","title":"AbstractAnnData — AbstractAnnData","text":"","code":"AbstractAnnData$to_HDF5AnnData(path)"},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"AbstractAnnData — AbstractAnnData","text":"path path HDF5 file","code":""},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"AbstractAnnData — AbstractAnnData","text":"objects class cloneable method.","code":""},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"usage-15","dir":"Reference","previous_headings":"","what":"Usage","title":"AbstractAnnData — AbstractAnnData","text":"","code":"AbstractAnnData$clone(deep = FALSE)"},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"arguments-2","dir":"Reference","previous_headings":"","what":"Arguments","title":"AbstractAnnData — AbstractAnnData","text":"deep Whether make deep clone.","code":""},{"path":"https://scverse.org/anndataR/reference/AnnData.html","id":null,"dir":"Reference","previous_headings":"","what":"An in-memory AnnData object — AnnData","title":"An in-memory AnnData object — AnnData","text":"class used represent AnnData object memory. AnnData stores data matrix X together annotations observations obs (obsm, obsp), variables var (varm, varp), unstructured annotations uns. read AnnData file disk, use read_h5ad() instead.","code":""},{"path":"https://scverse.org/anndataR/reference/AnnData.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"An in-memory AnnData object — AnnData","text":"","code":"AnnData( obs_names = NULL, var_names = NULL, X = NULL, obs = NULL, var = NULL, layers = NULL, obsm = NULL, varm = NULL, obsp = NULL, varp = NULL )"},{"path":"https://scverse.org/anndataR/reference/AnnData.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"An in-memory AnnData object — AnnData","text":"obs_names vector unique identifiers used identify row obs act index observation dimension AnnData object. length obs_names defines observation dimension AnnData object. var_names vector unique identifiers used identify row var act index variable dimension AnnData object. length var_names defines variable dimension AnnData object. X Either NULL observation × variable matrix dimensions consistent obs var. obs Either NULL data.frame columns containing information observations. NULL, n_obs×0 data frame automatically generated. var Either NULL data.frame columns containing information variables. NULL, n_vars×0 data frame automatically generated. layers Either NULL named list, element observation × variable matrix dimensions consistent obs var. obsm obsm slot used store multi-dimensional annotation arrays. must either NULL named list, element matrix n_obs rows arbitrary number columns. varm varm slot used store multi-dimensional annotation arrays. must either NULL named list, element matrix n_vars rows arbitrary number columns. obsp obsp slot used store sparse multi-dimensional annotation arrays. must either NULL named list, element sparse matrix dimension length n_obs. varp varp slot used store sparse multi-dimensional annotation arrays. must either NULL named list, element sparse matrix dimension length n_vars.","code":""},{"path":"https://scverse.org/anndataR/reference/AnnData.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"An in-memory AnnData object — AnnData","text":"","code":"adata <- AnnData( obs_names = paste0(\"obs\", 1:3), var_names = paste0(\"var\", 1:4), X = matrix(1:12, nrow = 3, ncol = 4), obs = data.frame( n_counts = c(1, 2, 3), n_cells = c(1, 2, 3) ), var = data.frame( n_cells = c(1, 2, 3, 4) ) ) adata #> AnnData object with n_obs × n_vars = 3 × 4 #> obs:' n_counts ', ' n_cells ' #> var:' n_cells '"},{"path":"https://scverse.org/anndataR/reference/HDF5AnnData.html","id":null,"dir":"Reference","previous_headings":"","what":"HDF5AnnData — HDF5AnnData","title":"HDF5AnnData — HDF5AnnData","text":"Implementation memory AnnData object.","code":""},{"path":"https://scverse.org/anndataR/reference/HDF5AnnData.html","id":"super-class","dir":"Reference","previous_headings":"","what":"Super class","title":"HDF5AnnData — HDF5AnnData","text":"anndataR::AbstractAnnData -> HDF5AnnData","code":""},{"path":"https://scverse.org/anndataR/reference/HDF5AnnData.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"HDF5AnnData — HDF5AnnData","text":"X X slot layers layers slot. Must NULL named list elements dimensions consistent obs var. obsm obsm slot. Must NULL named list elements number rows obs. varm varm slot. Must NULL named list elements number rows var. obsp obsp slot. Must NULL named list elements number rows columns obs. varp varp slot. Must NULL named list elements number rows columns var. obs obs slot var var slot obs_names Names observations var_names Names variables","code":""},{"path":"https://scverse.org/anndataR/reference/HDF5AnnData.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"HDF5AnnData — HDF5AnnData","text":"anndataR::AbstractAnnData$layers_keys() anndataR::AbstractAnnData$obs_keys() anndataR::AbstractAnnData$obsm_keys() anndataR::AbstractAnnData$obsp_keys() anndataR::AbstractAnnData$print() anndataR::AbstractAnnData$shape() anndataR::AbstractAnnData$to_HDF5AnnData() anndataR::AbstractAnnData$to_InMemoryAnnData() anndataR::AbstractAnnData$to_Seurat() anndataR::AbstractAnnData$to_SingleCellExperiment() anndataR::AbstractAnnData$var_keys() anndataR::AbstractAnnData$varm_keys() anndataR::AbstractAnnData$varp_keys()","code":""},{"path":"https://scverse.org/anndataR/reference/HDF5AnnData.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"HDF5AnnData — HDF5AnnData","text":"HDF5AnnData$new() HDF5AnnData$n_obs() HDF5AnnData$n_vars() HDF5AnnData$clone()","code":""},{"path":"https://scverse.org/anndataR/reference/HDF5AnnData.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"HDF5AnnData — HDF5AnnData","text":"HDF5AnnData constructor","code":""},{"path":"https://scverse.org/anndataR/reference/HDF5AnnData.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"HDF5AnnData — HDF5AnnData","text":"","code":"HDF5AnnData$new( file, obs_names = NULL, var_names = NULL, X = NULL, obs = NULL, var = NULL, layers = NULL, obsm = NULL, varm = NULL, obsp = NULL, varp = NULL )"},{"path":"https://scverse.org/anndataR/reference/HDF5AnnData.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"HDF5AnnData — HDF5AnnData","text":"file filename (character) .h5ad file. file exist yet, obs_names var_names must provided. obs_names vector unique identifiers used identify row obs act index observation dimension AnnData object. length obs_names defines observation dimension AnnData object. var_names vector unique identifiers used identify row var act index variable dimension AnnData object. length var_names defines variable dimension AnnData object. X Either NULL observation × variable matrix dimensions consistent obs var. obs Either NULL data.frame columns containing information observations. NULL, n_obs×0 data frame automatically generated. var Either NULL data.frame columns containing information variables. NULL, n_vars×0 data frame automatically generated. layers Either NULL named list, element observation × variable matrix dimensions consistent obs var. obsm obsm slot used store multi-dimensional annotation arrays. must either NULL named list, element matrix n_obs rows arbitrary number columns. varm varm slot used store multi-dimensional annotation arrays. must either NULL named list, element matrix n_vars rows arbitrary number columns. obsp obsp slot used store sparse multi-dimensional annotation arrays. must either NULL named list, element sparse matrix dimension length n_obs. varp varp slot used store sparse multi-dimensional annotation arrays. must either NULL named list, element sparse matrix dimension length n_vars.","code":""},{"path":"https://scverse.org/anndataR/reference/HDF5AnnData.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"HDF5AnnData — HDF5AnnData","text":"constructor creates new HDF5 AnnData interface object. can either used either connect existing .h5ad file create new one. create new file obs_names var_names must specified. cases, additional slots provided set created object. cause data overwritten file already exists.","code":""},{"path":"https://scverse.org/anndataR/reference/HDF5AnnData.html","id":"method-n-obs-","dir":"Reference","previous_headings":"","what":"Method n_obs()","title":"HDF5AnnData — HDF5AnnData","text":"Number observations AnnData object","code":""},{"path":"https://scverse.org/anndataR/reference/HDF5AnnData.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"HDF5AnnData — HDF5AnnData","text":"","code":"HDF5AnnData$n_obs()"},{"path":"https://scverse.org/anndataR/reference/HDF5AnnData.html","id":"method-n-vars-","dir":"Reference","previous_headings":"","what":"Method n_vars()","title":"HDF5AnnData — HDF5AnnData","text":"Number variables AnnData object","code":""},{"path":"https://scverse.org/anndataR/reference/HDF5AnnData.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"HDF5AnnData — HDF5AnnData","text":"","code":"HDF5AnnData$n_vars()"},{"path":"https://scverse.org/anndataR/reference/HDF5AnnData.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"HDF5AnnData — HDF5AnnData","text":"objects class cloneable method.","code":""},{"path":"https://scverse.org/anndataR/reference/HDF5AnnData.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"HDF5AnnData — HDF5AnnData","text":"","code":"HDF5AnnData$clone(deep = FALSE)"},{"path":"https://scverse.org/anndataR/reference/HDF5AnnData.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"HDF5AnnData — HDF5AnnData","text":"deep Whether make deep clone.","code":""},{"path":"https://scverse.org/anndataR/reference/InMemoryAnnData.html","id":null,"dir":"Reference","previous_headings":"","what":"InMemoryAnnData — InMemoryAnnData","title":"InMemoryAnnData — InMemoryAnnData","text":"Implementation memory AnnData object.","code":""},{"path":"https://scverse.org/anndataR/reference/InMemoryAnnData.html","id":"super-class","dir":"Reference","previous_headings":"","what":"Super class","title":"InMemoryAnnData — InMemoryAnnData","text":"anndataR::AbstractAnnData -> InMemoryAnnData","code":""},{"path":"https://scverse.org/anndataR/reference/InMemoryAnnData.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"InMemoryAnnData — InMemoryAnnData","text":"X NULL observation x variable matrix (without dimnames) consistent number rows obs var. layers NULL named list elements dimensions consistent obs var. obs data.frame columns containing information observations. number rows obs defines observation dimension AnnData object. var data.frame columns containing information variables. number rows var defines variable dimension AnnData object. obs_names Either NULL vector unique identifiers used identify row obs act index observation dimension AnnData object. compatibility R representations, obs_names character vector. var_names Either NULL vector unique identifiers used identify row var act index variable dimension AnnData object. compatibility R representations, var_names character vector. obsm obsm slot. Must NULL named list elements number rows obs. varm varm slot. Must NULL named list elements number rows var. obsp obsp slot. Must NULL named list elements number rows columns obs. varp varp slot. Must NULL named list elements number rows columns var.","code":""},{"path":"https://scverse.org/anndataR/reference/InMemoryAnnData.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"InMemoryAnnData — InMemoryAnnData","text":"anndataR::AbstractAnnData$layers_keys() anndataR::AbstractAnnData$n_obs() anndataR::AbstractAnnData$n_vars() anndataR::AbstractAnnData$obs_keys() anndataR::AbstractAnnData$obsm_keys() anndataR::AbstractAnnData$obsp_keys() anndataR::AbstractAnnData$print() anndataR::AbstractAnnData$shape() anndataR::AbstractAnnData$to_HDF5AnnData() anndataR::AbstractAnnData$to_InMemoryAnnData() anndataR::AbstractAnnData$to_Seurat() anndataR::AbstractAnnData$to_SingleCellExperiment() anndataR::AbstractAnnData$var_keys() anndataR::AbstractAnnData$varm_keys() anndataR::AbstractAnnData$varp_keys()","code":""},{"path":"https://scverse.org/anndataR/reference/InMemoryAnnData.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"InMemoryAnnData — InMemoryAnnData","text":"InMemoryAnnData$new() InMemoryAnnData$clone()","code":""},{"path":"https://scverse.org/anndataR/reference/InMemoryAnnData.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"InMemoryAnnData — InMemoryAnnData","text":"Creates new instance memory AnnData object. Inherits AbstractAnnData.","code":""},{"path":"https://scverse.org/anndataR/reference/InMemoryAnnData.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"InMemoryAnnData — InMemoryAnnData","text":"","code":"InMemoryAnnData$new( obs_names, var_names, X = NULL, obs = NULL, var = NULL, layers = NULL, obsm = NULL, varm = NULL, obsp = NULL, varp = NULL )"},{"path":"https://scverse.org/anndataR/reference/InMemoryAnnData.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"InMemoryAnnData — InMemoryAnnData","text":"obs_names vector unique identifiers used identify row obs act index observation dimension AnnData object. length obs_names defines observation dimension AnnData object. var_names vector unique identifers used identify row var act index variable dimension AnnData object. length var_names defines variable dimension AnnData object. X Either NULL observation × variable matrix dimensions consistent obs var. obs Either NULL data.frame columns containing information observations. NULL, n_obs×0 data frame automatically generated. var Either NULL data.frame columns containing information variables. NULL, n_vars×0 data frame automatically generated. layers Either NULL named list, element observation × variable matrix dimensions consistent obs var. obsm obsm slot used store multi-dimensional annotation arrays. must either NULL named list, element matrix n_obs rows arbitrary number columns. varm varm slot used store multi-dimensional annotation arrays. must either NULL named list, element matrix n_vars rows arbitrary number columns. obsp obsp slot used store sparse multi-dimensional annotation arrays. must either NULL named list, element sparse matrix dimension length n_obs. varp varp slot used store sparse multi-dimensional annotation arrays. must either NULL named list, element sparse matrix dimension length n_vars.","code":""},{"path":"https://scverse.org/anndataR/reference/InMemoryAnnData.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"InMemoryAnnData — InMemoryAnnData","text":"objects class cloneable method.","code":""},{"path":"https://scverse.org/anndataR/reference/InMemoryAnnData.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"InMemoryAnnData — InMemoryAnnData","text":"","code":"InMemoryAnnData$clone(deep = FALSE)"},{"path":"https://scverse.org/anndataR/reference/InMemoryAnnData.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"InMemoryAnnData — InMemoryAnnData","text":"deep Whether make deep clone.","code":""},{"path":"https://scverse.org/anndataR/reference/InMemoryAnnData.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"InMemoryAnnData — InMemoryAnnData","text":"","code":"## complete example ad <- AnnData( X = matrix(1:15, 3L, 5L), layers = list( A = matrix(5:1, 3L, 5L), B = matrix(letters[1:5], 3L, 5L) ), obs = data.frame(cell = 1:3), var = data.frame(gene = 1:5), obs_names = LETTERS[1:3], var_names = letters[1:5] ) ad #> AnnData object with n_obs × n_vars = 3 × 5 #> obs:' cell ' #> var:' gene ' #> layers:' A ', ' B ' ## minimum example ad <- AnnData( obs_names = letters[1:10], var_names = LETTERS[1:5] ) ad #> AnnData object with n_obs × n_vars = 10 × 5"},{"path":"https://scverse.org/anndataR/reference/Seurat.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert Between AnnData and Seurat — to_Seurat","title":"Convert Between AnnData and Seurat — to_Seurat","text":"to_Seurat() converts AnnData object Seurat object. from_Seurat() converts Seurat object AnnData object. one assay can converted time.","code":""},{"path":"https://scverse.org/anndataR/reference/Seurat.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert Between AnnData and Seurat — to_Seurat","text":"","code":"to_Seurat(obj) from_Seurat( seurat_obj, output_class = c(\"InMemoryAnnData\", \"HDF5AnnData\"), assay = NULL, X = \"counts\", ... )"},{"path":"https://scverse.org/anndataR/reference/Seurat.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert Between AnnData and Seurat — to_Seurat","text":"obj AnnData object seurat_obj object inheriting Seurat. output_class Name AnnData class. Must one \"HDF5AnnData\" \"InMemoryAnnData\". assay Assay converted. NULL, DefaultAssay() used. X 'counts', 'data', 'scale.data' used X. default, 'counts' used (empty), followed 'data', 'scale.data'. remaining non-empty slots stored different layers. ... Additional arguments passed generator function.","code":""},{"path":"https://scverse.org/anndataR/reference/Seurat.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert Between AnnData and Seurat — to_Seurat","text":"","code":"ad <- AnnData( X = matrix(1:5, 3L, 5L), obs = data.frame(cell = 1:3), obs_names = letters[1:3], var = data.frame(gene = 1:5), var_names = letters[1:5] ) to_Seurat(ad) #> Loading required namespace: SeuratObject #> An object of class Seurat #> 5 features across 3 samples within 1 assay #> Active assay: RNA (5 features, 0 variable features) #> 2 layers present: counts, data"},{"path":"https://scverse.org/anndataR/reference/SingleCellExperiment.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert Between AnnData and SingleCellExperiment — to_SingleCellExperiment","title":"Convert Between AnnData and SingleCellExperiment — to_SingleCellExperiment","text":"to_SingleCellExperiment() converts AnnData object SingleCellExperiment. from_SingleCellExperiment() converts SingleCellExperiment AnnData object.","code":""},{"path":"https://scverse.org/anndataR/reference/SingleCellExperiment.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert Between AnnData and SingleCellExperiment — to_SingleCellExperiment","text":"","code":"to_SingleCellExperiment(object) from_SingleCellExperiment( sce, output_class = c(\"InMemory\", \"HDF5AnnData\"), ... )"},{"path":"https://scverse.org/anndataR/reference/SingleCellExperiment.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert Between AnnData and SingleCellExperiment — to_SingleCellExperiment","text":"object AnnData object, e.g., InMemoryAnnData sce object inheriting SingleCellExperiment. output_class Name AnnData class. Must one \"HDF5AnnData\" \"InMemoryAnnData\". ... Additional arguments passed generator function. See \"Details\" section information parameters","code":""},{"path":"https://scverse.org/anndataR/reference/SingleCellExperiment.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert Between AnnData and SingleCellExperiment — to_SingleCellExperiment","text":"to_SingleCellExperiment() returns SingleCellExperiment representing content object. from_SingleCellExperiment() returns AnnData object (e.g., InMemoryAnnData) representing content sce.","code":""},{"path":"https://scverse.org/anndataR/reference/SingleCellExperiment.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert Between AnnData and SingleCellExperiment — to_SingleCellExperiment","text":"","code":"if (interactive()) { ## useful when interacting with the SingleCellExperiment ! library(SingleCellExperiment) } ad <- AnnData( X = matrix(1:15, 3L, 5L), layers = list( A = matrix(15:1, 3L, 5L), B = matrix(letters[1:15], 3L, 5L) ), obs = data.frame(cell = 1:3), var = data.frame(gene = 1:5), obs_names = LETTERS[1:3], var_names = letters[1:5] ) ## construct a SingleCellExperiment from an AnnData object sce <- to_SingleCellExperiment(ad) sce #> class: SingleCellExperiment #> dim: 5 3 #> metadata(0): #> assays(3): X A B #> rownames(5): a b c d e #> rowData names(1): gene #> colnames(3): A B C #> colData names(1): cell #> reducedDimNames(0): #> mainExpName: NULL #> altExpNames(0): ## construct an AnnData object from a SingleCellExperiment from_SingleCellExperiment(sce, \"InMemory\") #> AnnData object with n_obs × n_vars = 3 × 5 #> obs:' cell ' #> var:' gene ' #> layers:' A ', ' B '"},{"path":"https://scverse.org/anndataR/reference/anndataR-package.html","id":null,"dir":"Reference","previous_headings":"","what":"anndataR: AnnData interoperability in R — anndataR-package","title":"anndataR: AnnData interoperability in R — anndataR-package","text":"Bring power flexibility AnnData R ecosystem, allowing effortlessly manipulate analyze single-cell data. package lets work backed h5ad zarr files, directly access various slots (e.g. X, obs, var), convert data SingleCellExperiment Seurat objects.","code":""},{"path":[]},{"path":"https://scverse.org/anndataR/reference/anndataR-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"anndataR: AnnData interoperability in R — anndataR-package","text":"Maintainer: Robrecht Cannoodt rcannood@gmail.com (ORCID) (rcannood) Authors: Luke Zappia luke@lazappi.id.au (ORCID) (lazappi) Martin Morgan mtmorgan.bioc@gmail.com (ORCID) (mtmorgan) Louise Deconinck louise.deconinck@gmail.com (ORCID) (LouiseDck) Brian Schilder brian_schilder@alumni.brown.edu (ORCID) (bschilder) contributors: Danila Bredikhin danila.bredikhin@embl.de (ORCID) (gtca) [contributor] Isaac Virshup (ORCID) (ivirshup) [contributor] Chananchida Sang-aram (ORCID) (csangara) [contributor]","code":""},{"path":"https://scverse.org/anndataR/reference/get_generator.html","id":null,"dir":"Reference","previous_headings":"","what":"Fetch an AnnData generator. — get_generator","title":"Fetch an AnnData generator. — get_generator","text":"Fetch AnnData generator.","code":""},{"path":"https://scverse.org/anndataR/reference/get_generator.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fetch an AnnData generator. — get_generator","text":"","code":"get_generator(class = c(\"HDF5AnnData\", \"InMemoryAnnData\"))"},{"path":"https://scverse.org/anndataR/reference/get_generator.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fetch an AnnData generator. — get_generator","text":"class Name AnnData class. Must one \"HDF5AnnData\" \"InMemoryAnnData\".","code":""},{"path":"https://scverse.org/anndataR/reference/list_generators.html","id":null,"dir":"Reference","previous_headings":"","what":"List the available AnnData generators. — list_generators","title":"List the available AnnData generators. — list_generators","text":"List available AnnData generators.","code":""},{"path":"https://scverse.org/anndataR/reference/list_generators.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"List the available AnnData generators. — list_generators","text":"","code":"list_generators()"},{"path":"https://scverse.org/anndataR/reference/read_h5ad.html","id":null,"dir":"Reference","previous_headings":"","what":"Read H5AD — read_h5ad","title":"Read H5AD — read_h5ad","text":"Read data H5AD file","code":""},{"path":"https://scverse.org/anndataR/reference/read_h5ad.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read H5AD — read_h5ad","text":"","code":"read_h5ad( path, to = c(\"InMemoryAnnData\", \"HDF5AnnData\", \"SingleCellExperiment\", \"Seurat\"), ... )"},{"path":"https://scverse.org/anndataR/reference/read_h5ad.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read H5AD — read_h5ad","text":"path Path H5AD file read type object return. Must one : \"InMemoryAnnData\", \"HDF5AnnData\", \"SingleCellExperiment\", \"Seurat\" ... Extra arguments provided to_SingleCellExperiment() to_Seurat()","code":""},{"path":"https://scverse.org/anndataR/reference/read_h5ad.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read H5AD — read_h5ad","text":"object specified ","code":""},{"path":"https://scverse.org/anndataR/reference/read_h5ad.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Read H5AD — read_h5ad","text":"","code":"h5ad_file <- system.file(\"extdata\", \"example.h5ad\", package = \"anndataR\") # Read the H5AD as a SingleCellExperiment object if (requireNamespace(\"SingleCellExperiment\", quietly = TRUE)) { sce <- read_h5ad(h5ad_file, to = \"SingleCellExperiment\") } #> Warning: Reading attribute data of type 'ENUM' not yet implemented. Values replaced by NA's. #> Warning: Reading attribute data of type 'ENUM' not yet implemented. Values replaced by NA's. #> Warning: Unable to determine if categorical '/obs/leiden' is ordered, assuming it isn't # Read the H5AD as a Seurat object if (requireNamespace(\"SeuratObject\", quietly = TRUE)) { seurat <- read_h5ad(h5ad_file, to = \"Seurat\") } #> Warning: Reading attribute data of type 'ENUM' not yet implemented. Values replaced by NA's. #> Warning: Reading attribute data of type 'ENUM' not yet implemented. Values replaced by NA's. #> Warning: Unable to determine if categorical '/obs/leiden' is ordered, assuming it isn't #> Warning: Reading attribute data of type 'ENUM' not yet implemented. Values replaced by NA's. #> Warning: Reading attribute data of type 'ENUM' not yet implemented. Values replaced by NA's. #> Warning: Unable to determine if categorical '/obs/leiden' is ordered, assuming it isn't"},{"path":"https://scverse.org/anndataR/reference/read_h5ad_nullable_boolean.html","id":null,"dir":"Reference","previous_headings":"","what":"Read H5AD nullable boolean — read_h5ad_nullable_boolean","title":"Read H5AD nullable boolean — read_h5ad_nullable_boolean","text":"Read nullable boolean H5AD file","code":""},{"path":"https://scverse.org/anndataR/reference/read_h5ad_nullable_boolean.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read H5AD nullable boolean — read_h5ad_nullable_boolean","text":"","code":"read_h5ad_nullable_boolean(file, name, version = \"0.1.0\")"},{"path":"https://scverse.org/anndataR/reference/read_h5ad_nullable_boolean.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read H5AD nullable boolean — read_h5ad_nullable_boolean","text":"file Path H5AD file open H5AD handle name Name element within H5AD file version Encoding version element read","code":""},{"path":"https://scverse.org/anndataR/reference/read_h5ad_nullable_boolean.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read H5AD nullable boolean — read_h5ad_nullable_boolean","text":"boolean vector","code":""},{"path":"https://scverse.org/anndataR/reference/to_HDF5AnnData.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert an AnnData object to an HDF5AnnData object — to_HDF5AnnData","title":"Convert an AnnData object to an HDF5AnnData object — to_HDF5AnnData","text":"function takes AnnData object converts HDF5AnnData object, loading fields memory.","code":""},{"path":"https://scverse.org/anndataR/reference/to_HDF5AnnData.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert an AnnData object to an HDF5AnnData object — to_HDF5AnnData","text":"","code":"to_HDF5AnnData(adata, file)"},{"path":"https://scverse.org/anndataR/reference/to_HDF5AnnData.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert an AnnData object to an HDF5AnnData object — to_HDF5AnnData","text":"adata AnnData object converted HDF5AnnData. file filename (character) .h5ad file.","code":""},{"path":"https://scverse.org/anndataR/reference/to_HDF5AnnData.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert an AnnData object to an HDF5AnnData object — to_HDF5AnnData","text":"HDF5AnnData object data input AnnData object.","code":""},{"path":"https://scverse.org/anndataR/reference/to_HDF5AnnData.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert an AnnData object to an HDF5AnnData object — to_HDF5AnnData","text":"","code":"ad <- AnnData( X = matrix(1:5, 3L, 5L), layers = list( A = matrix(5:1, 3L, 5L), B = matrix(letters[1:5], 3L, 5L) ), obs = data.frame(cell = 1:3), var = data.frame(gene = 1:5), obs_names = LETTERS[1:3], var_names = letters[1:5] ) to_HDF5AnnData(ad, \"test.h5ad\") #> AnnData object with n_obs × n_vars = 3 × 5 #> obs:' cell ' #> var:' gene ' #> layers:' A ', ' B ' # remove file file.remove(\"test.h5ad\") #> [1] TRUE"},{"path":"https://scverse.org/anndataR/reference/to_InMemoryAnnData.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert an AnnData object to an InMemoryAnnData object — to_InMemoryAnnData","title":"Convert an AnnData object to an InMemoryAnnData object — to_InMemoryAnnData","text":"function takes AnnData object converts InMemoryAnnData object, loading fields memory.","code":""},{"path":"https://scverse.org/anndataR/reference/to_InMemoryAnnData.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert an AnnData object to an InMemoryAnnData object — to_InMemoryAnnData","text":"","code":"to_InMemoryAnnData(adata)"},{"path":"https://scverse.org/anndataR/reference/to_InMemoryAnnData.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert an AnnData object to an InMemoryAnnData object — to_InMemoryAnnData","text":"adata AnnData object converted InMemoryAnnData.","code":""},{"path":"https://scverse.org/anndataR/reference/to_InMemoryAnnData.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert an AnnData object to an InMemoryAnnData object — to_InMemoryAnnData","text":"InMemoryAnnData object data input AnnData object.","code":""},{"path":"https://scverse.org/anndataR/reference/to_InMemoryAnnData.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert an AnnData object to an InMemoryAnnData object — to_InMemoryAnnData","text":"","code":"ad <- AnnData( X = matrix(1:5, 3L, 5L), layers = list( A = matrix(5:1, 3L, 5L), B = matrix(letters[1:5], 3L, 5L) ), obs = data.frame(cell = 1:3), var = data.frame(gene = 1:5), obs_names = LETTERS[1:3], var_names = letters[1:5] ) to_InMemoryAnnData(ad) #> AnnData object with n_obs × n_vars = 3 × 5 #> obs:' cell ' #> var:' gene ' #> layers:' A ', ' B '"},{"path":"https://scverse.org/anndataR/reference/write_h5ad.html","id":null,"dir":"Reference","previous_headings":"","what":"Write H5AD — write_h5ad","title":"Write H5AD — write_h5ad","text":"Write H5AD file","code":""},{"path":"https://scverse.org/anndataR/reference/write_h5ad.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Write H5AD — write_h5ad","text":"","code":"write_h5ad(object, path)"},{"path":"https://scverse.org/anndataR/reference/write_h5ad.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Write H5AD — write_h5ad","text":"object object write, either \"SingleCellExperiment\" \"Seurat\" object path Path file write ","code":""},{"path":"https://scverse.org/anndataR/reference/write_h5ad.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Write H5AD — write_h5ad","text":"path invisibly","code":""},{"path":"https://scverse.org/anndataR/reference/write_h5ad.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Write H5AD — write_h5ad","text":"","code":"adata <- AnnData( X = matrix(1:15, 3L, 5L), layers = list( A = matrix(15:1, 3L, 5L), B = matrix(letters[1:15], 3L, 5L) ), obs = data.frame(cell = 1:3), var = data.frame(gene = 1:5), obs_names = LETTERS[1:3], var_names = letters[1:5] ) h5ad_file <- tempfile(fileext = \".h5ad\") write_h5ad(adata, h5ad_file) # Write a SingleCellExperiment as an H5AD if (requireNamespace(\"SingleCellExperiment\", quietly = TRUE)) { h5ad_file <- tempfile(fileext = \".h5ad\") ncells <- 100 counts <- matrix(rpois(20000, 5), ncol = ncells) logcounts <- log2(counts + 1) pca <- matrix(runif(ncells * 5), ncells) tsne <- matrix(rnorm(ncells * 2), ncells) sce <- SingleCellExperiment::SingleCellExperiment( assays = list(counts = counts, logcounts = logcounts), reducedDims = list(PCA = pca, tSNE = tsne) ) } # Write a Seurat as a H5AD if (requireNamespace(\"SeuratObject\", quietly = TRUE)) { # TODO: uncomment this code when the seurat converter is fixed # h5ad_file <- tempfile(fileext = \".h5ad\") # counts <- matrix(1:15, 3L, 5L) # dimnames(counts) <- list( # letters[1:3], # LETTERS[1:5] # ) # gene.metadata <- data.frame( # row.names = LETTERS[1:5], # gene = 1:5 # ) # obj <- SeuratObject::CreateSeuratObject(counts, meta.data = gene.metadata) # cell.metadata <- data.frame( # row.names = letters[1:3], # cell = 1:3 # ) # obj <- SeuratObject::AddMetaData(obj, cell.metadata) # # write_h5ad(obj, h5ad_file) } #> NULL"},{"path":"https://scverse.org/anndataR/reference/write_h5ad_dense_array.html","id":null,"dir":"Reference","previous_headings":"","what":"Write H5AD dense array — write_h5ad_dense_array","title":"Write H5AD dense array — write_h5ad_dense_array","text":"Write dense array H5AD file","code":""},{"path":"https://scverse.org/anndataR/reference/write_h5ad_dense_array.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Write H5AD dense array — write_h5ad_dense_array","text":"","code":"write_h5ad_dense_array(value, file, name, version = \"0.2.0\")"},{"path":"https://scverse.org/anndataR/reference/write_h5ad_dense_array.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Write H5AD dense array — write_h5ad_dense_array","text":"value Value write file Path H5AD file open H5AD handle name Name element within H5AD file version Encoding version element write","code":""},{"path":"https://scverse.org/anndataR/news/index.html","id":"anndatar-010","dir":"Changelog","previous_headings":"","what":"anndataR 0.1.0","title":"anndataR 0.1.0","text":"Initial release anndataR, providing support working AnnData objects R. Feature list: X layers obs obs_names var var_names HDF5AnnData InMemoryAnnData SingleCellExperiment Seurat","code":""}] +[{"path":"https://scverse.org/anndataR/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"MIT License","title":"MIT License","text":"Copyright (c) 2023 Robrecht Cannoodt, Luke Zappia, Martin Morgan, Louise Deconinck Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":"https://scverse.org/anndataR/articles/design.html","id":"desired-feature-list","dir":"Articles","previous_headings":"","what":"Desired feature list","title":"Design","text":"Provide R6 class work AnnData objects R (either -memory -disk). Read/write *.h5ad files natively Convert /SingleCellExperiment objects Convert /Seurat objects","code":""},{"path":"https://scverse.org/anndataR/articles/design.html","id":"class-diagram","dir":"Articles","previous_headings":"","what":"Class diagram","title":"Design","text":"diagram main R6 classes provided package: Notation: X: Matrix - variable X type Matrix *X: Matrix - variable X abstract to_SingleCellExperiment(): SingleCellExperiment - function to_SingleCellExperiment returns object type SingleCellExperiment *to_SingleCellExperiment() - function to_SingleCellExperiment abstract","code":""},{"path":"https://scverse.org/anndataR/articles/design.html","id":"feature-tracking","dir":"Articles","previous_headings":"","what":"Feature tracking","title":"Design","text":"following tables show status implementation feature package:","code":""},{"path":[]},{"path":[]},{"path":[]},{"path":[]},{"path":"https://scverse.org/anndataR/articles/getting-started.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"Using anndataR to read and convert","text":"package allows users work .h5ad files, access various slots datasets convert files SingleCellExperiment objects SeuratObjects, vice versa. Check ?anndataR full list functions provided package.","code":""},{"path":"https://scverse.org/anndataR/articles/getting-started.html","id":"installation","dir":"Articles","previous_headings":"","what":"Installation","title":"Using anndataR to read and convert","text":"Install using:","code":"if (!require(\"BiocManager\", quietly = TRUE)) { install.packages(\"BiocManager\") } BiocManager::install(\"anndataR\")"},{"path":"https://scverse.org/anndataR/articles/getting-started.html","id":"usage","dir":"Articles","previous_headings":"","what":"Usage","title":"Using anndataR to read and convert","text":"package provides abstract interface AnnData objects. abstract interface models Python counterpart closely, stores data matrix X annotations corresponding observations (obs, obsm, obsp) variables (var, varm, varp) unstructured metadata uns. abstract interface implemented different backends. Currently, following backends implemented: InMemoryAnnData HDF5AnnData InMemoryAnnData backend allows construct AnnData object memory. HDF5AnnData backend allows read AnnData object .h5ad file.","code":""},{"path":"https://scverse.org/anndataR/articles/getting-started.html","id":"hdf5anndata-backend","dir":"Articles","previous_headings":"Usage","what":"HDF5AnnData backend","title":"Using anndataR to read and convert","text":"example read .h5ad file. contents can accessed well:","code":"library(anndataR) file <- system.file(\"extdata\", \"example.h5ad\", package = \"anndataR\") adata <- read_h5ad(file, to = \"InMemoryAnnData\") #> Warning in H5Aread(A, ...): Reading attribute data of type 'ENUM' not yet #> implemented. Values replaced by NA's. #> Warning in H5Aread(A, ...): Reading attribute data of type 'ENUM' not yet #> implemented. Values replaced by NA's. #> Warning in read_fun(file = file, name = name, version = version, ...): Unable #> to determine if categorical '/obs/leiden' is ordered, assuming it isn't X <- adata$X layers <- adata$layers obs <- adata$obs var <- adata$var"},{"path":"https://scverse.org/anndataR/articles/getting-started.html","id":"inmemoryanndata-backend","dir":"Articles","previous_headings":"Usage","what":"InMemoryAnnData backend","title":"Using anndataR to read and convert","text":"following example details construct InMemoryAnnData access contents. contents can accessed well: can convert AnnData object SingleCellExperiment object SeuratObject following way:","code":"adata <- AnnData( X = matrix(1:15, 3L, 5L), layers = list( A = matrix(5:1, 3L, 5L), B = matrix(letters[1:5], 3L, 5L) ), obs = data.frame(cell = 1:3), var = data.frame(gene = 1:5), obs_names = LETTERS[1:3], var_names = letters[1:5] ) adata #> AnnData object with n_obs × n_vars = 3 × 5 #> obs:' cell ' #> var:' gene ' #> layers:' A ', ' B ' X <- adata$X layers <- adata$layers obs <- adata$obs var <- adata$var sce <- to_SingleCellExperiment(adata) seurat <- to_Seurat(adata) #> Warning in matrix(data = as.numeric(x = x), ncol = nc): NAs introduced by #> coercion"},{"path":"https://scverse.org/anndataR/articles/getting-started.html","id":"session-info","dir":"Articles","previous_headings":"","what":"Session info","title":"Using anndataR to read and convert","text":"","code":"sessionInfo() #> R version 4.3.2 (2023-10-31) #> Platform: x86_64-pc-linux-gnu (64-bit) #> Running under: Ubuntu 22.04.3 LTS #> #> Matrix products: default #> BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 #> LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0 #> #> locale: #> [1] LC_CTYPE=C.UTF-8 LC_NUMERIC=C LC_TIME=C.UTF-8 #> [4] LC_COLLATE=C.UTF-8 LC_MONETARY=C.UTF-8 LC_MESSAGES=C.UTF-8 #> [7] LC_PAPER=C.UTF-8 LC_NAME=C LC_ADDRESS=C #> [10] LC_TELEPHONE=C LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C #> #> time zone: UTC #> tzcode source: system (glibc) #> #> attached base packages: #> [1] stats4 stats graphics grDevices utils datasets methods #> [8] base #> #> other attached packages: #> [1] anndataR_0.0.0.9000 SingleCellExperiment_1.22.0 #> [3] SummarizedExperiment_1.30.2 Biobase_2.60.0 #> [5] GenomicRanges_1.52.1 GenomeInfoDb_1.36.4 #> [7] IRanges_2.34.1 S4Vectors_0.38.2 #> [9] BiocGenerics_0.46.0 MatrixGenerics_1.12.3 #> [11] matrixStats_1.1.0 SeuratObject_5.0.1 #> [13] sp_2.1-2 BiocStyle_2.28.1 #> #> loaded via a namespace (and not attached): #> [1] dotCall64_1.1-1 spam_2.10-0 xfun_0.41 #> [4] bslib_0.6.1 rhdf5_2.44.0 lattice_0.21-9 #> [7] rhdf5filters_1.12.1 vctrs_0.6.4 tools_4.3.2 #> [10] bitops_1.0-7 generics_0.1.3 parallel_4.3.2 #> [13] Matrix_1.6-4 desc_1.4.2 lifecycle_1.0.4 #> [16] GenomeInfoDbData_1.2.10 compiler_4.3.2 stringr_1.5.1 #> [19] textshaping_0.3.7 codetools_0.2-19 htmltools_0.5.7 #> [22] sass_0.4.7 RCurl_1.98-1.13 yaml_2.3.7 #> [25] pkgdown_2.0.7 crayon_1.5.2 jquerylib_0.1.4 #> [28] cachem_1.0.8 DelayedArray_0.26.7 abind_1.4-5 #> [31] parallelly_1.36.0 digest_0.6.33 stringi_1.8.2 #> [34] future_1.33.0 purrr_1.0.2 bookdown_0.36 #> [37] listenv_0.9.0 rprojroot_2.0.4 fastmap_1.1.1 #> [40] grid_4.3.2 cli_3.6.1 magrittr_2.0.3 #> [43] S4Arrays_1.0.6 future.apply_1.11.0 rmarkdown_2.25 #> [46] XVector_0.40.0 globals_0.16.2 progressr_0.14.0 #> [49] ragg_1.2.6 memoise_2.0.1 evaluate_0.23 #> [52] knitr_1.45 rlang_1.1.2 Rcpp_1.0.11 #> [55] glue_1.6.2 BiocManager_1.30.22 jsonlite_1.8.7 #> [58] Rhdf5lib_1.22.1 R6_2.5.1 systemfonts_1.0.5 #> [61] fs_1.6.3 zlibbioc_1.46.0"},{"path":"https://scverse.org/anndataR/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Robrecht Cannoodt. Author, maintainer. rcannood Luke Zappia. Author. lazappi Martin Morgan. Author. mtmorgan Louise Deconinck. Author. LouiseDck Danila Bredikhin. Contributor. gtca Isaac Virshup. Contributor. ivirshup Brian Schilder. Author. bschilder Chananchida Sang-aram. Contributor. csangara","code":""},{"path":"https://scverse.org/anndataR/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Cannoodt R, Zappia L, Morgan M, Deconinck L, Schilder B (2023). anndataR: AnnData interoperability R. R package version 0.0.0.9000, https://github.com/scverse/anndataR, https://scverse.org/anndataR.","code":"@Manual{, title = {anndataR: AnnData interoperability in R}, author = {Robrecht Cannoodt and Luke Zappia and Martin Morgan and Louise Deconinck and Brian Schilder}, year = {2023}, note = {R package version 0.0.0.9000, https://github.com/scverse/anndataR}, url = {https://scverse.org/anndataR}, }"},{"path":"https://scverse.org/anndataR/index.html","id":"anndatar","dir":"","previous_headings":"","what":"AnnData interoperability in R","title":"AnnData interoperability in R","text":"anndataR aims make AnnData format first-class citizen R ecosystem, make easy work AnnData files R, either directly converting SingleCellExperiment Seurat object. Feature list: Provide R6 class work AnnData objects R (either -memory -disk). Read/write *.h5ad files natively Convert /SingleCellExperiment objects Convert /Seurat objects","code":""},{"path":"https://scverse.org/anndataR/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"AnnData interoperability in R","text":"can install development version anndataR like : might need install suggested dependencies manually, depending task want perform. read/write *.h5ad files, need install rhdf5:BiocManager::install(\"rhdf5\") convert /SingleCellExperiment objects, need install SingleCellExperiment:BiocManager::install(\"SingleCellExperiment\") convert /Seurat objects, need install SeuratObject:install.packages(\"SeuratObject\") can also install suggested dependencies (though note might take run):","code":"devtools::install_github(\"scverse/anndataR\") devtools::install_github(\"scverse/anndataR\", dependencies = TRUE)"},{"path":"https://scverse.org/anndataR/index.html","id":"example","dir":"","previous_headings":"","what":"Example","title":"AnnData interoperability in R","text":"’s quick example use anndataR. First, download h5ad file. Read h5ad file: View structure: Access AnnData slots:","code":"library(anndataR) h5ad_path <- system.file(\"extdata\", \"example.h5ad\", package = \"anndataR\") adata <- read_h5ad(h5ad_path, to = \"InMemoryAnnData\") adata #> class: InMemoryAnnData #> dim: 50 obs x 100 var #> X: dgRMatrix #> layers: counts csc_counts dense_X dense_counts #> obs: Float FloatNA Int IntNA Bool BoolNA n_genes_by_counts #> log1p_n_genes_by_counts total_counts log1p_total_counts leiden #> var: String n_cells_by_counts mean_counts log1p_mean_counts #> pct_dropout_by_counts total_counts log1p_total_counts highly_variable #> means dispersions dispersions_norm dim(adata$X) #> [1] 50 100 adata$obs[1:5, 1:6] #> Float FloatNA Int IntNA Bool BoolNA #> 1 42.42 NaN 0 NA FALSE FALSE #> 2 42.42 42.42 1 42 TRUE NA #> 3 42.42 42.42 2 42 TRUE TRUE #> 4 42.42 42.42 3 42 TRUE TRUE #> 5 42.42 42.42 4 42 TRUE TRUE adata$var[1:5, 1:6] #> String n_cells_by_counts mean_counts log1p_mean_counts pct_dropout_by_counts #> 1 String0 44 1.94 1.078410 12 #> 2 String1 42 2.04 1.111858 16 #> 3 String2 43 2.12 1.137833 14 #> 4 String3 41 1.72 1.000632 18 #> 5 String4 42 2.06 1.118415 16 #> total_counts #> 1 97 #> 2 102 #> 3 106 #> 4 86 #> 5 103"},{"path":"https://scverse.org/anndataR/index.html","id":"interoperability","dir":"","previous_headings":"","what":"Interoperability","title":"AnnData interoperability in R","text":"Convert AnnData object SingleCellExperiment object: Convert AnnData object Seurat object:","code":"sce <- adata$to_SingleCellExperiment() sce #> class: SingleCellExperiment #> dim: 100 50 #> metadata(0): #> assays(5): X counts csc_counts dense_X dense_counts #> rownames(100): Gene000 Gene001 ... Gene098 Gene099 #> rowData names(11): String n_cells_by_counts ... dispersions #> dispersions_norm #> colnames(50): Cell000 Cell001 ... Cell048 Cell049 #> colData names(11): Float FloatNA ... log1p_total_counts leiden #> reducedDimNames(0): #> mainExpName: NULL #> altExpNames(0): obj <- adata$to_Seurat() #> Warning: Keys should be one or more alphanumeric characters followed by an #> underscore, setting key from rna to rna_ #> Warning: Keys should be one or more alphanumeric characters followed by an #> underscore, setting key from csc_counts_ to csccounts_ #> Warning: Keys should be one or more alphanumeric characters followed by an #> underscore, setting key from dense_x_ to densex_ #> Warning: Keys should be one or more alphanumeric characters followed by an #> underscore, setting key from dense_counts_ to densecounts_ obj #> An object of class Seurat #> 500 features across 50 samples within 5 assays #> Active assay: RNA (100 features, 0 variable features) #> 4 other assays present: counts, csc_counts, dense_X, dense_counts"},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":null,"dir":"Reference","previous_headings":"","what":"AbstractAnnData — AbstractAnnData","title":"AbstractAnnData — AbstractAnnData","text":"Abstract R6 class representing AnnData object. Defines interface.","code":""},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"AbstractAnnData — AbstractAnnData","text":"X NULL observation x variable matrix (without dimnames) consistent number rows obs var. layers layers slot. Must NULL named list elements dimensions consistent obs var. obs data.frame columns containing information observations. number rows obs defines observation dimension AnnData object. var data.frame columns containing information variables. number rows var defines variable dimension AnnData object. obs_names Either NULL vector unique identifiers used identify row obs act index observation dimension AnnData object. compatibility R representations, obs_names character vector. var_names Either NULL vector unique identifiers used identify row var act index variable dimension AnnData object. compatibility R representations, var_names character vector. obsm obsm slot. Must NULL named list elements number rows obs. varm varm slot. Must NULL named list elements number rows var. obsp obsp slot. Must NULL named list elements number rows columns obs. varp varp slot. Must NULL named list elements number rows columns var.","code":""},{"path":[]},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"AbstractAnnData — AbstractAnnData","text":"AbstractAnnData$print() AbstractAnnData$shape() AbstractAnnData$n_obs() AbstractAnnData$n_vars() AbstractAnnData$obs_keys() AbstractAnnData$var_keys() AbstractAnnData$layers_keys() AbstractAnnData$obsm_keys() AbstractAnnData$varm_keys() AbstractAnnData$obsp_keys() AbstractAnnData$varp_keys() AbstractAnnData$to_SingleCellExperiment() AbstractAnnData$to_Seurat() AbstractAnnData$to_InMemoryAnnData() AbstractAnnData$to_HDF5AnnData() AbstractAnnData$clone()","code":""},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"method-print-","dir":"Reference","previous_headings":"","what":"Method print()","title":"AbstractAnnData — AbstractAnnData","text":"Print summary AnnData object. print() methods implemented computationally expensive.","code":""},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"AbstractAnnData — AbstractAnnData","text":"","code":"AbstractAnnData$print(...)"},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"AbstractAnnData — AbstractAnnData","text":"... Optional arguments print method.","code":""},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"method-shape-","dir":"Reference","previous_headings":"","what":"Method shape()","title":"AbstractAnnData — AbstractAnnData","text":"Dimensions (observations x variables) AnnData object.","code":""},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"AbstractAnnData — AbstractAnnData","text":"","code":"AbstractAnnData$shape()"},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"method-n-obs-","dir":"Reference","previous_headings":"","what":"Method n_obs()","title":"AbstractAnnData — AbstractAnnData","text":"Number observations AnnData object.","code":""},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"AbstractAnnData — AbstractAnnData","text":"","code":"AbstractAnnData$n_obs()"},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"method-n-vars-","dir":"Reference","previous_headings":"","what":"Method n_vars()","title":"AbstractAnnData — AbstractAnnData","text":"Number variables AnnData object.","code":""},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"AbstractAnnData — AbstractAnnData","text":"","code":"AbstractAnnData$n_vars()"},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"method-obs-keys-","dir":"Reference","previous_headings":"","what":"Method obs_keys()","title":"AbstractAnnData — AbstractAnnData","text":"Keys ('column names') obs.","code":""},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"usage-4","dir":"Reference","previous_headings":"","what":"Usage","title":"AbstractAnnData — AbstractAnnData","text":"","code":"AbstractAnnData$obs_keys()"},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"method-var-keys-","dir":"Reference","previous_headings":"","what":"Method var_keys()","title":"AbstractAnnData — AbstractAnnData","text":"Keys ('column names') var.","code":""},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"usage-5","dir":"Reference","previous_headings":"","what":"Usage","title":"AbstractAnnData — AbstractAnnData","text":"","code":"AbstractAnnData$var_keys()"},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"method-layers-keys-","dir":"Reference","previous_headings":"","what":"Method layers_keys()","title":"AbstractAnnData — AbstractAnnData","text":"Keys (element names) layers.","code":""},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"usage-6","dir":"Reference","previous_headings":"","what":"Usage","title":"AbstractAnnData — AbstractAnnData","text":"","code":"AbstractAnnData$layers_keys()"},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"method-obsm-keys-","dir":"Reference","previous_headings":"","what":"Method obsm_keys()","title":"AbstractAnnData — AbstractAnnData","text":"Keys (element names) obsm.","code":""},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"usage-7","dir":"Reference","previous_headings":"","what":"Usage","title":"AbstractAnnData — AbstractAnnData","text":"","code":"AbstractAnnData$obsm_keys()"},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"method-varm-keys-","dir":"Reference","previous_headings":"","what":"Method varm_keys()","title":"AbstractAnnData — AbstractAnnData","text":"Keys (element names) varm.","code":""},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"usage-8","dir":"Reference","previous_headings":"","what":"Usage","title":"AbstractAnnData — AbstractAnnData","text":"","code":"AbstractAnnData$varm_keys()"},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"method-obsp-keys-","dir":"Reference","previous_headings":"","what":"Method obsp_keys()","title":"AbstractAnnData — AbstractAnnData","text":"Keys (element names) obsp.","code":""},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"usage-9","dir":"Reference","previous_headings":"","what":"Usage","title":"AbstractAnnData — AbstractAnnData","text":"","code":"AbstractAnnData$obsp_keys()"},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"method-varp-keys-","dir":"Reference","previous_headings":"","what":"Method varp_keys()","title":"AbstractAnnData — AbstractAnnData","text":"Keys (element names) varp.","code":""},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"usage-10","dir":"Reference","previous_headings":"","what":"Usage","title":"AbstractAnnData — AbstractAnnData","text":"","code":"AbstractAnnData$varp_keys()"},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"method-to-singlecellexperiment-","dir":"Reference","previous_headings":"","what":"Method to_SingleCellExperiment()","title":"AbstractAnnData — AbstractAnnData","text":"Convert SingleCellExperiment","code":""},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"usage-11","dir":"Reference","previous_headings":"","what":"Usage","title":"AbstractAnnData — AbstractAnnData","text":"","code":"AbstractAnnData$to_SingleCellExperiment()"},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"method-to-seurat-","dir":"Reference","previous_headings":"","what":"Method to_Seurat()","title":"AbstractAnnData — AbstractAnnData","text":"Convert Seurat","code":""},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"usage-12","dir":"Reference","previous_headings":"","what":"Usage","title":"AbstractAnnData — AbstractAnnData","text":"","code":"AbstractAnnData$to_Seurat()"},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"method-to-inmemoryanndata-","dir":"Reference","previous_headings":"","what":"Method to_InMemoryAnnData()","title":"AbstractAnnData — AbstractAnnData","text":"Convert InMemory AnnData","code":""},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"usage-13","dir":"Reference","previous_headings":"","what":"Usage","title":"AbstractAnnData — AbstractAnnData","text":"","code":"AbstractAnnData$to_InMemoryAnnData()"},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"method-to-hdf-anndata-","dir":"Reference","previous_headings":"","what":"Method to_HDF5AnnData()","title":"AbstractAnnData — AbstractAnnData","text":"Convert HDF5 Backed AnnData","code":""},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"usage-14","dir":"Reference","previous_headings":"","what":"Usage","title":"AbstractAnnData — AbstractAnnData","text":"","code":"AbstractAnnData$to_HDF5AnnData(path)"},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"AbstractAnnData — AbstractAnnData","text":"path path HDF5 file","code":""},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"AbstractAnnData — AbstractAnnData","text":"objects class cloneable method.","code":""},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"usage-15","dir":"Reference","previous_headings":"","what":"Usage","title":"AbstractAnnData — AbstractAnnData","text":"","code":"AbstractAnnData$clone(deep = FALSE)"},{"path":"https://scverse.org/anndataR/reference/AbstractAnnData.html","id":"arguments-2","dir":"Reference","previous_headings":"","what":"Arguments","title":"AbstractAnnData — AbstractAnnData","text":"deep Whether make deep clone.","code":""},{"path":"https://scverse.org/anndataR/reference/AnnData.html","id":null,"dir":"Reference","previous_headings":"","what":"An in-memory AnnData object — AnnData","title":"An in-memory AnnData object — AnnData","text":"class used represent AnnData object memory. AnnData stores data matrix X together annotations observations obs (obsm, obsp), variables var (varm, varp), unstructured annotations uns. read AnnData file disk, use read_h5ad() instead.","code":""},{"path":"https://scverse.org/anndataR/reference/AnnData.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"An in-memory AnnData object — AnnData","text":"","code":"AnnData( obs_names = NULL, var_names = NULL, X = NULL, obs = NULL, var = NULL, layers = NULL, obsm = NULL, varm = NULL, obsp = NULL, varp = NULL )"},{"path":"https://scverse.org/anndataR/reference/AnnData.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"An in-memory AnnData object — AnnData","text":"obs_names vector unique identifiers used identify row obs act index observation dimension AnnData object. length obs_names defines observation dimension AnnData object. var_names vector unique identifiers used identify row var act index variable dimension AnnData object. length var_names defines variable dimension AnnData object. X Either NULL observation × variable matrix dimensions consistent obs var. obs Either NULL data.frame columns containing information observations. NULL, n_obs×0 data frame automatically generated. var Either NULL data.frame columns containing information variables. NULL, n_vars×0 data frame automatically generated. layers Either NULL named list, element observation × variable matrix dimensions consistent obs var. obsm obsm slot used store multi-dimensional annotation arrays. must either NULL named list, element matrix n_obs rows arbitrary number columns. varm varm slot used store multi-dimensional annotation arrays. must either NULL named list, element matrix n_vars rows arbitrary number columns. obsp obsp slot used store sparse multi-dimensional annotation arrays. must either NULL named list, element sparse matrix dimension length n_obs. varp varp slot used store sparse multi-dimensional annotation arrays. must either NULL named list, element sparse matrix dimension length n_vars.","code":""},{"path":"https://scverse.org/anndataR/reference/AnnData.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"An in-memory AnnData object — AnnData","text":"","code":"adata <- AnnData( obs_names = paste0(\"obs\", 1:3), var_names = paste0(\"var\", 1:4), X = matrix(1:12, nrow = 3, ncol = 4), obs = data.frame( n_counts = c(1, 2, 3), n_cells = c(1, 2, 3) ), var = data.frame( n_cells = c(1, 2, 3, 4) ) ) adata #> AnnData object with n_obs × n_vars = 3 × 4 #> obs:' n_counts ', ' n_cells ' #> var:' n_cells '"},{"path":"https://scverse.org/anndataR/reference/HDF5AnnData.html","id":null,"dir":"Reference","previous_headings":"","what":"HDF5AnnData — HDF5AnnData","title":"HDF5AnnData — HDF5AnnData","text":"Implementation memory AnnData object.","code":""},{"path":"https://scverse.org/anndataR/reference/HDF5AnnData.html","id":"super-class","dir":"Reference","previous_headings":"","what":"Super class","title":"HDF5AnnData — HDF5AnnData","text":"anndataR::AbstractAnnData -> HDF5AnnData","code":""},{"path":"https://scverse.org/anndataR/reference/HDF5AnnData.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"HDF5AnnData — HDF5AnnData","text":"X X slot layers layers slot. Must NULL named list elements dimensions consistent obs var. obsm obsm slot. Must NULL named list elements number rows obs. varm varm slot. Must NULL named list elements number rows var. obsp obsp slot. Must NULL named list elements number rows columns obs. varp varp slot. Must NULL named list elements number rows columns var. obs obs slot var var slot obs_names Names observations var_names Names variables","code":""},{"path":"https://scverse.org/anndataR/reference/HDF5AnnData.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"HDF5AnnData — HDF5AnnData","text":"anndataR::AbstractAnnData$layers_keys() anndataR::AbstractAnnData$obs_keys() anndataR::AbstractAnnData$obsm_keys() anndataR::AbstractAnnData$obsp_keys() anndataR::AbstractAnnData$print() anndataR::AbstractAnnData$shape() anndataR::AbstractAnnData$to_HDF5AnnData() anndataR::AbstractAnnData$to_InMemoryAnnData() anndataR::AbstractAnnData$to_Seurat() anndataR::AbstractAnnData$to_SingleCellExperiment() anndataR::AbstractAnnData$var_keys() anndataR::AbstractAnnData$varm_keys() anndataR::AbstractAnnData$varp_keys()","code":""},{"path":"https://scverse.org/anndataR/reference/HDF5AnnData.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"HDF5AnnData — HDF5AnnData","text":"HDF5AnnData$new() HDF5AnnData$n_obs() HDF5AnnData$n_vars() HDF5AnnData$clone()","code":""},{"path":"https://scverse.org/anndataR/reference/HDF5AnnData.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"HDF5AnnData — HDF5AnnData","text":"HDF5AnnData constructor","code":""},{"path":"https://scverse.org/anndataR/reference/HDF5AnnData.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"HDF5AnnData — HDF5AnnData","text":"","code":"HDF5AnnData$new( file, obs_names = NULL, var_names = NULL, X = NULL, obs = NULL, var = NULL, layers = NULL, obsm = NULL, varm = NULL, obsp = NULL, varp = NULL, compression = c(\"none\", \"gzip\", \"lzf\") )"},{"path":"https://scverse.org/anndataR/reference/HDF5AnnData.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"HDF5AnnData — HDF5AnnData","text":"file filename (character) .h5ad file. file exist yet, obs_names var_names must provided. obs_names vector unique identifiers used identify row obs act index observation dimension AnnData object. length obs_names defines observation dimension AnnData object. var_names vector unique identifiers used identify row var act index variable dimension AnnData object. length var_names defines variable dimension AnnData object. X Either NULL observation × variable matrix dimensions consistent obs var. obs Either NULL data.frame columns containing information observations. NULL, n_obs×0 data frame automatically generated. var Either NULL data.frame columns containing information variables. NULL, n_vars×0 data frame automatically generated. layers Either NULL named list, element observation × variable matrix dimensions consistent obs var. obsm obsm slot used store multi-dimensional annotation arrays. must either NULL named list, element matrix n_obs rows arbitrary number columns. varm varm slot used store multi-dimensional annotation arrays. must either NULL named list, element matrix n_vars rows arbitrary number columns. obsp obsp slot used store sparse multi-dimensional annotation arrays. must either NULL named list, element sparse matrix dimension length n_obs. varp varp slot used store sparse multi-dimensional annotation arrays. must either NULL named list, element sparse matrix dimension length n_vars. compression compression algorithm use writing HDF5 file. Can one \"none\", \"gzip\" \"lzf\". Defaults \"none\".","code":""},{"path":"https://scverse.org/anndataR/reference/HDF5AnnData.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"HDF5AnnData — HDF5AnnData","text":"constructor creates new HDF5 AnnData interface object. can either used either connect existing .h5ad file create new one. create new file obs_names var_names must specified. cases, additional slots provided set created object. cause data overwritten file already exists.","code":""},{"path":"https://scverse.org/anndataR/reference/HDF5AnnData.html","id":"method-n-obs-","dir":"Reference","previous_headings":"","what":"Method n_obs()","title":"HDF5AnnData — HDF5AnnData","text":"Number observations AnnData object","code":""},{"path":"https://scverse.org/anndataR/reference/HDF5AnnData.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"HDF5AnnData — HDF5AnnData","text":"","code":"HDF5AnnData$n_obs()"},{"path":"https://scverse.org/anndataR/reference/HDF5AnnData.html","id":"method-n-vars-","dir":"Reference","previous_headings":"","what":"Method n_vars()","title":"HDF5AnnData — HDF5AnnData","text":"Number variables AnnData object","code":""},{"path":"https://scverse.org/anndataR/reference/HDF5AnnData.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"HDF5AnnData — HDF5AnnData","text":"","code":"HDF5AnnData$n_vars()"},{"path":"https://scverse.org/anndataR/reference/HDF5AnnData.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"HDF5AnnData — HDF5AnnData","text":"objects class cloneable method.","code":""},{"path":"https://scverse.org/anndataR/reference/HDF5AnnData.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"HDF5AnnData — HDF5AnnData","text":"","code":"HDF5AnnData$clone(deep = FALSE)"},{"path":"https://scverse.org/anndataR/reference/HDF5AnnData.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"HDF5AnnData — HDF5AnnData","text":"deep Whether make deep clone.","code":""},{"path":"https://scverse.org/anndataR/reference/InMemoryAnnData.html","id":null,"dir":"Reference","previous_headings":"","what":"InMemoryAnnData — InMemoryAnnData","title":"InMemoryAnnData — InMemoryAnnData","text":"Implementation memory AnnData object.","code":""},{"path":"https://scverse.org/anndataR/reference/InMemoryAnnData.html","id":"super-class","dir":"Reference","previous_headings":"","what":"Super class","title":"InMemoryAnnData — InMemoryAnnData","text":"anndataR::AbstractAnnData -> InMemoryAnnData","code":""},{"path":"https://scverse.org/anndataR/reference/InMemoryAnnData.html","id":"active-bindings","dir":"Reference","previous_headings":"","what":"Active bindings","title":"InMemoryAnnData — InMemoryAnnData","text":"X NULL observation x variable matrix (without dimnames) consistent number rows obs var. layers NULL named list elements dimensions consistent obs var. obs data.frame columns containing information observations. number rows obs defines observation dimension AnnData object. var data.frame columns containing information variables. number rows var defines variable dimension AnnData object. obs_names Either NULL vector unique identifiers used identify row obs act index observation dimension AnnData object. compatibility R representations, obs_names character vector. var_names Either NULL vector unique identifiers used identify row var act index variable dimension AnnData object. compatibility R representations, var_names character vector. obsm obsm slot. Must NULL named list elements number rows obs. varm varm slot. Must NULL named list elements number rows var. obsp obsp slot. Must NULL named list elements number rows columns obs. varp varp slot. Must NULL named list elements number rows columns var.","code":""},{"path":"https://scverse.org/anndataR/reference/InMemoryAnnData.html","id":"methods","dir":"Reference","previous_headings":"","what":"Methods","title":"InMemoryAnnData — InMemoryAnnData","text":"anndataR::AbstractAnnData$layers_keys() anndataR::AbstractAnnData$n_obs() anndataR::AbstractAnnData$n_vars() anndataR::AbstractAnnData$obs_keys() anndataR::AbstractAnnData$obsm_keys() anndataR::AbstractAnnData$obsp_keys() anndataR::AbstractAnnData$print() anndataR::AbstractAnnData$shape() anndataR::AbstractAnnData$to_HDF5AnnData() anndataR::AbstractAnnData$to_InMemoryAnnData() anndataR::AbstractAnnData$to_Seurat() anndataR::AbstractAnnData$to_SingleCellExperiment() anndataR::AbstractAnnData$var_keys() anndataR::AbstractAnnData$varm_keys() anndataR::AbstractAnnData$varp_keys()","code":""},{"path":"https://scverse.org/anndataR/reference/InMemoryAnnData.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"InMemoryAnnData — InMemoryAnnData","text":"InMemoryAnnData$new() InMemoryAnnData$clone()","code":""},{"path":"https://scverse.org/anndataR/reference/InMemoryAnnData.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"InMemoryAnnData — InMemoryAnnData","text":"Creates new instance memory AnnData object. Inherits AbstractAnnData.","code":""},{"path":"https://scverse.org/anndataR/reference/InMemoryAnnData.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"InMemoryAnnData — InMemoryAnnData","text":"","code":"InMemoryAnnData$new( obs_names, var_names, X = NULL, obs = NULL, var = NULL, layers = NULL, obsm = NULL, varm = NULL, obsp = NULL, varp = NULL )"},{"path":"https://scverse.org/anndataR/reference/InMemoryAnnData.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"InMemoryAnnData — InMemoryAnnData","text":"obs_names vector unique identifiers used identify row obs act index observation dimension AnnData object. length obs_names defines observation dimension AnnData object. var_names vector unique identifers used identify row var act index variable dimension AnnData object. length var_names defines variable dimension AnnData object. X Either NULL observation × variable matrix dimensions consistent obs var. obs Either NULL data.frame columns containing information observations. NULL, n_obs×0 data frame automatically generated. var Either NULL data.frame columns containing information variables. NULL, n_vars×0 data frame automatically generated. layers Either NULL named list, element observation × variable matrix dimensions consistent obs var. obsm obsm slot used store multi-dimensional annotation arrays. must either NULL named list, element matrix n_obs rows arbitrary number columns. varm varm slot used store multi-dimensional annotation arrays. must either NULL named list, element matrix n_vars rows arbitrary number columns. obsp obsp slot used store sparse multi-dimensional annotation arrays. must either NULL named list, element sparse matrix dimension length n_obs. varp varp slot used store sparse multi-dimensional annotation arrays. must either NULL named list, element sparse matrix dimension length n_vars.","code":""},{"path":"https://scverse.org/anndataR/reference/InMemoryAnnData.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"InMemoryAnnData — InMemoryAnnData","text":"objects class cloneable method.","code":""},{"path":"https://scverse.org/anndataR/reference/InMemoryAnnData.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"InMemoryAnnData — InMemoryAnnData","text":"","code":"InMemoryAnnData$clone(deep = FALSE)"},{"path":"https://scverse.org/anndataR/reference/InMemoryAnnData.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"InMemoryAnnData — InMemoryAnnData","text":"deep Whether make deep clone.","code":""},{"path":"https://scverse.org/anndataR/reference/InMemoryAnnData.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"InMemoryAnnData — InMemoryAnnData","text":"","code":"## complete example ad <- AnnData( X = matrix(1:15, 3L, 5L), layers = list( A = matrix(5:1, 3L, 5L), B = matrix(letters[1:5], 3L, 5L) ), obs = data.frame(cell = 1:3), var = data.frame(gene = 1:5), obs_names = LETTERS[1:3], var_names = letters[1:5] ) ad #> AnnData object with n_obs × n_vars = 3 × 5 #> obs:' cell ' #> var:' gene ' #> layers:' A ', ' B ' ## minimum example ad <- AnnData( obs_names = letters[1:10], var_names = LETTERS[1:5] ) ad #> AnnData object with n_obs × n_vars = 10 × 5"},{"path":"https://scverse.org/anndataR/reference/Seurat.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert Between AnnData and Seurat — to_Seurat","title":"Convert Between AnnData and Seurat — to_Seurat","text":"to_Seurat() converts AnnData object Seurat object. from_Seurat() converts Seurat object AnnData object. one assay can converted time.","code":""},{"path":"https://scverse.org/anndataR/reference/Seurat.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert Between AnnData and Seurat — to_Seurat","text":"","code":"to_Seurat(obj) from_Seurat( seurat_obj, output_class = c(\"InMemoryAnnData\", \"HDF5AnnData\"), assay = NULL, X = \"counts\", ... )"},{"path":"https://scverse.org/anndataR/reference/Seurat.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert Between AnnData and Seurat — to_Seurat","text":"obj AnnData object seurat_obj object inheriting Seurat. output_class Name AnnData class. Must one \"HDF5AnnData\" \"InMemoryAnnData\". assay Assay converted. NULL, DefaultAssay() used. X 'counts', 'data', 'scale.data' used X. default, 'counts' used (empty), followed 'data', 'scale.data'. remaining non-empty slots stored different layers. ... Additional arguments passed generator function.","code":""},{"path":"https://scverse.org/anndataR/reference/Seurat.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert Between AnnData and Seurat — to_Seurat","text":"","code":"ad <- AnnData( X = matrix(1:5, 3L, 5L), obs = data.frame(cell = 1:3), obs_names = letters[1:3], var = data.frame(gene = 1:5), var_names = letters[1:5] ) to_Seurat(ad) #> Loading required namespace: SeuratObject #> An object of class Seurat #> 5 features across 3 samples within 1 assay #> Active assay: RNA (5 features, 0 variable features) #> 2 layers present: counts, data"},{"path":"https://scverse.org/anndataR/reference/SingleCellExperiment.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert Between AnnData and SingleCellExperiment — to_SingleCellExperiment","title":"Convert Between AnnData and SingleCellExperiment — to_SingleCellExperiment","text":"to_SingleCellExperiment() converts AnnData object SingleCellExperiment. from_SingleCellExperiment() converts SingleCellExperiment AnnData object.","code":""},{"path":"https://scverse.org/anndataR/reference/SingleCellExperiment.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert Between AnnData and SingleCellExperiment — to_SingleCellExperiment","text":"","code":"to_SingleCellExperiment(object) from_SingleCellExperiment( sce, output_class = c(\"InMemory\", \"HDF5AnnData\"), ... )"},{"path":"https://scverse.org/anndataR/reference/SingleCellExperiment.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert Between AnnData and SingleCellExperiment — to_SingleCellExperiment","text":"object AnnData object, e.g., InMemoryAnnData sce object inheriting SingleCellExperiment. output_class Name AnnData class. Must one \"HDF5AnnData\" \"InMemoryAnnData\". ... Additional arguments passed generator function. See \"Details\" section information parameters","code":""},{"path":"https://scverse.org/anndataR/reference/SingleCellExperiment.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert Between AnnData and SingleCellExperiment — to_SingleCellExperiment","text":"to_SingleCellExperiment() returns SingleCellExperiment representing content object. from_SingleCellExperiment() returns AnnData object (e.g., InMemoryAnnData) representing content sce.","code":""},{"path":"https://scverse.org/anndataR/reference/SingleCellExperiment.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert Between AnnData and SingleCellExperiment — to_SingleCellExperiment","text":"","code":"if (interactive()) { ## useful when interacting with the SingleCellExperiment ! library(SingleCellExperiment) } ad <- AnnData( X = matrix(1:15, 3L, 5L), layers = list( A = matrix(15:1, 3L, 5L), B = matrix(letters[1:15], 3L, 5L) ), obs = data.frame(cell = 1:3), var = data.frame(gene = 1:5), obs_names = LETTERS[1:3], var_names = letters[1:5] ) ## construct a SingleCellExperiment from an AnnData object sce <- to_SingleCellExperiment(ad) #> Warning: replacing previous import ‘S4Arrays::makeNindexFromArrayViewport’ by ‘DelayedArray::makeNindexFromArrayViewport’ when loading ‘SummarizedExperiment’ sce #> class: SingleCellExperiment #> dim: 5 3 #> metadata(0): #> assays(3): X A B #> rownames(5): a b c d e #> rowData names(1): gene #> colnames(3): A B C #> colData names(1): cell #> reducedDimNames(0): #> mainExpName: NULL #> altExpNames(0): ## construct an AnnData object from a SingleCellExperiment from_SingleCellExperiment(sce, \"InMemory\") #> AnnData object with n_obs × n_vars = 3 × 5 #> obs:' cell ' #> var:' gene ' #> layers:' A ', ' B '"},{"path":"https://scverse.org/anndataR/reference/anndataR-package.html","id":null,"dir":"Reference","previous_headings":"","what":"anndataR: AnnData interoperability in R — anndataR-package","title":"anndataR: AnnData interoperability in R — anndataR-package","text":"Bring power flexibility AnnData R ecosystem, allowing effortlessly manipulate analyze single-cell data. package lets work backed h5ad zarr files, directly access various slots (e.g. X, obs, var), convert data SingleCellExperiment Seurat objects.","code":""},{"path":[]},{"path":"https://scverse.org/anndataR/reference/anndataR-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"anndataR: AnnData interoperability in R — anndataR-package","text":"Maintainer: Robrecht Cannoodt rcannood@gmail.com (ORCID) (rcannood) Authors: Luke Zappia luke@lazappi.id.au (ORCID) (lazappi) Martin Morgan mtmorgan.bioc@gmail.com (ORCID) (mtmorgan) Louise Deconinck louise.deconinck@gmail.com (ORCID) (LouiseDck) Brian Schilder brian_schilder@alumni.brown.edu (ORCID) (bschilder) contributors: Danila Bredikhin danila.bredikhin@embl.de (ORCID) (gtca) [contributor] Isaac Virshup (ORCID) (ivirshup) [contributor] Chananchida Sang-aram (ORCID) (csangara) [contributor]","code":""},{"path":"https://scverse.org/anndataR/reference/get_generator.html","id":null,"dir":"Reference","previous_headings":"","what":"Fetch an AnnData generator. — get_generator","title":"Fetch an AnnData generator. — get_generator","text":"Fetch AnnData generator.","code":""},{"path":"https://scverse.org/anndataR/reference/get_generator.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fetch an AnnData generator. — get_generator","text":"","code":"get_generator(class = c(\"HDF5AnnData\", \"InMemoryAnnData\"))"},{"path":"https://scverse.org/anndataR/reference/get_generator.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fetch an AnnData generator. — get_generator","text":"class Name AnnData class. Must one \"HDF5AnnData\" \"InMemoryAnnData\".","code":""},{"path":"https://scverse.org/anndataR/reference/list_generators.html","id":null,"dir":"Reference","previous_headings":"","what":"List the available AnnData generators. — list_generators","title":"List the available AnnData generators. — list_generators","text":"List available AnnData generators.","code":""},{"path":"https://scverse.org/anndataR/reference/list_generators.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"List the available AnnData generators. — list_generators","text":"","code":"list_generators()"},{"path":"https://scverse.org/anndataR/reference/read_h5ad.html","id":null,"dir":"Reference","previous_headings":"","what":"Read H5AD — read_h5ad","title":"Read H5AD — read_h5ad","text":"Read data H5AD file","code":""},{"path":"https://scverse.org/anndataR/reference/read_h5ad.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read H5AD — read_h5ad","text":"","code":"read_h5ad( path, to = c(\"InMemoryAnnData\", \"HDF5AnnData\", \"SingleCellExperiment\", \"Seurat\"), ... )"},{"path":"https://scverse.org/anndataR/reference/read_h5ad.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read H5AD — read_h5ad","text":"path Path H5AD file read type object return. Must one : \"InMemoryAnnData\", \"HDF5AnnData\", \"SingleCellExperiment\", \"Seurat\" ... Extra arguments provided to_SingleCellExperiment() to_Seurat()","code":""},{"path":"https://scverse.org/anndataR/reference/read_h5ad.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read H5AD — read_h5ad","text":"object specified ","code":""},{"path":"https://scverse.org/anndataR/reference/read_h5ad.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Read H5AD — read_h5ad","text":"","code":"h5ad_file <- system.file(\"extdata\", \"example.h5ad\", package = \"anndataR\") # Read the H5AD as a SingleCellExperiment object if (requireNamespace(\"SingleCellExperiment\", quietly = TRUE)) { sce <- read_h5ad(h5ad_file, to = \"SingleCellExperiment\") } #> Warning: Reading attribute data of type 'ENUM' not yet implemented. Values replaced by NA's. #> Warning: Reading attribute data of type 'ENUM' not yet implemented. Values replaced by NA's. #> Warning: Unable to determine if categorical '/obs/leiden' is ordered, assuming it isn't # Read the H5AD as a Seurat object if (requireNamespace(\"SeuratObject\", quietly = TRUE)) { seurat <- read_h5ad(h5ad_file, to = \"Seurat\") } #> Warning: Reading attribute data of type 'ENUM' not yet implemented. Values replaced by NA's. #> Warning: Reading attribute data of type 'ENUM' not yet implemented. Values replaced by NA's. #> Warning: Unable to determine if categorical '/obs/leiden' is ordered, assuming it isn't #> Warning: Reading attribute data of type 'ENUM' not yet implemented. Values replaced by NA's. #> Warning: Reading attribute data of type 'ENUM' not yet implemented. Values replaced by NA's. #> Warning: Unable to determine if categorical '/obs/leiden' is ordered, assuming it isn't"},{"path":"https://scverse.org/anndataR/reference/read_h5ad_nullable_boolean.html","id":null,"dir":"Reference","previous_headings":"","what":"Read H5AD nullable boolean — read_h5ad_nullable_boolean","title":"Read H5AD nullable boolean — read_h5ad_nullable_boolean","text":"Read nullable boolean H5AD file","code":""},{"path":"https://scverse.org/anndataR/reference/read_h5ad_nullable_boolean.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read H5AD nullable boolean — read_h5ad_nullable_boolean","text":"","code":"read_h5ad_nullable_boolean(file, name, version = \"0.1.0\")"},{"path":"https://scverse.org/anndataR/reference/read_h5ad_nullable_boolean.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read H5AD nullable boolean — read_h5ad_nullable_boolean","text":"file Path H5AD file open H5AD handle name Name element within H5AD file version Encoding version element read","code":""},{"path":"https://scverse.org/anndataR/reference/read_h5ad_nullable_boolean.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read H5AD nullable boolean — read_h5ad_nullable_boolean","text":"boolean vector","code":""},{"path":"https://scverse.org/anndataR/reference/to_HDF5AnnData.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert an AnnData object to an HDF5AnnData object — to_HDF5AnnData","title":"Convert an AnnData object to an HDF5AnnData object — to_HDF5AnnData","text":"function takes AnnData object converts HDF5AnnData object, loading fields memory.","code":""},{"path":"https://scverse.org/anndataR/reference/to_HDF5AnnData.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert an AnnData object to an HDF5AnnData object — to_HDF5AnnData","text":"","code":"to_HDF5AnnData(adata, file, compression = c(\"none\", \"gzip\", \"lzf\"))"},{"path":"https://scverse.org/anndataR/reference/to_HDF5AnnData.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert an AnnData object to an HDF5AnnData object — to_HDF5AnnData","text":"adata AnnData object converted HDF5AnnData. file filename (character) .h5ad file. compression compression algorithm use writing HDF5 file. Can one \"none\", \"gzip\" \"lzf\". Defaults \"none\".","code":""},{"path":"https://scverse.org/anndataR/reference/to_HDF5AnnData.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert an AnnData object to an HDF5AnnData object — to_HDF5AnnData","text":"HDF5AnnData object data input AnnData object.","code":""},{"path":"https://scverse.org/anndataR/reference/to_HDF5AnnData.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert an AnnData object to an HDF5AnnData object — to_HDF5AnnData","text":"","code":"ad <- AnnData( X = matrix(1:5, 3L, 5L), layers = list( A = matrix(5:1, 3L, 5L), B = matrix(letters[1:5], 3L, 5L) ), obs = data.frame(cell = 1:3), var = data.frame(gene = 1:5), obs_names = LETTERS[1:3], var_names = letters[1:5] ) to_HDF5AnnData(ad, \"test.h5ad\") #> AnnData object with n_obs × n_vars = 3 × 5 #> obs:' cell ' #> var:' gene ' #> layers:' A ', ' B ' # remove file file.remove(\"test.h5ad\") #> [1] TRUE"},{"path":"https://scverse.org/anndataR/reference/to_InMemoryAnnData.html","id":null,"dir":"Reference","previous_headings":"","what":"Convert an AnnData object to an InMemoryAnnData object — to_InMemoryAnnData","title":"Convert an AnnData object to an InMemoryAnnData object — to_InMemoryAnnData","text":"function takes AnnData object converts InMemoryAnnData object, loading fields memory.","code":""},{"path":"https://scverse.org/anndataR/reference/to_InMemoryAnnData.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Convert an AnnData object to an InMemoryAnnData object — to_InMemoryAnnData","text":"","code":"to_InMemoryAnnData(adata)"},{"path":"https://scverse.org/anndataR/reference/to_InMemoryAnnData.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Convert an AnnData object to an InMemoryAnnData object — to_InMemoryAnnData","text":"adata AnnData object converted InMemoryAnnData.","code":""},{"path":"https://scverse.org/anndataR/reference/to_InMemoryAnnData.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Convert an AnnData object to an InMemoryAnnData object — to_InMemoryAnnData","text":"InMemoryAnnData object data input AnnData object.","code":""},{"path":"https://scverse.org/anndataR/reference/to_InMemoryAnnData.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Convert an AnnData object to an InMemoryAnnData object — to_InMemoryAnnData","text":"","code":"ad <- AnnData( X = matrix(1:5, 3L, 5L), layers = list( A = matrix(5:1, 3L, 5L), B = matrix(letters[1:5], 3L, 5L) ), obs = data.frame(cell = 1:3), var = data.frame(gene = 1:5), obs_names = LETTERS[1:3], var_names = letters[1:5] ) to_InMemoryAnnData(ad) #> AnnData object with n_obs × n_vars = 3 × 5 #> obs:' cell ' #> var:' gene ' #> layers:' A ', ' B '"},{"path":"https://scverse.org/anndataR/reference/write_h5ad.html","id":null,"dir":"Reference","previous_headings":"","what":"Write H5AD — write_h5ad","title":"Write H5AD — write_h5ad","text":"Write H5AD file","code":""},{"path":"https://scverse.org/anndataR/reference/write_h5ad.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Write H5AD — write_h5ad","text":"","code":"write_h5ad(object, path, compression = c(\"none\", \"gzip\", \"lzf\"))"},{"path":"https://scverse.org/anndataR/reference/write_h5ad.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Write H5AD — write_h5ad","text":"object object write, either \"SingleCellExperiment\" \"Seurat\" object path Path file write compression compression algorithm use writing HDF5 file. Can one \"none\", \"gzip\" \"lzf\". Defaults \"none\".","code":""},{"path":"https://scverse.org/anndataR/reference/write_h5ad.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Write H5AD — write_h5ad","text":"path invisibly","code":""},{"path":"https://scverse.org/anndataR/reference/write_h5ad.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Write H5AD — write_h5ad","text":"","code":"adata <- AnnData( X = matrix(1:15, 3L, 5L), layers = list( A = matrix(15:1, 3L, 5L), B = matrix(letters[1:15], 3L, 5L) ), obs = data.frame(cell = 1:3), var = data.frame(gene = 1:5), obs_names = LETTERS[1:3], var_names = letters[1:5] ) h5ad_file <- tempfile(fileext = \".h5ad\") write_h5ad(adata, h5ad_file) # Write a SingleCellExperiment as an H5AD if (requireNamespace(\"SingleCellExperiment\", quietly = TRUE)) { h5ad_file <- tempfile(fileext = \".h5ad\") ncells <- 100 counts <- matrix(rpois(20000, 5), ncol = ncells) logcounts <- log2(counts + 1) pca <- matrix(runif(ncells * 5), ncells) tsne <- matrix(rnorm(ncells * 2), ncells) sce <- SingleCellExperiment::SingleCellExperiment( assays = list(counts = counts, logcounts = logcounts), reducedDims = list(PCA = pca, tSNE = tsne) ) } # Write a Seurat as a H5AD if (requireNamespace(\"SeuratObject\", quietly = TRUE)) { # TODO: uncomment this code when the seurat converter is fixed # h5ad_file <- tempfile(fileext = \".h5ad\") # counts <- matrix(1:15, 3L, 5L) # dimnames(counts) <- list( # letters[1:3], # LETTERS[1:5] # ) # gene.metadata <- data.frame( # row.names = LETTERS[1:5], # gene = 1:5 # ) # obj <- SeuratObject::CreateSeuratObject(counts, meta.data = gene.metadata) # cell.metadata <- data.frame( # row.names = letters[1:3], # cell = 1:3 # ) # obj <- SeuratObject::AddMetaData(obj, cell.metadata) # # write_h5ad(obj, h5ad_file) } #> NULL"},{"path":"https://scverse.org/anndataR/reference/write_h5ad_dense_array.html","id":null,"dir":"Reference","previous_headings":"","what":"Write H5AD dense array — write_h5ad_dense_array","title":"Write H5AD dense array — write_h5ad_dense_array","text":"Write dense array H5AD file","code":""},{"path":"https://scverse.org/anndataR/reference/write_h5ad_dense_array.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Write H5AD dense array — write_h5ad_dense_array","text":"","code":"write_h5ad_dense_array(value, file, name, compression, version = \"0.2.0\")"},{"path":"https://scverse.org/anndataR/reference/write_h5ad_dense_array.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Write H5AD dense array — write_h5ad_dense_array","text":"value Value write file Path H5AD file open H5AD handle name Name element within H5AD file compression compression use writing element. Can one \"none\", \"gzip\" \"lzf\". Defaults \"none\". version Encoding version element write","code":""},{"path":"https://scverse.org/anndataR/news/index.html","id":"anndatar-010","dir":"Changelog","previous_headings":"","what":"anndataR 0.1.0","title":"anndataR 0.1.0","text":"Initial release anndataR, providing support working AnnData objects R. Feature list: X layers obs obs_names var var_names HDF5AnnData InMemoryAnnData SingleCellExperiment Seurat","code":""}]