Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependency errors with running scib-pipeline. #60

Open
TheVille415 opened this issue Jul 24, 2023 · 2 comments
Open

Dependency errors with running scib-pipeline. #60

TheVille415 opened this issue Jul 24, 2023 · 2 comments

Comments

@TheVille415
Copy link

Hi!

Thank you so much for publishing the pipeline but I am having some errors getting the pipeline working properly.

Starting with the igraph version error, adding in louvain and cairocffi as dependencies, the (cannot import name 'Protocol' from 'typing') error, and working on finding the right version of optax. scvi, and scgen.

Here are some of the errors I have gotten:

The conflict is caused by:
    The user requested igraph<0.10
    scib 1.1.3 depends on igraph>=0.10

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict
ImportError: cannot import name 'Protocol' from 'typing'
ModuleNotFoundError: No module named "louvain
ImportError: cairo backend requires that pvcairo> 1.11.0 or cairocffi is installed 
Tracesack most recent call last):
File "scripts/integration/runIntegration.py", line 67, in <module>
runintegration flle, out, run, hvg, batch, celltype)
File "scripts/integration/runIntegration.py", line 24, in runIntegration
integrated = method adata, batch
File " /home/ubuntu/mambaforge/envs/scib-pipeline-R4.0/lib/python3.7/site-packages/scib/integration.py",line228,inscvi
from scvi.model import SCVI
File
" /home/ubuntu/mambaforge/envs/scib-pipeline-R4.0/lib/python3.7/site-packages/scvi/__init_
•py", line 10, in <module>
from . import data, model, external, utils
File "/home/ubuntu/mambaforge/envs/scib-pipeline-R4.0/lib/python3.7/site-packages/sci/model/init.py",line6,in<module>
from •_jaxsevi import JaxsCVI
File " /home/ubuntu/mambaforge/envs/scib-pipeline-R4.0/lib/python3.7/site-packages/scvi/model/_jaxsevi.py",line7,in<module>
import optax
File "/ home/ubuntu/mambaforge/envs/scib-pipeline-R4.0/lib/python3.7/site-packages/optax/_init_py",line17,in<module>
from optax import experimental
File " /home/ubuntu/mambaforge/envs/scib-pipeline-R4.0/1ib/python3.7/site-packages/optax/experimental/__init_•py",line20,in<module> from optax._src.experimental.complex_valued import split_real_and_imaginary
File " /home/ubuntu/mambaforge/envs/scib-pipeline-R4.0/lib/python3.7/site-packages/optax/_src/experimental/complex_valued.py",line36,in<module>
from optax. src import base
File " /home/ubuntu/mambaforge/envs/scib-pipeline-R4.0/lib/python3.7/site-packages/optax/_src/base.py",line17,in<module> from typing import Any, Callable, NamedTuple, Optional, Protocol, Sequence, Tuple
ImportError: cannot import name 'Protocol from
'typing' (/home/ubuntu/mambaforge/envs/scib-pipeline-R4.0/lib/python3.7/typing.py)
[Mon Jul 24 09:53:27 2023]
Error in rule integration_run_python:
    jobid: 5
    input: /repos/batch-effect-correction-pipeline/data/test_data_r4/prepare/unscaled/full_feature/adata_pre.h5ad
    output: /repos/batch-effect-correction-pipeline/data/test_data_r4/integration/unscaled/full_feature/scanvi.h5ad
    shell:
        
        conda run --no-capture-output -n scib-pipeline-R4.0 python scripts/integration/runIntegration.py           -i /repos/batch-effect-correction-pipeline/data/test_data_r4/prepare/unscaled/full_feature/adata_pre.h5ad -o /repos/batch-effect-correction-pipeline/data/test_data_r4/integration/unscaled/full_feature/scanvi.h5ad              -b batch --method scanvi  -c celltype
        
        (one of the commands exited with non-zero exit code; note that snakemake uses bash strict mode!)

[Mon Jul 24 09:53:28 2023]
Error in rule integration_run_python:
    jobid: 7
    input: /repos/batch-effect-correction-pipeline/data/test_data_r4/prepare/unscaled/full_feature/adata_pre.h5ad
    output: /repos/batch-effect-correction-pipeline/data/test_data_r4/integration/unscaled/full_feature/scvi.h5ad
    shell:
        
        conda run --no-capture-output -n scib-pipeline-R4.0 python scripts/integration/runIntegration.py           -i /repos/batch-effect-correction-pipeline/data/test_data_r4/prepare/unscaled/full_feature/adata_pre.h5ad -o /repos/batch-effect-correction-pipeline/data/test_data_r4/integration/unscaled/full_feature/scvi.h5ad        -b batch --method scvi  
        
        (one of the commands exited with non-zero exit code; note that snakemake uses bash strict mode!)

[Mon Jul 24 09:53:28 2023]
Error in rule integration_run_python:
    jobid: 6
    input: /repos/batch-effect-correction-pipeline/data/test_data_r4/prepare/unscaled/full_feature/adata_pre.h5ad
    output: /repos/batch-effect-correction-pipeline/data/test_data_r4/integration/unscaled/full_feature/scgen.h5ad
    shell:
        
        conda run --no-capture-output -n scib-pipeline-R4.0 python scripts/integration/runIntegration.py           -i /repos/batch-effect-correction-pipeline/data/test_data_r4/prepare/unscaled/full_feature/adata_pre.h5ad -o /repos/batch-effect-correction-pipeline/data/test_data_r4/integration/unscaled/full_feature/scgen.h5ad               -b batch --method scgen  -c celltype
        
        (one of the commands exited with non-zero exit code; note that snakemake uses bash strict mode!)

There have been many roadblocks in getting the pipeline working with the information we have posted. Is there a way to get an updated version of the pipeline, or an updated pipeline-R4.0.yml file?

I really appreciate any help you can provide.

@khushivora77
Copy link

I have run into the same problem.

Additionally, while running the Snakemake command, I encountered the following error:

image

As in highlighted in the image, it was a problem with ‘lru_cache’ .
I have not been able to resolve that, and receive the output for the Snakemake command.

@JeffreyMaurer
Copy link

JeffreyMaurer commented Nov 5, 2024

As of 10-25-2024, here is how I tackled this issue with scib-pipeline-R4.0.yml:

  • Install scib-1.1.4 to more closely match this issue, 1.1.3 has other issues unresolved.
  • Remove igraph from the yaml file entirely.
  • Run conda install -c vtraag louvain to install louvain, it's missing
  • Between python versions 3.7 and 3.8, the typing_extension package was subsumed into the typing package. You can still either install a newer version of the optax module with pip (smart) or add an from typing_extensions import [error messages] to all of the effected files one at a time (me)
  • The default installation of rpy2 is v3.5.1 on the anaconda website, but I found that v3.5.11 fixes relevant syntax errors and introduces none that I can see.
  • I also add r-biocmanager and the bioconductor-genomeinfodbdata to the yml.
  • The scib/metrics/lisi.py file of the package may need to be updated to its newest version.

@khushivora77

In newer python versions, lru_cache is allowed to be run without parentheses as a way to submit no parameters. Install a newer version of anndata2ri or add the parentheses yourself.

Here are other relevant threads, added so they are "mentioned" in their own threads:

#55

#3

#64

#59

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants