GitHub - vjcitn/scviR: experimental interface between R and scvi-tools (original) (raw)

> tot = getTotalVI5k10kAdata() # retrieved on first call from Open Storage Network, cached
> tot
AnnData object with n_obs × n_vars = 10849 × 4000
    obs: 'n_genes', 'percent_mito', 'n_counts', 'batch', '_scvi_labels', '_scvi_batch', 'leiden_totalVI'
    var: 'highly_variable', 'highly_variable_rank', 'means', 'variances', 'variances_norm', 'highly_variable_nbatches'
    uns: '_scvi_manager_uuid', '_scvi_uuid', 'hvg', 'leiden', 'log1p', 'neighbors', 'umap'
    obsm: 'X_totalVI', 'X_umap', 'denoised_protein', 'protein_expression', 'protein_foreground_prob'
    layers: 'counts', 'denoised_rna'
    obsp: 'connectivities', 'distances'
> table(tot$obs$batch)

 PBMC5k PBMC10k 
   3994    6855 

> dim(xx$obsm$get("X_totalVI"))  # cell positions in 20 dimensional latent space
[1] 10849    20

Vignettes in the package show how to populate a Bioconductor SingleCellExperiment with components of this structure to help compare methods employed in the two frameworks.