diff --git a/articles/getting-started.html b/articles/getting-started.html index 4a8c33a..524e3c2 100644 --- a/articles/getting-started.html +++ b/articles/getting-started.html @@ -185,18 +185,7 @@

or to a SeuratObject in the following way:

 sce <- to_SingleCellExperiment(adata)
-#> Warning: replacing previous import 'S4Arrays::makeNindexFromArrayViewport' by
-#> 'DelayedArray::makeNindexFromArrayViewport' when loading 'SummarizedExperiment'
 seurat <- to_Seurat(adata)
-#> Loading required namespace: SeuratObject
-#> The legacy packages maptools, rgdal, and rgeos, underpinning the sp package,
-#> which was just loaded, will retire in October 2023.
-#> Please refer to R-spatial evolution reports for details, especially
-#> https://r-spatial.org/r/2023/05/15/evolution4.html.
-#> It may be desirable to make the sf package available;
-#> package maintainers should consider adding sf to Suggests:.
-#> The sp package is now running under evolution status 2
-#>      (status 2 uses the sf package in place of rgdal)
 #> Warning: Keys should be one or more alphanumeric characters followed by an
 #> underscore, setting key from rna to rna_
 #> Warning in matrix(data = as.numeric(x = x), ncol = nc): NAs introduced by
@@ -226,48 +215,39 @@ 

Session info#> tzcode source: system (glibc) #> #> attached base packages: -#> [1] stats graphics grDevices utils datasets methods base +#> [1] stats4 stats graphics grDevices utils datasets methods +#> [8] base #> #> other attached packages: -#> [1] anndataR_0.0.0.9000 BiocStyle_2.28.1 +#> [1] anndataR_0.0.0.9000 SingleCellExperiment_1.22.0 +#> [3] SummarizedExperiment_1.30.2 Biobase_2.60.0 +#> [5] GenomicRanges_1.52.0 GenomeInfoDb_1.36.3 +#> [7] IRanges_2.34.1 S4Vectors_0.38.1 +#> [9] BiocGenerics_0.46.0 MatrixGenerics_1.12.3 +#> [11] matrixStats_1.0.0 SeuratObject_4.1.3 +#> [13] sp_2.0-0 BiocStyle_2.28.1 #> #> loaded via a namespace (and not attached): -#> [1] SummarizedExperiment_1.30.2 xfun_0.40 -#> [3] bslib_0.5.1 rhdf5_2.44.0 -#> [5] Biobase_2.60.0 lattice_0.21-8 -#> [7] rhdf5filters_1.12.1 vctrs_0.6.3 -#> [9] tools_4.3.1 bitops_1.0-7 -#> [11] stats4_4.3.1 parallel_4.3.1 -#> [13] Matrix_1.5-4.1 desc_1.4.2 -#> [15] S4Vectors_0.38.1 lifecycle_1.0.3 -#> [17] GenomeInfoDbData_1.2.10 compiler_4.3.1 -#> [19] stringr_1.5.0 textshaping_0.3.6 -#> [21] codetools_0.2-19 SeuratObject_4.1.3 -#> [23] GenomeInfoDb_1.36.3 htmltools_0.5.6 -#> [25] sass_0.4.7 RCurl_1.98-1.12 -#> [27] yaml_2.3.7 pkgdown_2.0.7 -#> [29] crayon_1.5.2 jquerylib_0.1.4 -#> [31] SingleCellExperiment_1.22.0 cachem_1.0.8 -#> [33] DelayedArray_0.26.7 abind_1.4-5 -#> [35] parallelly_1.36.0 digest_0.6.33 -#> [37] stringi_1.7.12 future_1.33.0 -#> [39] purrr_1.0.2 bookdown_0.35 -#> [41] listenv_0.9.0 rprojroot_2.0.3 -#> [43] fastmap_1.1.1 grid_4.3.1 -#> [45] cli_3.6.1 magrittr_2.0.3 -#> [47] S4Arrays_1.0.6 future.apply_1.11.0 -#> [49] sp_2.0-0 rmarkdown_2.24 -#> [51] XVector_0.40.0 matrixStats_1.0.0 -#> [53] globals_0.16.2 progressr_0.14.0 -#> [55] ragg_1.2.5 memoise_2.0.1 -#> [57] evaluate_0.21 knitr_1.44 -#> [59] GenomicRanges_1.52.0 IRanges_2.34.1 -#> [61] rlang_1.1.1 Rcpp_1.0.11 -#> [63] glue_1.6.2 BiocManager_1.30.22 -#> [65] BiocGenerics_0.46.0 jsonlite_1.8.7 -#> [67] R6_2.5.1 Rhdf5lib_1.22.1 -#> [69] MatrixGenerics_1.12.3 systemfonts_1.0.4 -#> [71] fs_1.6.3 zlibbioc_1.46.0

+#> [1] xfun_0.40 bslib_0.5.1 rhdf5_2.44.0 +#> [4] lattice_0.21-8 rhdf5filters_1.12.1 vctrs_0.6.3 +#> [7] tools_4.3.1 bitops_1.0-7 parallel_4.3.1 +#> [10] Matrix_1.5-4.1 desc_1.4.2 lifecycle_1.0.3 +#> [13] GenomeInfoDbData_1.2.10 compiler_4.3.1 stringr_1.5.0 +#> [16] textshaping_0.3.6 codetools_0.2-19 htmltools_0.5.6 +#> [19] sass_0.4.7 RCurl_1.98-1.12 yaml_2.3.7 +#> [22] pkgdown_2.0.7 crayon_1.5.2 jquerylib_0.1.4 +#> [25] cachem_1.0.8 DelayedArray_0.26.7 abind_1.4-5 +#> [28] parallelly_1.36.0 digest_0.6.33 stringi_1.7.12 +#> [31] future_1.33.0 purrr_1.0.2 bookdown_0.35 +#> [34] listenv_0.9.0 rprojroot_2.0.3 fastmap_1.1.1 +#> [37] grid_4.3.1 cli_3.6.1 magrittr_2.0.3 +#> [40] S4Arrays_1.0.6 future.apply_1.11.0 rmarkdown_2.24 +#> [43] XVector_0.40.0 globals_0.16.2 progressr_0.14.0 +#> [46] ragg_1.2.5 memoise_2.0.1 evaluate_0.21 +#> [49] knitr_1.44 rlang_1.1.1 Rcpp_1.0.11 +#> [52] glue_1.6.2 BiocManager_1.30.22 jsonlite_1.8.7 +#> [55] R6_2.5.1 Rhdf5lib_1.22.1 systemfonts_1.0.4 +#> [58] fs_1.6.3 zlibbioc_1.46.0 diff --git a/pkgdown.yml b/pkgdown.yml index 840e18e..f822414 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-09-19T13:34Z +last_built: 2023-09-19T15:03Z urls: reference: https://scverse.org/anndataR/reference article: https://scverse.org/anndataR/articles diff --git a/search.json b/search.json index 99224db..0f0a7a1 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) #> Warning: replacing previous import 'S4Arrays::makeNindexFromArrayViewport' by #> 'DelayedArray::makeNindexFromArrayViewport' when loading 'SummarizedExperiment' seurat <- to_Seurat(adata) #> Loading required namespace: SeuratObject #> The legacy packages maptools, rgdal, and rgeos, underpinning the sp package, #> which was just loaded, will retire in October 2023. #> Please refer to R-spatial evolution reports for details, especially #> https://r-spatial.org/r/2023/05/15/evolution4.html. #> It may be desirable to make the sf package available; #> package maintainers should consider adding sf to Suggests:. #> The sp package is now running under evolution status 2 #> (status 2 uses the sf package in place of rgdal) #> Warning: Keys should be one or more alphanumeric characters followed by an #> underscore, setting key from rna to rna_ #> 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.1 (2023-06-16) #> 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] stats graphics grDevices utils datasets methods base #> #> other attached packages: #> [1] anndataR_0.0.0.9000 BiocStyle_2.28.1 #> #> loaded via a namespace (and not attached): #> [1] SummarizedExperiment_1.30.2 xfun_0.40 #> [3] bslib_0.5.1 rhdf5_2.44.0 #> [5] Biobase_2.60.0 lattice_0.21-8 #> [7] rhdf5filters_1.12.1 vctrs_0.6.3 #> [9] tools_4.3.1 bitops_1.0-7 #> [11] stats4_4.3.1 parallel_4.3.1 #> [13] Matrix_1.5-4.1 desc_1.4.2 #> [15] S4Vectors_0.38.1 lifecycle_1.0.3 #> [17] GenomeInfoDbData_1.2.10 compiler_4.3.1 #> [19] stringr_1.5.0 textshaping_0.3.6 #> [21] codetools_0.2-19 SeuratObject_4.1.3 #> [23] GenomeInfoDb_1.36.3 htmltools_0.5.6 #> [25] sass_0.4.7 RCurl_1.98-1.12 #> [27] yaml_2.3.7 pkgdown_2.0.7 #> [29] crayon_1.5.2 jquerylib_0.1.4 #> [31] SingleCellExperiment_1.22.0 cachem_1.0.8 #> [33] DelayedArray_0.26.7 abind_1.4-5 #> [35] parallelly_1.36.0 digest_0.6.33 #> [37] stringi_1.7.12 future_1.33.0 #> [39] purrr_1.0.2 bookdown_0.35 #> [41] listenv_0.9.0 rprojroot_2.0.3 #> [43] fastmap_1.1.1 grid_4.3.1 #> [45] cli_3.6.1 magrittr_2.0.3 #> [47] S4Arrays_1.0.6 future.apply_1.11.0 #> [49] sp_2.0-0 rmarkdown_2.24 #> [51] XVector_0.40.0 matrixStats_1.0.0 #> [53] globals_0.16.2 progressr_0.14.0 #> [55] ragg_1.2.5 memoise_2.0.1 #> [57] evaluate_0.21 knitr_1.44 #> [59] GenomicRanges_1.52.0 IRanges_2.34.1 #> [61] rlang_1.1.1 Rcpp_1.0.11 #> [63] glue_1.6.2 BiocManager_1.30.22 #> [65] BiocGenerics_0.46.0 jsonlite_1.8.7 #> [67] R6_2.5.1 Rhdf5lib_1.22.1 #> [69] MatrixGenerics_1.12.3 systemfonts_1.0.4 #> [71] 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","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 (2023). anndataR: AnnData interoperability R. https://scverse.org/anndataR, https://github.com/scverse/anndataR.","code":"@Manual{, title = {anndataR: AnnData interoperability in R}, author = {Robrecht Cannoodt and Luke Zappia and Martin Morgan and Louise Deconinck}, year = {2023}, note = {https://scverse.org/anndataR, https://github.com/scverse/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$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-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-7","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-8","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-9","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-10","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-11","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$print() anndataR::AbstractAnnData$shape() anndataR::AbstractAnnData$to_HDF5AnnData() anndataR::AbstractAnnData$to_InMemoryAnnData() anndataR::AbstractAnnData$to_Seurat() anndataR::AbstractAnnData$to_SingleCellExperiment() anndataR::AbstractAnnData$var_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$print() anndataR::AbstractAnnData$shape() anndataR::AbstractAnnData$to_HDF5AnnData() anndataR::AbstractAnnData$to_InMemoryAnnData() anndataR::AbstractAnnData$to_Seurat() anndataR::AbstractAnnData$to_SingleCellExperiment() anndataR::AbstractAnnData$var_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 #> The legacy packages maptools, rgdal, and rgeos, underpinning the sp package, #> which was just loaded, will retire in October 2023. #> Please refer to R-spatial evolution reports for details, especially #> https://r-spatial.org/r/2023/05/15/evolution4.html. #> It may be desirable to make the sf package available; #> package maintainers should consider adding sf to Suggests:. #> The sp package is now running under evolution status 2 #> (status 2 uses the sf package in place of rgdal) #> Warning: Keys should be one or more alphanumeric characters followed by an underscore, setting key from rna to rna_ #> An object of class Seurat #> 5 features across 3 samples within 1 assay #> Active assay: RNA (5 features, 0 variable features)"},{"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) contributors: Danila Bredikhin danila.bredikhin@embl.de (ORCID) (gtca) [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 #> 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_"},{"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)) { 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) }"},{"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: Keys should be one or more alphanumeric characters followed by an #> underscore, setting key from rna to rna_ #> 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.1 (2023-06-16) #> 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.0 GenomeInfoDb_1.36.3 #> [7] IRanges_2.34.1 S4Vectors_0.38.1 #> [9] BiocGenerics_0.46.0 MatrixGenerics_1.12.3 #> [11] matrixStats_1.0.0 SeuratObject_4.1.3 #> [13] sp_2.0-0 BiocStyle_2.28.1 #> #> loaded via a namespace (and not attached): #> [1] xfun_0.40 bslib_0.5.1 rhdf5_2.44.0 #> [4] lattice_0.21-8 rhdf5filters_1.12.1 vctrs_0.6.3 #> [7] tools_4.3.1 bitops_1.0-7 parallel_4.3.1 #> [10] Matrix_1.5-4.1 desc_1.4.2 lifecycle_1.0.3 #> [13] GenomeInfoDbData_1.2.10 compiler_4.3.1 stringr_1.5.0 #> [16] textshaping_0.3.6 codetools_0.2-19 htmltools_0.5.6 #> [19] sass_0.4.7 RCurl_1.98-1.12 yaml_2.3.7 #> [22] pkgdown_2.0.7 crayon_1.5.2 jquerylib_0.1.4 #> [25] cachem_1.0.8 DelayedArray_0.26.7 abind_1.4-5 #> [28] parallelly_1.36.0 digest_0.6.33 stringi_1.7.12 #> [31] future_1.33.0 purrr_1.0.2 bookdown_0.35 #> [34] listenv_0.9.0 rprojroot_2.0.3 fastmap_1.1.1 #> [37] grid_4.3.1 cli_3.6.1 magrittr_2.0.3 #> [40] S4Arrays_1.0.6 future.apply_1.11.0 rmarkdown_2.24 #> [43] XVector_0.40.0 globals_0.16.2 progressr_0.14.0 #> [46] ragg_1.2.5 memoise_2.0.1 evaluate_0.21 #> [49] knitr_1.44 rlang_1.1.1 Rcpp_1.0.11 #> [52] glue_1.6.2 BiocManager_1.30.22 jsonlite_1.8.7 #> [55] R6_2.5.1 Rhdf5lib_1.22.1 systemfonts_1.0.4 #> [58] 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","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 (2023). anndataR: AnnData interoperability R. https://scverse.org/anndataR, https://github.com/scverse/anndataR.","code":"@Manual{, title = {anndataR: AnnData interoperability in R}, author = {Robrecht Cannoodt and Luke Zappia and Martin Morgan and Louise Deconinck}, year = {2023}, note = {https://scverse.org/anndataR, https://github.com/scverse/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$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-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-7","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-8","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-9","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-10","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-11","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$print() anndataR::AbstractAnnData$shape() anndataR::AbstractAnnData$to_HDF5AnnData() anndataR::AbstractAnnData$to_InMemoryAnnData() anndataR::AbstractAnnData$to_Seurat() anndataR::AbstractAnnData$to_SingleCellExperiment() anndataR::AbstractAnnData$var_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$print() anndataR::AbstractAnnData$shape() anndataR::AbstractAnnData$to_HDF5AnnData() anndataR::AbstractAnnData$to_InMemoryAnnData() anndataR::AbstractAnnData$to_Seurat() anndataR::AbstractAnnData$to_SingleCellExperiment() anndataR::AbstractAnnData$var_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 #> The legacy packages maptools, rgdal, and rgeos, underpinning the sp package, #> which was just loaded, will retire in October 2023. #> Please refer to R-spatial evolution reports for details, especially #> https://r-spatial.org/r/2023/05/15/evolution4.html. #> It may be desirable to make the sf package available; #> package maintainers should consider adding sf to Suggests:. #> The sp package is now running under evolution status 2 #> (status 2 uses the sf package in place of rgdal) #> Warning: Keys should be one or more alphanumeric characters followed by an underscore, setting key from rna to rna_ #> An object of class Seurat #> 5 features across 3 samples within 1 assay #> Active assay: RNA (5 features, 0 variable features)"},{"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) contributors: Danila Bredikhin danila.bredikhin@embl.de (ORCID) (gtca) [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 #> 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_"},{"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)) { 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) }"},{"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":""}]