Papatheodorou-Group / BENGAL

Nextflow pipeline for cross-species integration and assessment of single cell RNA-seq datasets
GNU General Public License v3.0
32 stars 8 forks source link

UnsatisfiableError #2

Closed shamsbhuiyan closed 1 year ago

shamsbhuiyan commented 1 year ago

Hello,

This is a really cool pipeline. I would like to implement it for my own cross-species data, but I'm having trouble at the step of setting up the conda environment for .h5ad/.h5seurat conversion.

This is my terminal:

$ conda env create -f envs/hdf5_1820.yml
Collecting package metadata (repodata.json): done
Solving environment: failed

UnsatisfiableError: The following specifications were found to be incompatible with each other:
- _openmp_mutex==4.5=1_gnu -> openmp_impl==9999
  - bioconductor-biobase==2.46.0=r36h516909a_0 -> r-base[version='>=3.6,<3.7.0a0'] -> krb5[version='>=1.19.1,<1.20.0a0'] -> libedit[version='>=3.1.20191231,<3.2.0a0,>=3.1.20191231,<4.0a0'] -> ncurses[version='>=6.2,<7.0.0a0']
  - bioconductor-biobase==2.46.0=r36h516909a_0 -> r-base[version='>=3.6,<3.7.0a0'] -> libxml2[version='>=2.9.12,<2.11.0a0']
  - bioconductor-biocgenerics==0.32.0=r36_0 -> r-base[version='>=3.6,<3.7.0a0'] -> krb5[version='>=1.19.1,<1.20.0a0'] -> libedit[version='>=3.1.20191231,<3.2.0a0,>=3.1.20191231,<4.0a0'] -> ncurses[version='>=6.2,<7.0.0a0']
  - bioconductor-biocgenerics==0.32.0=r36_0 -> r-base[version='>=3.6,<3.7.0a0'] -> libxml2[version='>=2.9.12,<2.11.0a0']

These lines of text concerning mismatched packages continue for ~2000 lines. I am running R/3.6 and python/2.7 (I've tested this out on R version 4 and python version 3.7). Is there anything else I need to have installed before I create the conda environment? Thank you for all your help.

YY-SONG0718 commented 1 year ago

Hello,

I appreciate your interest in this pipeline. I tried again on my machine to create this environment but unfortunately, it throws similar errors. This environment was created about half a year ago and I think that the package dependencies have been updated. The SeuratDisk package seems to be also less well-maintained these days.

I suggest trying a different package such as sceasy or creating the objects from scratch. We only need to convert the count matrix, the .obs and the .var so it is rather straightforward:

library(anndata)
library(SeuratObject)
for( file in list.files(path = ".", pattern='*.h5ad', full.names=TRUE, recursive=TRUE)){ 
ad = read_h5ad(file)
data <- CreateSeuratObject(counts = t(as.matrix(ad$X)), meta.data = ad$obs)
SaveH5Seurat(data, gsub(".h5ad", ".h5seurat", file), overwrite=T)
}

Thank you.