GithubHelp home page GithubHelp logo

cellgeni / sceasy Goto Github PK

View Code? Open in Web Editor NEW
359.0 8.0 52.0 76 KB

A package to help convert different single-cell data formats to each other

License: GNU General Public License v3.0

R 100.00%

sceasy's Introduction

sceasy

sceasy is a package that helps easy conversion of different single-cell data formats to each other. Converting to AnnData creates a file that can be directly used in cellxgene which is an interactive explorer for single-cell transcriptomics datasets.

๐Ÿ’ก for h5da to rds conversion also see https://github.com/cellgeni/schard

Warning

Before installing the conda packages below please first create a new conda environment EnvironmentName and activate it. Everything else can be installed in R.

Installation

sceasy is installable either as a bioconda package:

conda install -c bioconda r-sceasy

or as an R package:

devtools::install_github("cellgeni/sceasy")

which will require the biconductor packages BiocManager and LoomExperiment:

if (!requireNamespace("BiocManager", quietly = TRUE))
    install.packages("BiocManager")

BiocManager::install(c("LoomExperiment", "SingleCellExperiment"))

To use sceasy ensure the anndata package is installed:

conda install anndata -c bioconda

Optionally, if you plan to convert between loom and anndata, please also ensure that the loompy package is installed:

conda install loompy -c bioconda

You will also need to install reticulate package:

install.packages('reticulate')

Usage

Before converting your data please load the following libraries in your R session:

library(sceasy)
library(reticulate)
use_condaenv('EnvironmentName')
loompy <- reticulate::import('loompy')

Seurat to AnnData

sceasy::convertFormat(seurat_object, from="seurat", to="anndata",
                       outFile='filename.h5ad')

AnnData to Seurat

sceasy::convertFormat(h5ad_file, from="anndata", to="seurat",
                       outFile='filename.rds')

Seurat to SingleCellExperiment

sceasy::convertFormat(seurat_object, from="seurat", to="sce",
                       outFile='filename.rds')

SingleCellExperiment to AnnData

sceasy::convertFormat(sce_object, from="sce", to="anndata",
                       outFile='filename.h5ad')

SingleCellExperiment to Loom

sceasy::convertFormat(sce_object, from="sce", to="loom",
                       outFile='filename.loom')

Loom to AnnData

sceasy::convertFormat('filename.loom', from="loom", to="anndata",
                       outFile='filename.h5ad')

Loom to SingleCellExperiment

sceasy::convertFormat('filename.loom', from="loom", to="sce",
                       outFile='filename.rds')

sceasy's People

Contributors

cakirb avatar lila14 avatar mckinsel avatar metakuni avatar nh3 avatar pablo-gar avatar prete avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sceasy's Issues

How should I run sceasy?

I have run the following code on R with the following errors::

BiocManager::install(c("LoomExperiment", "SingleCellExperiment"))
install.packages('reticulate')
devtools::install_github("cellgeni/sceasy")
library(sceasy)
library(sceasy)
library(reticulate)
use_condaenv('EnvironmentName')
loompy <- reticulate::import('loompy')

Error in py_module_import(module, convert = convert) :
ModuleNotFoundError: No module named 'loompy'

Detailed traceback:
File "/home/ali/R/x86_64-pc-linux-gnu-library/4.0/reticulate/python/rpytools/loader.py", line 44, in _import_hook
level=level

sceasy::convertFormat(NueE18.5_noWT2, from="seurat", to="anndata",outFile='NueE18.5_noWT2.h5ad'
Error in py_module_import(module, convert = convert) :
ModuleNotFoundError: No module named 'anndata'

Detailed traceback:
File "/home/ali/R/x86_64-pc-linux-gnu-library/4.0/reticulate/python/rpytools/loader.py", line 44, in _import_hook
level=level

Am I missing something?

Issue running sceasy

Hello everyone,
I am having issues running sceasy for conversion from sce object to anndata. Following repo instructions, I run:

use_condaenv('sceasy')
loompy <- reticulate::import('loompy')
sceasy::convertFormat(sce, from="sce", to="anndata",
                      outFile='out.h5ad')

and get

Error in py_module_import(module, convert = convert) : 
  ImportError: cannot import name 'IndexMixin' from 'scipy.sparse.sputils' (/home/vinko/miniconda3/envs/sceasy/lib/python3.8/site-packages/scipy/sparse/sputils.py)

My sceasy environment contains recommended versions of anndata and loompy, and newest version of scipy:

(sceasy) vinko@DESKTOP-01:~$ conda list
# packages in environment at /home/vinko/miniconda3/envs/sceasy:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                        main  
anndata                   0.6.19                   pypi_0    pypi
blas                      1.0                         mkl  
ca-certificates           2020.10.14                    0  
certifi                   2020.6.20          pyhd3eb1b0_3  
h5py                      2.10.0           py38hd6299e0_1  
hdf5                      1.10.6               hb1b8bf9_0  
intel-openmp              2020.2                      254  
ld_impl_linux-64          2.33.1               h53a641e_7  
libedit                   3.1.20191231         h14c3975_1  
libffi                    3.3                  he6710b0_2  
libgcc-ng                 9.1.0                hdf63c60_0  
libgfortran-ng            7.3.0                hdf63c60_0  
libstdcxx-ng              9.1.0                hdf63c60_0  
loompy                    2.0.17                   pypi_0    pypi
mkl                       2020.2                      256  
mkl-service               2.3.0            py38he904b0f_0  
mkl_fft                   1.2.0            py38h23d657b_0  
mkl_random                1.1.1            py38h0573a6f_0  
natsort                   7.0.1                      py_0  
ncurses                   6.2                  he6710b0_1  
numpy                     1.19.2           py38h54aff64_0  
numpy-base                1.19.2           py38hfa32c7d_0  
openssl                   1.1.1h               h7b6447c_0  
packaging                 20.4                     pypi_0    pypi
pandas                    1.1.3            py38he6710b0_0  
pip                       20.2.4           py38h06a4308_0  
pyparsing                 2.4.7                    pypi_0    pypi
python                    3.8.5                h7579374_1  
python-dateutil           2.8.1                      py_0  
pytz                      2020.1                     py_0  
readline                  8.0                  h7b6447c_0  
scipy                     1.5.3                    pypi_0    pypi
setuptools                50.3.0           py38h06a4308_1  
six                       1.15.0                     py_0  
sqlite                    3.33.0               h62c20be_0  
tk                        8.6.10               hbc83047_0  
wheel                     0.35.1                     py_0  
xz                        5.2.5                h7b6447c_0  
zlib                      1.2.11               h7b6447c_3  

I tried upgrading to anndata==0.7.1 as recommended in #7 but that had no effect.
I am on Ubuntu 20.04
Is there a solution to this problem?
Thanks,
Vinko

Anndata to Seurat Object, Error in match

Hello,

i have a relativly big anndata Object (8gb, created with version 0.8.0). Which i want to convert with convertFormat("adata_complete_selfdefinedNA.h5ad", from="anndata", to="seurat", outFile='adata_complete.rds')

after several minutes i get following error:

X -> counts
Error in match(x, table, nomatch = 0L) : 
  'match' requires vector arguments

Is there any problem with the data so that the function cannot convert it?

from AnnData to Seurat, AttributeError: 'dict' object has no attribute 'dtype'

I'm converting an h5ad file to seurat and I get the error in the title. The h5ad file is from the kallisto|bustools pipeline, but I can't share it because it contains unpublished data. I also can't find publicly available example output from kb, but if you think it would help, I can try to generate some. For context, I provide:

  • Versions of OS, R, miniconda, anndata, bustools
  • output of conda list
  • renv lockfile

I'm not familiar with the h5ad specification. Do you think this is a problem with the file, or maybe some version incompatibility? Thanks!

Versions

Ubuntu 20.04.3 focal fossa
R 4.1.2 bird hippie
conda 4.11.0
anndata                   0.6.19                     py_0    bioconda
Kallisto version: "0.46.2"
bustools version: "0.40.0"

Python packages from conda list

python_packages.txt

R packages from renv lockfile

renv.lock.txt

Traceback

Error in py_call_impl(callable, dots$args, dots$keywords) : 
AttributeError: 'dict' object has no attribute 'dtype'
7.
stop(structure(list(message = "AttributeError: 'dict' object has no attribute 'dtype'", 
call = py_call_impl(callable, dots$args, dots$keywords), 
cppstack = structure(list(file = "", line = -1L, stack = c("/home/ekernf01/.cache/R/renv/cache/v5/R-4.1/x86_64-pc-linux-gnu/reticulate/1.22/b34a8bb69005168078d1d546a53912b2/reticulate/libs/reticulate.so(Rcpp::exception::exception(char const*, bool)+0x74) [0x7fb00c5268d4]", 
"/home/ekernf01/.cache/R/renv/cache/v5/R-4.1/x86_64-pc-linux-gnu/reticulate/1.22/b34a8bb69005168078d1d546a53912b2/reticulate/libs/reticulate.so(Rcpp::stop(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)+0x29) [0x7fb00c5165e9]", ...
6.
_args_from_dict at base.py#2146
5.
_read_args_from_h5ad at read.py#496
4.
read_h5ad at read.py#446
3.
anndata$read_h5ad(inFile)
2.
func(obj, outFile = outFile, main_layer = main_layer, ...)
1.
sceasy::convertFormat("../quantification/kallisto_bustools/counts_unfiltered/adata.h5ad", 
from = "anndata", to = "seurat", outFile = "../quantification/kallisto_bustools/counts_unfiltered/seurat.rds")

Selecting assay type to convert in SCeasy

Hi,
Really enjoy this package! Way easier than other solutions.
I have run into the issue that when I convert from seurat -> anndata it only takes my RNA assay (assay = RNA), but I would prefer to convert my SCTransformed assay instead. I can't find a way to do this in your vignette.

Best regards,
Peter
University of Southern Denmark

invalid loom converted from sce

Hi,

I have his sce file ;

ldat.mod.se
class: SingleCellExperiment 
dim: 36601 10194 
metadata(0):
assays(2): counts logcounts
rownames(36601): BX004987.1 AC145212.1 ... CDY1 TTTY3
rowData names(0):
colnames(10194): AAAGAACAGAGATTCA-1 AAAGAACTCCTCAGGG-1 ... TTTGGTTCAAATCAAG-1 TTTGGAGAGACTTAAG-1
colData names(6): orig.ident nCount_spliced ... nFeature_unspliced ident
reducedDimNames(0):
altExpNames(0):

and coveted to loom by ;

convertFormat(ldat.mod.se, from = "sce", to="loom", outFile = "~/Desktop/ldat.loom")

A convention went without a hitch, and created a loom file, however,  importing this ldat.loom back in R by` read_loom` from anndata R fails ;

Error in py_call_impl(callable, dots$args, dots$keywords) : 
  KeyError: "Unable to open object (object 'attrs' doesn't exist)" 
15.
stop(structure(list(message = "KeyError: \"Unable to open object (object 'attrs' doesn't exist)\"", 
    call = py_call_impl(callable, dots$args, dots$keywords), 
    cppstack = structure(list(file = "", line = -1L, stack = c("1   reticulate.so                       0x00000001126e065e _ZN4Rcpp9exceptionC2EPKcb + 222", 
    "2   reticulate.so                       0x00000001126e8735 _ZN4Rcpp4stopERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE + 53",  ... 
14. h5py at h5o.pyx#190
13. h5py at _objects.pyx#55
12. h5py at _objects.pyx#54
11. __getitem__ at group.py#288
10. h5py at _objects.pyx#55
9. h5py at _objects.pyx#54
8. validate_spec at loom_validator.py#204
7. validate at loom_validator.py#51
6. __init__ at loompy.py#81
5. connect at loompy.py#1389
4. read_loom at read.py#194
3. python_anndata$read_loom(filename = filename, sparse = sparse, 
    cleanup = cleanup, X_name = X_name, obs_names = obs_names, 
    obsm_names = obsm_names, var_names = var_names, varm_names = varm_names, 
    dtype = dtype, ...) 
2. py_to_r(python_anndata$read_loom(filename = filename, sparse = sparse, 
    cleanup = cleanup, X_name = X_name, obs_names = obs_names, 
    obsm_names = obsm_names, var_names = var_names, varm_names = varm_names, 
    dtype = dtype, ...)) 
1. read_loom(filename = "/Volumes/Documents/R/ldat.loom") 

I tried ReadVelocity from SeuratWrappers and Velocyte.R but got the similar error;

dat.test<-ReadVelocity("/Volumes/Documents/R/ldat.loom", verbose = T)
reading loom file via hdf5r...
Error in `[[.H5File`(f, "col_attrs/CellID") : 
  An object with name col_attrs/CellID does not exist in this group

Let me know how to approach this.

Thanks.

sce to anndata error

Hi,
I'm trying to convert a SingleCellExperiment object to anndata and I get an error.

My code:

library("sceasy")
library("reticulate")
use_condaenv('/gstore/home/chintalh/miniconda3/envs/env', required = T)
tmp<- sceasy::convertFormat(merged, from="sce", to="anndata", outFile='output_merge.h5ad')

Errror:

Error in value[[3L]](cond) : 
  'assay(<SingleCellExperiment>, i="character", ...)' invalid subscript 'i'
length(Nindex) == length(dim) is not TRUE

My sce object:

> merged
class: SingleCellExperiment 
dim: 58302 32982 
metadata(3): merge.info pca.info .internal
assays(3): reconstructed counts logcounts
rownames(58302): ENSG00000210049 ENSG00000211459 ... ENSG00000200220 ENSG00000262477
rowData names(8): rotation ID ... symbol desc
colnames(32982): LIB5437925_SAM24396519_AAACCTGCATGTTCCC-1
  LIB5437925_SAM24396519_AAACCTGGTAAATGAC-1 ... LIB5437933_SAM24396523_TTTGTCATCTTCAACT-1
  LIB5437933_SAM24396523_TTTGTCATCTTGAGAC-1
colData names(37): batch Sample ... sizeFactor cluster
reducedDimNames(3): corrected TSNE UMAP
altExpNames(0):
R version 4.0.0 (2020-04-24)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.5 LTS

Matrix products: default
BLAS:   /usr/local/lib/R/lib/libRblas.so
LAPACK: /gstore/home/penikals/.conda/envs/testr/lib/libmkl_rt.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8    LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] parallel  stats4    stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] ShadowArray_0.99.25 DelayedArray_0.14.1 IRanges_2.22.2      S4Vectors_0.26.1    BiocGenerics_0.34.0 matrixStats_0.56.0 
[7] sceasy_0.0.6        reticulate_1.16    

loaded via a namespace (and not attached):
 [1] bitops_1.0-6                fs_1.5.0                    usethis_1.6.1               bit64_4.0.5                
 [5] devtools_2.3.1              httr_1.4.2                  filelock_1.0.2              rprojroot_1.3-2            
 [9] GenomeInfoDb_1.24.2         tools_4.0.0                 backports_1.1.10            R6_2.4.1                   
[13] irlba_2.3.3                 HDF5Array_1.16.1            gp.version_0.99.2           vipor_0.4.5                
[17] DBI_1.1.0                   gp.cache_0.98.8             colorspace_1.4-1            gp.auth_0.98.6             
[21] withr_2.2.0                 tidyselect_1.1.0            gridExtra_2.3               prettyunits_1.1.1          
[25] processx_3.4.3              bit_4.0.4                   curl_4.3                    compiler_4.0.0             
[29] cli_2.1.0                   Biobase_2.48.0              BiocNeighbors_1.6.0         desc_1.2.0                 
[33] scales_1.1.1                callr_3.4.3                 rappdirs_0.3.1              digest_0.6.26              
[37] rmarkdown_2.3               XVector_0.28.0              scater_1.16.3               pkgconfig_2.0.3            
[41] htmltools_0.5.0             sessioninfo_1.1.1           dbplyr_1.4.4                rlang_0.4.8                
[45] RSQLite_2.2.0               rstudioapi_0.11             DelayedMatrixStats_1.10.1   generics_0.0.2             
[49] jsonlite_1.7.0              BiocParallel_1.22.0         dplyr_1.0.2                 RCurl_1.98-1.2             
[53] magrittr_1.5                BiocSingular_1.4.0          GenomeInfoDbData_1.2.3      Matrix_1.3-4               
[57] Rhdf5lib_1.10.1             Rcpp_1.0.5                  ggbeeswarm_0.6.0            munsell_0.5.0              
[61] fansi_0.4.1                 viridis_0.5.1               lifecycle_0.2.0             yaml_2.2.1                 
[65] SummarizedExperiment_1.18.2 zlibbioc_1.34.0             rhdf5_2.32.2                BiocFileCache_1.12.1       
[69] pkgbuild_1.1.0              blob_1.2.1                  grid_4.0.0                  crayon_1.3.4               
[73] lattice_0.20-41             knitr_1.29                  ps_1.3.4                    pillar_1.4.6               
[77] GenomicRanges_1.40.0        base64url_1.4               pkgload_1.1.0               glue_1.4.2                 
[81] evaluate_0.14               getPass_0.2-2               remotes_2.2.0               vctrs_0.3.4                
[85] testthat_2.3.2              gtable_0.3.0                purrr_0.3.4                 assertthat_0.2.1           
[89] ggplot2_3.3.2               xfun_0.16                   rsvd_1.0.3                  viridisLite_0.3.0          
[93] ArtifactDB_1.0.35           SingleCellExperiment_1.10.1 tibble_3.0.4                beeswarm_0.2.3             
[97] memoise_1.1.0               ellipsis_0.3.1

Any tips appreciated, thanks!

error converting loom to sce

Hi,

When converting a loom file to sce as follows, I got the following error.

> convertFormat("skin.loom", from = "loom", to = "sce", outFile = "skin.rds" )
Error in readExchangeableLoom(inFile, backed = FALSE, main_layer_name = main_layer_name,  : 
  file.exists(filename) is not TRUE

Any help will be appreciated.

Error when converting anndata to seurat

When I use the function sceasy::convertFormat(seurat_object, from="seurat", to="anndata",outFile='filename.h5ad'), an error occurs: Error in validObject(.Object) : invalid class "DimReduc" object: invalid object for slot "cell.embeddings" in class "DimReduc": got class "data.frame", should be or extend class "matrix".

It turns out that _scvi_extra_categoricals from the obsm field is data.frame rather than matrix (numpy). It would be greatly appreciated if the function can wraps/convert dataframs as matrix objects while reading them.

[Minor] Conda installation instructions.

On my version of conda:

conda --version
conda 4.8.4

The installation instructions in the readme produce an error:

conda install anndata == 0.6.19 -c bioconda

CondaValueError: invalid package specification: ==

The following syntax works:

conda install anndata==0.6.19 -c bioconda

SCE to AnnData

Hi, thanks for SCEasy! I'm trying to convert from a single cell experiment to AnnData and get:

Error in dn[[2L]] : subscript out of bounds
Calls: ... .local -> lapply -> lapply -> FUN -> colnames -> colnames
In addition: Warning message:
In .regularise_df(as.data.frame(SummarizedExperiment::colData(obj))) :
Dropping single category variables:orig.ident
Execution halted

Example SCE RDS file attached:
EC_sce.zip

Thanks for any help,

Tim

error convert anndata to seurat

I got an error when converting anndata to seurat:

Error in h(simpleError(msg, call)) :
error in evaluating the argument 'x' in selecting a method for function 'as.matrix': 'match' requires vector arguments

it appears it has something to do with the obsm data in anndata, each of the obsm data is an array, one dimension as far as I can tell, maybe not be able to convert to a matrix?? Please advise how to fix it.

Thanks

conversion to loom from sce

Hi ,

I have this sce file;

dat.mod.se
class: SingleCellExperiment 
dim: 36601 10194 
metadata(0):
assays(2): counts logcounts
rownames(36601): BX004987.1 AC145212.1 ... CDY1 TTTY3
rowData names(0):
colnames(10194): AAAGAACAGAGATTCA-1 AAAGAACTCCTCAGGG-1 ... TTTGGTTCAAATCAAG-1 TTTGGAGAGACTTAAG-1
colData names(6): orig.ident nCount_spliced ... nFeature_unspliced ident
reducedDimNames(0):
altExpNames(0):

and converted to loom by a following warmings;

convertFormat(ldat.mod.se, from = "sce", to="loom", outFile = "~/Desktop/ldat.loom")
You created a large dataset with compression and chunking.
The chunk size is equal to the dataset dimensions.
If you want to read subsets of the dataset, you should testsmaller chunk sizes to improve read times.
You created a large dataset with compression and chunking.
The chunk size is equal to the dataset dimensions.
If you want to read subsets of the dataset, you should testsmaller chunk sizes to improve read times.
Error in H5Ldelete(h5loc = loc$H5Identifier, name = name) : 
  Specified link doesn't exist.
In addition: Warning message:
In .regularise_df(SummarizedExperiment::colData(obj), drop_single_values = drop_single_values) :
  Dropping single category variables:orig.ident, ident

Conversion successfully created a loom file however, when I tried to import the file in question to scvelo as follows;

ldata=scv.read_loom("/Volumes/Documents/R/ldat.loom")

-------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
<ipython-input-11-c43bed4d070b> in <module>
----> 1 ldata=scv.read_loom("/Volumes/Documents/R/ldat.loom")

/usr/local/Cellar/[email protected]/3.9.2_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/anndata/_io/read.py in read_loom(filename, sparse, cleanup, X_name, obs_names, obsm_names, var_names, varm_names, dtype, **kwargs)
    192     from loompy import connect
    193 
--> 194     with connect(filename, "r", **kwargs) as lc:
    195         if X_name not in lc.layers.keys():
    196             X_name = ""

/usr/local/Cellar/[email protected]/3.9.2_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/loompy/loompy.py in connect(filename, mode, validate, spec_version)
   1387                 Note: if validation is requested, an exception is raised if validation fails.
   1388 	"""
-> 1389         return LoomConnection(filename, mode, validate=validate)

/usr/local/Cellar/[email protected]/3.9.2_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/loompy/loompy.py in __init__(self, filename, mode, validate)
     79                 if validate:
     80                         lv = loompy.LoomValidator()
---> 81                         if not lv.validate(filename):
     82                                 raise ValueError("\n".join(lv.errors) + f"\n{filename} does not appead to be a valid Loom file according to Loom spec version '{lv.version}'")
     83 

/usr/local/Cellar/[email protected]/3.9.2_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/loompy/loom_validator.py in validate(self, path, strictness)
     49                         if self.version == None:
     50                                 self.version = get_loom_spec_version(f)
---> 51                         valid1 = self.validate_spec(f)
     52                         if not valid1:
     53                                 self.errors.append("For help, see http://linnarssonlab.org/loompy/format/")

/usr/local/Cellar/[email protected]/3.9.2_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/loompy/loom_validator.py in validate_spec(self, file)
    202                 if self.version == "3.0.0":
    203                         self._check("attrs" in file, "Global attributes missing")
--> 204                         for attr in file["attrs"]:
    205                                 if type(attr) is np.ndarray:
    206                                         delay_print(f"{attr: >{width}} {attr.dtype} {attr.shape}")

h5py/_objects.pyx in h5py._objects.with_phil.wrapper()

h5py/_objects.pyx in h5py._objects.with_phil.wrapper()

/usr/local/Cellar/[email protected]/3.9.2_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/h5py/_hl/group.py in __getitem__(self, name)
    286                 raise ValueError("Invalid HDF5 object reference")
    287         else:
--> 288             oid = h5o.open(self.id, self._e(name), lapl=self._lapl)
    289 
    290         otype = h5i.get_type(oid)

h5py/_objects.pyx in h5py._objects.with_phil.wrapper()

h5py/_objects.pyx in h5py._objects.with_phil.wrapper()

h5py/h5o.pyx in h5py.h5o.open()

KeyError: "Unable to open object (object 'attrs' doesn't exist)"

I got a similar error when I tried to import in R

ldat.test<-ReadVelocity("/Volumes/Documents/R/ldat.loom", verbose = T)
reading loom file via hdf5r...
Error in `[[.H5File`(f, "col_attrs/CellID") : 
  An object with name col_attrs/CellID does not exist in this group

I've been absolute getting stuck in the conversion and I'd really appreciate any help.

THanks.

> py_config()
python:         /usr/local/bin/python3
libpython:      /usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.9/lib/python3.9/config-3.9-darwin/libpython3.9.dylib
pythonhome:     /usr/local/Cellar/[email protected]/3.9.2_1/Frameworks/Python.framework/Versions/3.9:/usr/local/Cellar/[email protected]/3.9.2_1/Frameworks/Python.framework/Versions/3.9
version:        3.9.2 (default, Feb 24 2021, 13:30:36)  [Clang 12.0.0 (clang-1200.0.32.29)]
numpy:          /usr/local/lib/python3.9/site-packages/numpy
numpy_version:  1.20.1

python versions found: 
 /usr/local/bin/python3
 /usr/bin/python3
 /usr/bin/python
 /Users/me/my-test-env/bin/python

sw_vers
ProductName:	Mac OS X
ProductVersion:	10.15.7
BuildVersion:	19H512

Error when anndata to seurat

Hi,

I want to convert h5ad to seurat.

sceasy::convertFormat("scTCR.h5ad", from="anndata", to="seurat",

  •                   outFile='scTCR.rds')
    

But I had error:
Error in dimnamesGets(x, value) :
invalid dimnames given for โ€œdgCMatrixโ€ object

Do you know how to solve it?

Gou

Can't save object (assay = SCT, slote = scale.data) because of meta.features

Dear sceasy team,

I have Seurat object and I want to convert it to h5ad using assay = SCT, slot = scale.data.

sceasy:::seurat2anndata(object, outFile="object_scaled.h5ad",
                                 assay="SCT", main_layer="scale.data")

it gives me the error:

Error in py_call_impl(callable, dots$args, dots$keywords) : 
  ValueError: Variables annot. `var` must have number of columns of `X` (3000), but has 18224 rows.

Detailed traceback: 
  File "/nfs/home/mfiruleva/anaconda3/lib/python3.7/site-packages/anndata/base.py", line 672, in __init__
    filename=filename, filemode=filemode)
  File "/nfs/home/mfiruleva/anaconda3/lib/python3.7/site-packages/anndata/base.py", line 874, in _init_as_actual
    self._check_dimensions()
  File "/nfs/home/mfiruleva/anaconda3/lib/python3.7/site-packages/anndata/base.py", line 1944, in _check_dimensions
    .format(self._n_vars, self._var.shape[0]))
Calls: <Anonymous> -> <Anonymous> -> py_call_impl

The scale.data slot store 3000 variable genes (by default):

> str(object@[email protected])
 num [1:3000, 1:3011] -0.513 -0.151 2.367 -0.237 -0.108 ...
 - attr(*, "dimnames")=List of 2
  ..$ : chr [1:3000] "B4galt6" "Robo2" "Emid1" "Dock4" ...
  ..$ : chr [1:3011] "AAACCTGAGGCCATAG" "AAACCTGAGGCGATAC" "AAACCTGCATCGGGTC" "AAACGGGGTCCCTACT"

I found that the reason is the meta.features dataframe: it contains information for all the genes:

> str(object@[email protected])
'data.frame':	18224 obs. of  5 variables:
 $ sct.detection_rate   : num  0.0727 0.0877 0.1388 0.0143 0.284 ...
 $ sct.gmean            : num  0.0577 0.0674 0.1161 0.0105 0.2668 ...
 $ sct.variance         : num  0.113 0.118 0.26 0.018 0.535 ...
 $ sct.residual_variance: num  0.919 0.885 1.59 1.623 1.013 ...
 $ sct.variable         : logi  FALSE FALSE TRUE TRUE FALSE FALSE ...

If I run something like this one:

object@[email protected] <- object@[email protected] %>%
  tibble::rownames_to_column('gene') %>%
  filter(gene %in% rownames(object@[email protected])) %>%
  tibble::column_to_rownames('gene')

Everything works fine for me.

Best wishes,
Maria

Converting SCE to LOOM obs and var attribute names

Hi,
I was recently trying to convert an SCE object to loom and I noticed the sce2loom function contains the line:
colnames_attr = "obs_names", rownames_attr = "var_names"
which I changed to:
colnames_attr = "CellID", rownames_attr = "Gene"
in order to get my downstream analysis to work.

I was curious if there was a reason you did this as LOOM documentation suggests "CellID" and "Gene"?

Thanks in advance!
Simon

Transformation from AnnData/Loom produces SCE object that R doesn't seem to like

sce to anndata - Adata does not contain a `counts` layer in `adata.layers[`counts`]`

Hello,

I have a singleCellExeriment

> counts_SCE
class: SingleCellExperiment 
dim: 277 3276 
metadata(0):
assays(2): counts logcounts
rownames(277): CD80 CD86 ... CD4 CD340-erb-B2-HER-2
rowData names(0):
colnames(3276): 2_CTGATCCAGGCTGAAC-1 4_AATGCCATCCAAGCTA-1 ... 6_AGCGATTAGAAGCGCT-1 6_CAGTGCGAGTAGGAAG-1
colData names(78): nCount_RNA nFeature_RNA ... n_cells ident

I convert to h5ad with

sceasy::convertFormat(counts_SCE, from="sce", to="anndata", outFile='software/scib-pipeline/data/pbmc_CD8.h5ad')

Then I call a third party pipeline that gives me the error, that I don't understand (I am R user only)

Adata does not contain a `counts` layer in `adata.layers[`counts`]`

should I change the name of the sce assays? I also tried

sceasy::convertFormat(counts_SCE, from="sce", to="anndata", main_layer = "counts", transfer_layers = "counts",  outFile='software/scib-pipeline/data/pbmc_CD8.h5ad')

With no improvements.

Any idea why a counts is expected in anndata, when counts is already an assay names counts?

Error for anndata to seurat conversion

Hello,

I installed sceasy and tried running sceasy::convertFormat("input.h5ad", from="anndata", to="seurat",outFile='output.rds')
but I got the following error
Error in py_convert_pandas_df(x) : Not compatible with STRSXP: [type=list].

I have the following package versions
sceasy 0.0.6 reticulate 1.25 scipy 1.7.1 pandas 1.1.4 numpy 1.19.4

Do you have any idea what could be going on ?

Thanks for the help!

Updating dependencies

Is there a chance that sceasy will be updated to use current versions of anndata and scipy? As of February 2022, the most recent version of of anndata is 0.9 and scipy is 1.8.

Which seuart data was converted to adata.X?

HI,
I have three data in my seurat object
object@assays$RNA@counts
object@assays$RNA@data
object@assays$[email protected]

sceasy::convertFormat(object, from="seurat", to="anndata",
                       outFile='filename.h5ad')

my question is which data was converted to adata.X in my h5ad object?

Regards

AnnData -> SingleCellExperiment planned?

Love the repo! It's made my analysis much more versatile and saved me a ton of time. Is there anything planned to go from anndata to singlecellexperiment? I'm having issues with Seurat::as.SingleCellExperiment, so I can't do AnnData -> Seurat -> SCE

Seurat to SCE error "Error: Unsupported conversion from "seurat" to "sce"

Hi. Do you have any idea why this doesn't work?

> library(sceasy)
Loading required package: reticulate
> library(reticulate)
> use_condaenv(condaenv = "scgen-env", required = TRUE)
> loompy <- reticulate::import('loompy')
> #Seurat to SingleCellExperiment
> sceasy::convertFormat(TC.combinedFINAL, from="seurat", to="sce",
+                       outFile='TC.combinedFINALsce.rds')
Error: Unsupported conversion from "seurat" to "sce"

Installation issue with conda

There's an issue with the anndata install.

I'm installing with:
conda create --yes --name sceasy; conda activate sceasy; conda install -c bioconda r-sceasy==0.0.5

When I enter python and import anndata I get this error:

ImportError: cannot import name 'IndexMixin' from 'scipy.sparse.sputils'

This appears to be an scipy/anndata issue that was later resolved, but we have to use anndata 0.6.19 with sceasy. What should I do to ameliorate this?

RStudio crashing with convertFormat - Anndata to Seurat

I am working on a remote server and activated a conda environment : scRNAsaran. I am running the convertFormat command shown below and it will run for 15 minutes before my Rstudio session crashes unexpectedly so I am unsure of what is happening. My session info is posted below. Any suggestions?

ibrary(anndata)
library(reticulate)
library(sceasy)
loompy <- reticulate::import('loompy')
use_condaenv('scRNAsaran')

ad <- read_h5ad("./t-cells.h5ad")
sceasy::convertFormat("./t-cells.h5ad", from="anndata", to="seurat",
                      outFile='./tcells.rds')
R version 4.1.0 (2021-05-18)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.5 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
LAPACK: /home/saran/.local/share/r-miniconda/envs/r-reticulate/lib/libmkl_rt.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8    LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] sceasy_0.0.7       reticulate_1.20    anndata_0.7.5.2    SeuratObject_4.0.2 Seurat_4.0.3      

loaded via a namespace (and not attached):
  [1] nlme_3.1-152            matrixStats_0.63.0-9003 spatstat.sparse_2.0-0   RcppAnnoy_0.0.19       
  [5] RColorBrewer_1.1-2      httr_1.4.2              sctransform_0.3.3       tools_4.1.0            
  [9] utf8_1.2.2              R6_2.5.0                irlba_2.3.3             rpart_4.1-15           
 [13] KernSmooth_2.23-20      uwot_0.1.10             mgcv_1.8-35             DBI_1.1.1              
 [17] lazyeval_0.2.2          colorspace_2.0-2        tidyselect_1.1.1        gridExtra_2.3          
 [21] compiler_4.1.0          plotly_4.9.4.1          scales_1.1.1            lmtest_0.9-38          
 [25] spatstat.data_2.1-0     ggridges_0.5.3          pbapply_1.5-0           rappdirs_0.3.3         
 [29] goftest_1.2-2           stringr_1.4.0           digest_0.6.27           spatstat.utils_2.2-0   
 [33] pkgconfig_2.0.3         htmltools_0.5.1.1       parallelly_1.27.0       fastmap_1.1.0          
 [37] htmlwidgets_1.5.3       rlang_0.4.11            shiny_1.6.0             generics_0.1.0         
 [41] zoo_1.8-9               jsonlite_1.7.2          ica_1.0-2               dplyr_1.0.7            
 [45] magrittr_2.0.1          patchwork_1.1.1         Matrix_1.3-3            Rcpp_1.0.7             
 [49] munsell_0.5.0           fansi_0.5.0             abind_1.4-5             lifecycle_1.0.0        
 [53] stringi_1.7.3           MASS_7.3-54             Rtsne_0.15              plyr_1.8.6             
 [57] grid_4.1.0              parallel_4.1.0          listenv_0.8.0           promises_1.2.0.1       
 [61] ggrepel_0.9.1           crayon_1.4.1            miniUI_0.1.1.1          deldir_0.2-10          
 [65] lattice_0.20-44         cowplot_1.1.1           splines_4.1.0           tensor_1.5             
 [69] pillar_1.6.2            igraph_1.2.6            spatstat.geom_2.2-2     future.apply_1.7.0     
 [73] reshape2_1.4.4          codetools_0.2-18        leiden_0.3.9            glue_1.4.2             
 [77] data.table_1.14.0       png_0.1-7               vctrs_0.3.8             httpuv_1.6.1           
 [81] gtable_0.3.0            RANN_2.6.1              purrr_0.3.4             spatstat.core_2.3-0    
 [85] polyclip_1.10-0         tidyr_1.1.3             scattermore_0.7         future_1.21.0          
 [89] assertthat_0.2.1        ggplot2_3.3.5           mime_0.11               xtable_1.8-4           
 [93] later_1.2.0             survival_3.2-11         viridisLite_0.4.0       tibble_3.1.3           
 [97] cluster_2.1.2           globals_0.14.0          fitdistrplus_1.1-5      ellipsis_0.3.2         
[101] ROCR_1.0-11  

convert to loom from sce error

This is your SCE data

> sce
class: SingleCellExperiment 
dim: 230 80 
metadata(0):
assays(2): counts logcounts
rownames(230): MS4A1 CD79B ... SPON2 S100B
rowData names(5): vst.mean vst.variance vst.variance.expected vst.variance.standardized vst.variable
colnames(80): ATGCCAGAACGACT CATGGCCTGTGCAT ... GGAACACTTCAGAC CTTGATTGATCTTC
colData names(8): orig.ident nCount_RNA ... RNA_snn_res.1 ident
reducedDimNames(2): PCA TSNE
spikeNames(0):

This is my sce data

> seur_sce
class: SingleCellExperiment 
dim: 31053 1011 
metadata(0):
assays(2): counts logcounts
rownames(31053): Xkr4 Gm1992 ... Vmn2r122 CAAA01147332.1
rowData names(0):
colnames(1011): AAACCCACACCAGTAT-1 AAACCCAGTCACCTTC-1 ... TTTGTTGGTGTCATTG-1 TTTGTTGTCCGCAACG-1
colData names(4): orig.ident nCount_RNA nFeature_RNA ident
reducedDimNames(0):
spikeNames(0):

When i run the line

sce_loom <- sceasy:::convertFormat(seur_sce, from="sce", to="loom", outFile='/Users/sm42/Sceasy/Test/sce_loom_data.loom')

This error is produced

Error in (function (classes, fdef, mtable) : unable to find an inherited method for function โ€˜NSBSโ€™ for signature โ€˜"list"โ€™

i have attached my file im trying to use
seur_sce_data.rds.zip

Problems setting up the proper environment

I've been struggling with this package for several days, can't seem to figure out how this is supposed to be set up (I've never used R and don't have a lot of experience with this type of thing.

I'm on a Mac, using either Terminal or Rstudio to install the packages I'm supposed to have to run sceasy. But I'm very confused about where certain commands are supposed to executed from...

In RStudio I've installed sceasy and the Rstudio dev version of reticulate (https://github.com/rstudio/reticulate) and I've loaded the seurat object that I'm trying to convert.

In Terminal I've created a new conda environment, activated it, and installed the anndata package as instructed.

But when I go back to Rstudio to run sceasy, I get an error that there is no module named 'anndata'. So I tried to make sure I was using the conda environment that I opened by running the following in Rstudio: use_condaenv('myenv'). But I get the following error:

Error in use_python(python, required = required) :
Specified version of python '/Users/bme_admin/opt/miniconda3/envs/myenv/bin/python' does not exist.

I don't understand how the connection works between python, conda, and R in this situation and how to get them to be communicating... I don't fully understand which commands from the sceasy instructions are supposed to be used in Terminal vs in python vs in R.

What I'm trying to do should be pretty simple, I just want to convert this seurat object from the NIH repository (https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=gse183852), filename GSE183852_DCM_Nuclei.Robj, into an h5ad file so I can explore it in python, which is what I'm more comfortable with. But I can't seem to understand how to set myself up correctly. Thank you in advance for any advice!

The big issue about converting h5ad into seurat rds

Hi Developers,
I encounter issue that it was go wrong when running the Seurat NormalizeData in the object through the h5ad convert into seurat rds
The error lying below:
Calls: NormalizeData ... NormalizeData.Seurat -> [[<- -> [[<- -> Key -> Key.Seurat -> vapply

Hope to update the sceasy to avoid this issue? i would sent this message to Seurat Lab to dig out what happen in it and solved hopefully it.

Best,
Hanhuihoing

Size limit of Seurat object to convert to Anndata

Hello! Does sceasy have size limit for converting Seurat objects to Anndata format?

When I convert a 8GB Seurat object it was successful and quick. But when I try to process 10GB Seurat object, it processes for a long time (~20minutes) and always crashes my R/Rstudio run, which I tried many times. Thank you!

Plans to submit to BioC?

I would be very interested in seeing this package submitted to Bioconductor. Are there any plans for this? For starters, I would be very pleased to be able to excise the monocle conversion code out of scran if I had a central "conversion hub" package that I could move that code to.

Depending on basilisk's progress, you may even be able to alleviate your SystemRequirements.

Evaluation error: Exception: Data must be 1-dimensional

Dear sceasy team,

I try to conver Seurat object to h5ad and get this error in any case, except of integrated object.

data can be any Seurat object performed using standard approaches.

library(Seurat)
load('data.RData')
library(reticulate)
use_condaenv('anaconda3', required = T)
loompy <- reticulate::import('loompy')

adata <- sceasy:::seurat2anndata(data, outFile="data.h5ad")
Error in py_call_impl(callable, dots$args, dots$keywords) : 
  Evaluation error: Exception: Data must be 1-dimensional

Detailed traceback: 
  File "/nfs/home/mfiruleva/.local/lib/python3.7/site-packages/pandas/core/frame.py", line 985, in from_dict
    return cls(data, index=index, columns=columns, dtype=dtype)
  File "/nfs/home/mfiruleva/.local/lib/python3.7/site-packages/pandas/core/frame.py", line 348, in __init__
    mgr = self._init_dict(data, index, columns, dtype=dtype)
  File "/nfs/home/mfiruleva/.local/lib/python3.7/site-packages/pandas/core/frame.py", line 459, in _init_dict
    return _arrays_to_mgr(arrays, data_names, index, columns, dtype=dtype)
  File "/nfs/home/mfiruleva/.local/lib/python3.7/site-packages/pandas/core/frame.py", line 7359, in _arrays_to_mgr
    arrays = _homogenize(arrays, index, dtype)
  File "/nfs/home/mfiruleva/.local/lib/python3.7/site-packages/pandas/core/frame.py", line 7669, in _homogenize
    raise_cast_failure=False)
  File "/nfs/home/mfiruleva/.local/lib/python3.7/site-packages/pandas/core/series
In addition: Warning message:
In .regularise_df([email protected]) :
  Dropping single category variables:orig.ident

Session info:

R version 3.6.0 (2019-04-26)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.2 LTS

Matrix products: default
BLAS:   /scratch/opt/R/3.6.0/lib/R/lib/libRblas.so
LAPACK: /nfs/home/mfiruleva/anaconda3/lib/libmkl_rt.so

locale:
 [1] LC_CTYPE=ru_RU.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=ru_RU.UTF-8        LC_COLLATE=ru_RU.UTF-8    
 [5] LC_MONETARY=ru_RU.UTF-8    LC_MESSAGES=C             
 [7] LC_PAPER=ru_RU.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=ru_RU.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] reticulate_1.12 Seurat_3.1.0   

loaded via a namespace (and not attached):
 [1] nlme_3.1-139           tsne_0.1-3             bitops_1.0-6          
 [4] RcppAnnoy_0.0.12       RColorBrewer_1.1-2     httr_1.4.1            
 [7] sctransform_0.2.0.9000 tools_3.6.0            backports_1.1.4       
[10] R6_2.4.0               irlba_2.3.3            KernSmooth_2.23-15    
[13] uwot_0.1.3             lazyeval_0.2.2         colorspace_1.4-1      
[16] npsurv_0.4-0           tidyselect_0.2.5       gridExtra_2.3         
[19] compiler_3.6.0         plotly_4.9.0           caTools_1.17.1.2      
[22] scales_1.0.0           lmtest_0.9-37          ggridges_0.5.1        
[25] pbapply_1.4-2          stringr_1.4.0          digest_0.6.20         
[28] R.utils_2.9.0          pkgconfig_2.0.2        htmltools_0.4.0       
[31] bibtex_0.4.2           htmlwidgets_1.5.1      rlang_0.4.0           
[34] zoo_1.8-6              jsonlite_1.6           ica_1.0-2             
[37] gtools_3.8.1           dplyr_0.8.3            R.oo_1.22.0           
[40] magrittr_1.5           sceasy_0.0.1           Matrix_1.2-17         
[43] Rcpp_1.0.2             munsell_0.5.0          ape_5.3               
[46] lifecycle_0.1.0        R.methodsS3_1.7.1      stringi_1.4.3         
[49] gbRd_0.4-11            MASS_7.3-51.4          gplots_3.0.1.1        
[52] Rtsne_0.15             plyr_1.8.4             grid_3.6.0            
[55] parallel_3.6.0         gdata_2.18.0           listenv_0.7.0         
[58] ggrepel_0.8.1          crayon_1.3.4           lattice_0.20-38       
[61] cowplot_1.0.0          splines_3.6.0          SDMTools_1.1-221.1    
[64] zeallot_0.1.0          pillar_1.4.2           igraph_1.2.4.1        
[67] future.apply_1.3.0     reshape2_1.4.3         codetools_0.2-16      
[70] leiden_0.3.1           glue_1.3.1             lsei_1.2-0            
[73] metap_1.1              data.table_1.12.2      RcppParallel_4.4.3    
[76] vctrs_0.2.0            png_0.1-7              Rdpack_0.11-0         
[79] gtable_0.3.0           RANN_2.6.1             purrr_0.3.2           
[82] tidyr_1.0.0            future_1.14.0          assertthat_0.2.1      
[85] ggplot2_3.2.1          rsvd_1.0.2             survival_2.44-1.1     
[88] viridisLite_0.3.0      tibble_2.1.3           cluster_2.0.8         
[91] globals_0.12.4         fitdistrplus_1.0-14    ROCR_1.0-7 

Can't install sceasy with Conda

Dear sceasy Team,
I can't get sceasy installed within a Conda environment. Creating a bare new Conda environment I'm getting the output listed below which misses concrete infos on the reported UnsatisfiableError. Same issues when I first install r-base=3.6 or r-base3.7 or r-base=4.1. Could you please give more detailed infos on how to install sceasy within a Conda environment and check yourself if that installation is working. From the behavior I see, I would think there could be an issue with the Conda rule for installing sceasy that your team had contributed to Anaconda. Many thanks. Andre

=======================
conda install -c bioconda r-sceasy
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: -
Found conflicts! Looking for incompatible packages.
This can take several minutes. Press CTRL-C to abort.
failed

UnsatisfiableError: The following specifications were found to be incompatible with each other:

Output in format: Requested package -> Available versions

delineate R package with conda environment (suggestion)

Requiring definite conda environment for R package to work puts users at disadvantage. If there are any issues in installation, user has to deal with both R and conda now, which is a pain. Reticulate package cannot access the modules available even if user supplies conda environment externally, like Code. Installation now is frustrating as user has to deal with both conda packaging and R (reticulate). If making package user friendly, please post the instructions like ELI5 so that new users try the package. At this point, installation is any thing but easy.

No anndata to other format conversion

I would like to test anndata to seurat conversion by calling convertFormat function. But it turned out there is no "from anndata" option. Did i miss anything?

Thanks a lot!

convertFormat
function (obj, from = c("seurat", "sce", "loom"), to = c("anndata",
"loom", "sce"), outFile = NULL, main_layer = NULL, ...)
{
from <- match.arg(from)
to <- match.arg(to)
tryCatch({
func <- eval(parse(text = paste(from, to, sep = "2")))
}, error = function(e) {
stop(paste0("Unsupported conversion from "", from, "" to "",
to, """), call. = FALSE)
}, finally = {
})
return(func(obj, outFile = outFile, main_layer = main_layer,
...))
}

Issue converting Seurat obj to h5ad Anndata

I get an following error after firing this command, convertFormat(pbmc10k, from = "seurat", to="anndata", outFile = "~/Desktop/pbmc.h5ad") ;

Error in py_call_impl(callable, dots$args, dots$keywords) : 
  AttributeError: 'module' object has no attribute '__import__'
In addition: Warning message:
In .regularise_df([email protected], drop_single_values = drop_single_values) :

and traceback is ;

Error in py_call_impl(callable, dots$args, dots$keywords) : 
  AttributeError: 'module' object has no attribute '__import__' 
13. stop(structure(list(message = "AttributeError: 'module' object has no attribute '__import__'", 
    call = py_call_impl(callable, dots$args, dots$keywords), 
    cppstack = structure(list(file = "", line = -1L, stack = c("1   reticulate.so                       0x000000013b8f565e _ZN4Rcpp9exceptionC2EPKcb + 222", 
    "2   reticulate.so                       0x000000013b8fd735 _ZN4Rcpp4stopERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE + 53",  ... 
12. initialize at loader.py#13
11. loader$initialize(py_module_loaded) 
10. py_inject_hooks() 
9. ensure_python_initialized() 
8. reticulate::import_builtins(convert = FALSE) 
7. .rs.reticulate.onPythonInitialized() 
6. callback() 
5. initialize_python(required_module, use_environment) 
4. ensure_python_initialized(required_module = module) 
3. reticulate::import("anndata", convert = FALSE) 
2. func(obj, outFile = outFile, main_layer = main_layer, ...) 
1. convertFormat(pbmc10k, from = "seurat", to = "anndata", outFile = "~/Desktop/pbmc.h5ad") 

I am not exactly sure what a "AttributeError: 'module' object has no attribute 'import'" means and evidently, the issue may lie in the Seurat obj in question but I am not sure how to approach it. Any help will be appreciated.

> pbmc10k
An object of class Seurat 
130469 features across 10194 samples within 4 assays 
Active assay: RNA (36601 features, 2000 variable features)
 3 other assays present: unspliced, spliced, SCT
 2 dimensional reductions calculated: pca, umap

> DefaultAssay(pbmc10k)
[1] "RNA"
> sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Catalina 10.15.7

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats4    parallel  stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] SeuratDisk_0.0.0.9017       SeuratObject_4.0.0          Seurat_4.0.0               
 [4] sceasy_0.0.6                reticulate_1.18             remotes_2.2.0              
 [7] BiocManager_1.30.10         slingshot_1.9.1             princurve_2.1.6            
[10] TFBSTools_1.28.0            monocle3_0.2.3.0            SingleCellExperiment_1.12.0
[13] SummarizedExperiment_1.20.0 GenomicRanges_1.42.0        GenomeInfoDb_1.26.2        
[16] IRanges_2.24.1              S4Vectors_0.28.1            MatrixGenerics_1.2.1       
[19] matrixStats_0.58.0          Biobase_2.50.0              BiocGenerics_0.36.0        

loaded via a namespace (and not attached):
  [1] utf8_1.1.4                  R.utils_2.10.1              tidyselect_1.1.0           
  [4] poweRlaw_0.70.6             RSQLite_2.2.3               AnnotationDbi_1.52.0       
  [7] htmlwidgets_1.5.3           grid_4.0.3                  BiocParallel_1.24.1        
 [10] Rtsne_0.15                  munsell_0.5.0               codetools_0.2-18           
 [13] ica_1.0-2                   future_1.21.0               miniUI_0.1.1.1             
 [16] withr_2.4.1                 colorspace_2.0-0            rstudioapi_0.13            
 [19] ROCR_1.0-11                 tensor_1.5                  listenv_0.8.0              
 [22] GenomeInfoDbData_1.2.4      polyclip_1.10-0             bit64_4.0.5                
 [25] rprojroot_2.0.2             parallelly_1.23.0           vctrs_0.3.6                
 [28] generics_0.1.0              xfun_0.21                   R6_2.5.0                   
 [31] hdf5r_1.3.3                 bitops_1.0-6                spatstat.utils_2.0-0       
 [34] cachem_1.0.4                DelayedArray_0.16.1         assertthat_0.2.1           
 [37] promises_1.2.0.1            scales_1.1.1                gtable_0.3.0               
 [40] globals_0.14.0              processx_3.4.5              goftest_1.2-2              
 [43] seqLogo_1.56.0              rlang_0.4.10                splines_4.0.3              
 [46] rtracklayer_1.50.0          lazyeval_0.2.2              reshape2_1.4.4             
 [49] abind_1.4-5                 httpuv_1.5.5                tools_4.0.3                
 [52] ggplot2_3.3.3               ellipsis_0.3.1              RColorBrewer_1.1-2         
 [55] ggridges_0.5.3              Rcpp_1.0.6                  plyr_1.8.6                 
 [58] zlibbioc_1.36.0             purrr_0.3.4                 RCurl_1.98-1.2             
 [61] ps_1.5.0                    prettyunits_1.1.1           rpart_4.1-15               
 [64] deldir_0.2-10               pbapply_1.4-3               viridis_0.5.1              
 [67] cowplot_1.1.1               zoo_1.8-8                   ggrepel_0.9.1              
 [70] cluster_2.1.1               tinytex_0.29                magrittr_2.0.1             
 [73] data.table_1.14.0           scattermore_0.7             lmtest_0.9-38              
 [76] RANN_2.6.1                  fitdistrplus_1.1-3          hms_1.0.0                  
 [79] patchwork_1.1.1             mime_0.10                   xtable_1.8-4               
 [82] XML_3.99-0.5                gridExtra_2.3               compiler_4.0.3             
 [85] tibble_3.1.0                KernSmooth_2.23-18          crayon_1.4.1               
 [88] R.oo_1.24.0                 htmltools_0.5.1.1           mgcv_1.8-34                
 [91] later_1.1.0.1               tidyr_1.1.2                 DBI_1.1.1                  
 [94] MASS_7.3-53.1               rappdirs_0.3.3              Matrix_1.3-2               
 [97] readr_1.4.0                 cli_2.3.1                   R.methodsS3_1.8.1          
[100] igraph_1.2.6                pkgconfig_2.0.3             GenomicAlignments_1.26.0   
[103] TFMPvalue_0.0.8             plotly_4.9.3                annotate_1.68.0            
[106] DirichletMultinomial_1.32.0 XVector_0.30.0              stringr_1.4.0              
[109] callr_3.5.1                 digest_0.6.27               sctransform_0.3.2          
[112] RcppAnnoy_0.0.18            pracma_2.3.3                CNEr_1.26.0                
[115] spatstat.data_2.0-0         Biostrings_2.58.0           leiden_0.3.7               
[118] uwot_0.1.10                 curl_4.3                    shiny_1.6.0                
[121] Rsamtools_2.6.0             gtools_3.8.2                lifecycle_1.0.0            
[124] nlme_3.1-152                jsonlite_1.7.2              viridisLite_0.3.0          
[127] BSgenome_1.58.0             fansi_0.4.2                 pillar_1.5.0               
[130] lattice_0.20-41             KEGGREST_1.30.1             fastmap_1.1.0              
[133] httr_1.4.2                  pkgbuild_1.2.0              survival_3.2-7             
[136] GO.db_3.12.1                glue_1.4.2                  spatstat_1.64-1            
[139] png_0.1-7                   bit_4.0.4                   stringi_1.5.3              
[142] blob_1.2.1                  caTools_1.18.1              memoise_2.0.0              
[145] dplyr_1.0.4                 irlba_2.3.3                 future.apply_1.7.0         
[148] ape_5.4-1                  
>
pip show loompy
Name: loompy
Version: 3.0.6
Summary: Work with Loom files for single-cell RNA-seq data
Home-page: https://github.com/linnarsson-lab/loompy
Author: Linnarsson Lab
Author-email: [email protected]
License: BSD
Location: /usr/local/lib/python3.8/site-packages
Requires: numba, numpy, click, h5py, setuptools, numpy-groupies, scipy
Required-by: scvelo
pip show anndata
Name: anndata
Version: 0.7.5
Summary: Annotated Data.
Home-page: http://github.com/theislab/anndata
Author: Philipp Angerer, Alex Wolf, Isaac Virshup, Sergei Rybakov
Author-email: [email protected], [email protected]
License: BSD-3-Clause
Location: /usr/local/lib/python3.8/site-packages
Requires: natsort, scipy, pandas, numpy, packaging, h5py
Required-by: scvelo, scanpy

ERROR IN sceasy instructions, loompy part

Hi. I can't get the sceasy package right. I installed loompy successfully in terminal, and yet when I run the code below, I get stuck at the loompy part, saying that there's no loompy. Please advise. Thank you!

> library(sceasy)
Loading required package: reticulate
> library(reticulate)
> use_condaenv('scgen_env')
> loompy <- reticulate::import('loompy')
Error in py_module_import(module, convert = convert) : 
  ModuleNotFoundError: No module named 'loompy'

Default conda installation instructions for searat -> h5ad convert not working

On OSX it took a bit of trial & error to get the environment of sceasy working.

I used mamba over conda because it is faster, but should result in the same env:

mamba create -n sceasy r-sceasy python=3

Some deps were not installed properly, so had to reinstall openblas and r-stringi:

conda install anndata==0.6.19 -c bioconda
mamba install -c conda-forge openblas
mamba remove r-stringi
mamba install r-stringi r-sceasy

Then there is some funkiness with anndata not working with the scipy env:

pip install scipy==1.2.1

After that things worked fine. Maybe adding some of these notes to the README could be helpful. That being said: compared to most bioinf tools this was pretty easy to install, so kudos ๐Ÿ‘

Unable to convert Seurat object to H5AD

Hello.
I've successfully created a condo environment and installed anndata==0.6.19 scipy==1.2.1 :

conda create -n h5ad anndata==0.6.19 scipy==1.2.1 loompy -c bioconda --yes

Within this new anaconda environment I've started up R and installed reticulate and r-sceasy (with all dependencies).

I can read in my Seurat RDS object but the conversion to H5AD fails.
Here is the R code I'm using:

library(sceasy)
library(reticulate)
use_condaenv("/home/dfermin/anaconda3/envs/h5ad")

seurat_obj <- readRDS("../data/suerat_10K.RDS")
sceasy::convertFormat(seurat_obj, from="seurat", to="anndata", outFile="../data/seurat_10K.h5ad")

The error message I get is:

Error in py_module_import(module, convert = convert) :
ImportError: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /home/dfermin/anaconda3/envs/h5ad/lib/python3.7/site-packages/pandas/_libs/window/aggregations.cpython-37m-x86_64-linux-gnu.so)

Detailed traceback:
File "/opt/R-4.1.1/lib64/R/library/reticulate/python/rpytools/loader.py", line 44, in _import_hook 
level=level
File "/home/dfermin/anaconda3/envs/h5ad/lib/python3.7/site-packages/anndata/__init__.py", line 1, in <module>
from .base import AnnData
File "/opt/R-4.1.1/lib64/R/library/reticulate/python/rpytools/loader.py", line 44, in _import_hook
level=level
File "/home/dfermin/anaconda3/envs/h5ad/lib/python3.7/site-packages/anndata/base.py", line 15, in <module>
import pandas as pd
File "/opt/R-4.1.1/lib64/R/library/reticulate/python/rpytools/loader.py", line 44, in _import_hook
level=level
File "/home/dfermin/anaconda3/envs/h5ad/lib/python3.7/site-packages/pandas/__init__.py", line 50, in <module>
from pandas.core

Which seems a bit strange since that GLIBCXX library is installed in the environment:

strings /home/dfermin/anaconda3/envs/h5ad/lib/* | grep 3.4.21
GLIBCXX_3.4.21
GLIBCXX_3.4.21
GLIBCXX_3.4.21
GLIBCXX_3.4.21
GLIBCXX_3.4.21
GLIBCXX_3.4.21

Any suggestions how I can fix this?

In case it helps I can find/use the correct python environment in R:

> reticulate::py_discover_config()
python:         /home/dfermin/anaconda3/envs/h5ad/bin/python
libpython:      /home/dfermin/anaconda3/envs/h5ad/lib/libpython3.7m.so
...

[import of anndata] Error in `match(x, table, nomatch = 0L)`: 'match' requires vector arguments

Hello,
I found the case where Sceasy is NOT working (test h5ad file is not important, please use any one):

library(tools)
library(here)

library(reticulate)
use_virtualenv(here::here(".venv"))

library(Seurat)
library(sceasy)
library(anndata)

data_folder <- here::here("tests/data")
anndata_file_name = "plateletOutput.h5ad"

test_that("AnnData to Seurat conversion", {
  anndata_path <- paste(data_folder, "/", anndata_file_name, sep = "")
  seurat_path <- paste(data_folder, "/", file_path_sans_ext(anndata_file_name), ".rds", sep = "")
  
  sceasy::convertFormat(anndata_path, from = "anndata", to = "seurat", outFile = seurat_path)
  
  seurat_object <- readRDS(seurat_path)
  expect_false(is.null(seurat_object))

  # library(anndata)
  ad_object <- read_h5ad(anndata_path, backed="r")
  expect_false(is.null(ad_object))
})

Output:

> devtools::test()
โ„น Testing scripts
โœ” | F W S  OK | Context
โ  |         0 | converter
Attaching SeuratObject
Attaching sp
/Users/andrey_isaev/Documents/GitHub/โ€ฆ/scripts/.venv/lib/python3.9/site-packages/anndata/_core/anndata.py:121: ImplicitModificationWarning: Transforming to str index.
  warnings.warn("Transforming to str index.", ImplicitModificationWarning)
X -> counts
โœ– | 1       0 | converter [11.3s]                                                                                     
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
Error (test-converter.R:18:3): AnnData to Seurat conversion
Error in `match(x, table, nomatch = 0L)`: 'match' requires vector arguments
Backtrace:
 1. sceasy::convertFormat(...)
      at test-converter.R:18:2
 2. sceasy (local) func(obj, outFile = outFile, main_layer = main_layer, ...)
 3. base::sapply(...)
 4. base::lapply(X = X, FUN = FUN, ...)
 5. sceasy (local) FUN(X[[i]], ...)
 8. anndata:::`[.collections.abc.Mapping`(ad$obsm, x)
 9. name %in% x$keys()

โ•โ• Results 
Duration: 11.5 s

[ FAIL 1 | WARN 0 | SKIP 0 | PASS 0 ]

Similar code. The case where Sceasy is working:

library(tools)
library(here)

library(reticulate)
use_virtualenv(here::here(".venv"))

library(Seurat)
library(sceasy)
# library(anndata)

data_folder <- here::here("tests/data")
anndata_file_name = "plateletOutput.h5ad"

test_that("AnnData to Seurat conversion", {
  anndata_path <- paste(data_folder, "/", anndata_file_name, sep = "")
  seurat_path <- paste(data_folder, "/", file_path_sans_ext(anndata_file_name), ".rds", sep = "")
  
  sceasy::convertFormat(anndata_path, from = "anndata", to = "seurat", outFile = seurat_path)
  
  seurat_object <- readRDS(seurat_path)
  expect_false(is.null(seurat_object))

  library(anndata)
  ad_object <- read_h5ad(anndata_path, backed="r")
  expect_false(is.null(ad_object))
})

Output

> devtools::test()
โ„น Testing scripts
โœ” | F W S  OK | Context
โ  |         0 | converter
Attaching SeuratObject
Attaching sp
/Users/andrey_isaev/Documents/GitHub/โ€ฆ/scripts/.venv/lib/python3.9/site-packages/anndata/_core/anndata.py:121: ImplicitModificationWarning: Transforming to str index.
  warnings.warn("Transforming to str index.", ImplicitModificationWarning)
X -> counts
โ ‹ |         1 | converter                                                                                             /Users/andrey_isaev/Documents/GitHub/.../scripts/.venv/lib/python3.9/site-packages/anndata/_core/anndata.py:121: ImplicitModificationWarning: Transforming to str index.
  warnings.warn("Transforming to str index.", ImplicitModificationWarning)
โœ” |         2 | converter [18.2s]                                                                                     

โ•โ• Results 
Duration: 18.3 s

[ FAIL 0 | WARN 0 | SKIP 0 | PASS 2 ]

Difference:
diff

Could you please take a look?

Error in AnnData to Seurat

> sceasy::convertFormat("MHV_68_2021_11_04_de.h5ad", from="anndata", to="seurat", outFile='2021_11_04_de.rds')
X -> counts
Error in vapply(X = keyed.objects, FUN = function(x) { : 
  values must be length 1,
 but FUN(X[[1]]) result is length 0

I can provide the object if required.

Thank you!

Error converting loom to anndata

I tried converting loom to anndata and it is giving the following error.

`sceasy::convertFormat('/home/user/Documents/brain_scRNA/embryonic_brain_merged/dev_all.loom', from="loom", to="anndata", outFile='embroynic.h5ad')
Warning: anndata <0.6.20 detected. Upgrade to handle multi-dimensional embeddings.
Error in py_call_impl(callable, dots$args, dots$keywords) : 
  OSError: Unable to create file (unable to open file: name = '/home/user/Documents/brain_scRNA/embryonic_brain_merged/dev_all.loom', errno = 17, error message = 'File exists', flags = 15, o_flags = c2)

Detailed traceback:
  File "/home/user/.local/share/r-miniconda/envs/r-reticulate/lib/python3.6/site-packages/anndata/readwrite/read.py", line 157, in read_loom
    with connect(filename, 'r', **kwargs) as lc:
  File "/home/user/.local/share/r-miniconda/envs/r-reticulate/lib/python3.6/site-packages/loompy/loompy.py", line 1140, in connect
    return LoomConnection(filename, mode, validate=validate, spec_version=spec_version)
  File "/home/user/.local/share/r-miniconda/envs/r-reticulate/lib/python3.6/site-packages/loompy/loompy.py", line 83, in __init__
    if not lv.validate(filename):
  File "/home/user/.local/share/r-miniconda/envs/r-reticulate/lib/python3.6/site-packages/loompy/loom_validator.py", line 48, in validate
    with h5py.File(path) as f:
  File "/home/user/.local/s`

Error in seurat to Anndata conversion

Hello!

I got this error when trying to convert seurat to Anndata. Any thoughts?

sceasy::convertFormat('XXX.rds', from="seurat", to="anndata",
outFile='XXX.h5ad')

Error in compareVersion(as.character(obj@version), "3.0.0") :
trying to get slot "version" from an object of a basic class ("character") with no slots

Thank you in advance!

ERROR IN sceasy instructions, loompy part

Hi. I can't get the sceasy package right. I installed loompy successfully in terminal, and yet when I run the code below, I get stuck at the loompy part, saying that there's no loompy. Please advise. Thank you!

> library(sceasy)
Loading required package: reticulate
> library(reticulate)
> use_condaenv('scgen_env')
> loompy <- reticulate::import('loompy')
Error in py_module_import(module, convert = convert) : 
  ModuleNotFoundError: No module named 'loompy'

Error in seurat to anndata

Dear cellgeni team,

I'm trying to convert the pbmc_small Seurat object that is loaded by Seurat by default to anndata with sceasy. I use the following code:

library(Seurat)
library(reticulate)
library(sceasy)
use_condaenv("sceasy", required = TRUE)
sceasy::convertFormat(
    pbmc_small, 
    from = "seurat", 
    to = "anndata", 
    outFile = "pbmc_small.h5ad"
)

However, I get the following error:

Error in py_module_import(module, convert = convert) : 
  SyntaxError: invalid syntax (base.py, line 66)

Detailed traceback: 
  File "/anaconda3/envs/sceasy/lib/python2.7/site-packages/anndata/__init__.py", line 1, in <module>
    from .base import AnnData, _MAIN_NARRATIVE
In addition: Warning message:
In .regularise_df([email protected]) :
  Dropping single category variables:orig.ident

Here is my R session

R version 3.6.2 (2019-12-12)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: macOS High Sierra 10.13.6

Matrix products: default
BLAS/LAPACK: /anaconda3/envs/sceasy/lib/libopenblasp-r0.3.7.dylib

locale:
[1] C/UTF-8/C/C/C/C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] sceasy_0.0.1    reticulate_1.14 Seurat_3.0.2   

loaded via a namespace (and not attached):
 [1] httr_1.4.1          tidyr_1.0.0         viridisLite_0.3.0  
 [4] jsonlite_1.6        splines_3.6.2       lsei_1.2-0         
 [7] R.utils_2.9.2       gtools_3.8.1        Rdpack_0.11-1      
[10] assertthat_0.2.1    ggrepel_0.8.1       globals_0.12.5     
[13] backports_1.1.5     pillar_1.4.3        lattice_0.20-38    
[16] glue_1.3.1          digest_0.6.23       RColorBrewer_1.1-2 
[19] SDMTools_1.1-221.2  colorspace_1.4-1    cowplot_1.0.0      
[22] htmltools_0.4.0     Matrix_1.2-18       R.oo_1.23.0        
[25] plyr_1.8.5          pkgconfig_2.0.3     bibtex_0.4.2.2     
[28] tsne_0.1-3          listenv_0.8.0       purrr_0.3.3        
[31] scales_1.1.0        RANN_2.6.1          gdata_2.18.0       
[34] Rtsne_0.15          tibble_2.1.3        ggplot2_3.2.1      
[37] ROCR_1.0-7          pbapply_1.4-2       lazyeval_0.2.2     
[40] survival_3.1-8      magrittr_1.5        crayon_1.3.4       
[43] R.methodsS3_1.7.1   future_1.15.1       nlme_3.1-143       
[46] MASS_7.3-51.5       gplots_3.0.1.1      ica_1.0-2          
[49] tools_3.6.2         fitdistrplus_1.0-14 data.table_1.12.8  
[52] gbRd_0.4-11         lifecycle_0.1.0     stringr_1.4.0      
[55] plotly_4.9.1        munsell_0.5.0       cluster_2.1.0      
[58] irlba_2.3.3         compiler_3.6.2      rsvd_1.0.2         
[61] caTools_1.17.1.3    rlang_0.4.2         grid_3.6.2         
[64] ggridges_0.5.1      htmlwidgets_1.5.1   igraph_1.2.4.2     
[67] bitops_1.0-6        npsurv_0.4-0        gtable_0.3.0       
[70] codetools_0.2-16    reshape2_1.4.3      R6_2.4.1           
[73] gridExtra_2.3       zoo_1.8-6           dplyr_0.8.3        
[76] zeallot_0.1.0       future.apply_1.4.0  KernSmooth_2.23-16 
[79] metap_1.1           ape_5.3             stringi_1.4.3      
[82] parallel_3.6.2      Rcpp_1.0.3          sctransform_0.2.1  
[85] png_0.1-7           vctrs_0.2.1         tidyselect_0.2.5   
[88] lmtest_0.9-37    

If you could shed some light it'd be extremely useful.

Thanks a lot,

Ramon

sce to anndata missing colPair in tbsp

Hi, I'm wondering how does sceasy handles graphs from Sce to AnnData.
For example, I have an sce with colPair storing a KNN graph, but this is missing in the converted AnnData.obsp slot.
Thanks so much!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.