Zellkonverter 1.7.3
该软件包提供了生物导体之间的轻量级接口Singlecellexperiment
数据结构和Python安达塔
基于基于单细胞分析环境。这个想法是使用户和开发人员能够轻松地在这些框架之间移动数据,以在2021欧洲杯体育投注开户R/Bioconductor和Python上构建多语言分析管道。
这readh5ad()
功能可用于阅读Singlecellexperiment
从H5AD文件。可以按照通常的方式来操纵这Singlecellexperiment文档。
库(Zellkonverter)#获取示例H5AD文件。example_h5ad <-system.file(“ extdata”,“ krumsiek11.h5ad”,package =“ zellkonverter”)readh5ad(example_h5ad)
##类:SingleCellexperiment ## DIM:11 640 ## Metadata(2):突出显示IROOT ## ASSAYS(1):X ## ROWNAMES(11):GATA2 gata2 gata1 ... egrnab gfi1 ## rowdata names(0):## colnames(640):0 1 ... 158-3 159-3 ## coldata名称(1):cell_type ## reduseddimnames(0):## mainexpname:null ## altexpnames(0):
我们也可以写一个Singlecellexperiment
到H5AD文件writeh5ad()
功能。下面在经典的Zeisel Mouse Brain数据集上证明了这一点scrnaseq包裹。然后,结果文件可以直接用于基于Python的分析框架中。
库(scrnaseq)sce_zeisel <-zeiselbraindata()out_path <-tempfile(pattern =“ .h5ad”)writeh5ad(sce_zeisel,file = out_path)
Singlecellexperiment
和安达塔
对象2021欧洲杯体育投注开户控制其Python环境的开发人员和电力用户可以直接转换Singlecellexperiment
和安达塔
对象使用sce2anndata()
和anndata2sce()
公用事业。这些功能期望网状已经与适当的版本一起加载了安达塔包裹。我们建议使用蛇怪包装在使用这些功能之前设置Python环境。
库(Basilisk)库(SCRNASEQ)seger <-segerstolpepancreasdata()roughtrip <-basiliskrun(fun = function(sce){#转换为sce to anndata:adata <-sce2anndata(sce):#等等等等#转换回SCE:anndata2sce(adata)},env = zellkonverteranndataenv(),sce = seger)
包装开发人员可以2021欧洲杯体育投注开户保证他们使用的是相同版本的python套件Zellkonverter通过使用anndatadadadepencies()
功能以设置其Python环境。
anndatadadadepencies()
## [1]“ anndata == 0.8.0”“ h5py == 3.6.0”“ hdf5 == 1.12.1”“ natsort == 8.1.0” ## [5] [5]“ numpy == 1.22.3”“包装== 21.3”“ pandas == 1.4.2”“ python == 3.8.13” ## [9]“ scipy == 1.7.3”“ sqlite == 3.38.2”
此功能也可以用于使用较旧版本的环境返回依赖项安达塔。
AnnDatadAdependencies(版本=“ 0.7.6”)
## [1]“ anndata == 0.7.6”“ h5py == 3.2.1”“ hdf5 == 1.10.6”“ natsort == 7.1.1” ## [5] [5]“ numpy == 1.20.2”“包装== 20.9”“ pandas == 1.2.4”“ scipy == 1.6.3” ## [9]“ sqlite == 3.35.5”
默认情况下Zellkonverter不要显示有关其进度的任何信息,但可以通过设置冗长= true
争论。
readh5ad(example_h5ad,verbose = true)
##类:SingleCellexperiment ## DIM:11 640 ## Metadata(2):突出显示IROOT ## ASSAYS(1):X ## ROWNAMES(11):GATA2 gata2 gata1 ... egrnab gfi1 ## rowdata names(0):## colnames(640):0 1 ... 158-3 159-3 ## coldata名称(1):cell_type ## reduseddimnames(0):## mainexpname:null ## altexpnames(0):
如果您想查看所有功能的进度消息,则可以使用setzellkonverterverbose()
功能。
#这不是在这里运行的
SessionInfo()
## R版本4.2.0修补(2022-06-02 R82447)##平台:x86_64-pc-linux-gnu(64位)### blas:/home/biocbuild/bbs-3.16-bioc/r/lib/libblas.so ## lapack:/home/biocbuild/bbs-3.16-bioc/r/lib/lib/librlapack.so ### ## ## locale:## [1] lc_ctype = en_us.utf-8 lc_numeric = c ## [3] lc_time = en_gb lc_collate = c ## [5] lc_us.us.utf-8 lc_messages = en_us.utf-8 ## [7]lc_paper = en_us.utf-8 lc_name = c ## [9] lc_address = c lc_telephone = c ## [11] lc_measurement = en_us.utf-8 lc_istientification = c ## ## ## ## ##附件:Stats图形GRDEVICES UTILS数据集方法## [8]基础## ##其他附件:## [1] Basilisk_1.9.1.1.1.1.1.1GenomicRanges_1.49.0 ## [7] GenomeInfoDb_1.33.3 IRanges_2.31.0 ## [9] S4Vectors_0.35.1 BiocGenerics_0.43.0 ## [11] MatrixGenerics_1.9.0 matrixStats_0.62.0 ## [13] zellkonverter_1.7.3 knitr_1.39 ##[15] BiocStyle_2.25.0 ## ## ##通过名称空间加载(并且未连接):## [1] Protgenerics_1.29.0 BITOPS_1.0-7 ## [3] BIT64_4.0.5FILELOCK_1.0.2 HTTR_1.4.3 ## [7] RPROJROOT_2.0.3 TOALS_4.2.0 ## [9] BSLIB_0.3.1 UTF8_1.2.2 ## [11] R6_2.5.5## [15] tidySelect_1.1.2 bit_4.0.4 ## [17] curl_4.3.2 compiler_4.2.0 ## [19] cli_3.3.3] rtracklayer_1.57.0 bookdown_0.0.27 ## [25] sass_0.4.1 rappdirs_0.3.3 ## [27] rsamtools_2.13.3 stringr_1.4.4.0 ## [29] digest_0.6.6.6.6.6.6.6.6.6.29 rmarkdown_2.14 ## _2 [31] xvector_0.0.0.0.37 pkcon。0.3 ## [33] htmltools_0.5.2.2 ensembldb_2.21.2 ## [35] dbplyr_2.2.0 fastmap_1.1.1.1.0 ## [37] rlang_1.0.2 rlang_1.0.2 rsqlite_2.1.2.14 ## [39]jquerylib_0.1.4 generics_0.1.2 ## [43]1 rcpp_1.0.8.3 ## [51] fansi_1.0.3 reticulate_1.25 ## [53] lifecycle_1.0.1 stringi_1.7.6 ## [55] yaml_2.3.5 zlibbioc_1.43.0 ## [57] BiocFileCache_2.5.0 AnnotationHub_3.5.0 ## [59] grid_4.2.0 blob_1.2.3 ## [61] parallel_4.2.0 promises_1.2.0.1 ## [63] ExperimentHub_2.5.0 crayon_1.5.1 ## [65] dir.expiry_1.5.0 lattice_0.20-45 ## [67] Biostrings_2.65.1 GenomicFeatures_1.49.5 ## [69] hms_1.1.1 KEGGREST_1.37.2 ## [71] pillar_1.7.0 rjson_0.2.21 ## [73] codetools_0.2-18 biomaRt_2.53.2 ## [75] XML_3.99-0.10 glue_1.6.2 ## [77] BiocVersion_3.16.0 evaluate_0.15 ## [79] BiocManager_1.30.18 png_0.1-7 ## [81] vctrs_0.4.1 httpuv_1.6.5 ## [83] purrr_0.3.4 assertthat_0.2.1 ## [85] cachem_1.0.6 xfun_0.31 ## [87] mime_0.12 xtable_1.8-4 ## [89] AnnotationFilter_1.21.0 restfulr_0.0.15 ## [91] later_1.3.0 tibble_3.1.7 ## [93] GenomicAlignments_1.33.0 AnnotationDbi_1.59.1 ## [95] memoise_2.0.1 ellipsis_0.3.2 ## [97] interactiveDisplayBase_1.35.0 here_1.0.1