PacificBiosciences / pb-human-wgs-workflow-snakemake

Workflow for the comprehensive detection and prioritization of variants in human genomes with PacBio HiFi reads
BSD 3-Clause Clear License
38 stars 20 forks source link

Getting package version error while running the pipeline #138

Closed ashishjain1988 closed 1 year ago

ashishjain1988 commented 1 year ago

Hi,

I followed the tutorial and created all the required folders along with updating all the configuration files. While running the first step of the pipeline using "bash workflow/process_smrtcells.local.sh" I got this error.

Building DAG of jobs... Creating conda environment workflow/rules/envs/gc_coverage.yaml... Downloading and installing remote packages. Environment for /lab-share/RC-Data-Science-e2/Public/Ashish/p145_Pacbio_Whitman/workflow/rules/envs/gc_coverage.yaml created (location: .snakemake/conda/3bdf7c6548b97c196736e98feccdf1ab) Creating conda environment workflow/rules/envs/jellyfish.yaml... Downloading and installing remote packages. Environment for /lab-share/RC-Data-Science-e2/Public/Ashish/p145_Pacbio_Whitman/workflow/rules/envs/jellyfish.yaml created (location: .snakemake/conda/05b73b051edccf59afc91e891a6f5388) Creating conda environment workflow/rules/envs/seqtk.yaml... Downloading and installing remote packages. Environment for /lab-share/RC-Data-Science-e2/Public/Ashish/p145_Pacbio_Whitman/workflow/rules/envs/seqtk.yaml created (location: .snakemake/conda/d7c3b5041891ccf4a20f82f478e23175) Creating conda environment workflow/rules/envs/mosdepth.yaml... Downloading and installing remote packages. CreateCondaEnvironmentException: Could not create conda environment from /lab-share/RC-Data-Science-e2/Public/Ashish/p145_Pacbio_Whitman/workflow/rules/envs/mosdepth.yaml: Command: mamba env create --quiet --file "/lab-share/RC-Data-Science-e2/Public/Ashish/p145_Pacbio_Whitman/.snakemake/conda/45ae31b93946e75b0c79eccbd1fe57ec.yaml" --prefix "/lab-share/RC-Data-Science-e2/Public/Ashish/p145_Pacbio_Whitman/.snakemake/conda/45ae31b93946e75b0c79eccbd1fe57ec" Output: Encountered problems while solving:

Can you please help me with this?

Regards, Ashish Jain

williamrowell commented 1 year ago

Can you provide the output of snakemake --version?

ashishjain1988 commented 1 year ago

I installed the snakemake version (6.15.3) which was mentioned in the tutorial. The output from snakemake --version is also 6.15.3

williamrowell commented 1 year ago

I momentarily saw a message that you were using a more recent version of snakemake. If that's the case, that's probably the cause here. We've seen issues like this a few times with newer versions of snakemake, so downgrading to 6.15.3 would likely solve that.

The next thing I'd try (in combination with using snakemake 6.15.3) is falling back to conda as a front-end instead of mamba. You can do this by editing line 7 of profiles/local/config.yaml from mamba to conda.

ashishjain1988 commented 1 year ago

Sorry for the confusion. I incorrectly checked it on the server. It is in fact 6.15.3. I will double check when I run the pipeline again. I will also try converting from mamba to conda. Thank you for your help!

ashishjain1988 commented 1 year ago

Hi @williamrowell, I again checked the snakemake version before running the pipeline and it is 6.15.3. After that I also edit the config file as suggested (falling back to conda as a front-end instead of mamba) now I am getting another error.

image

juniper-lake commented 1 year ago

Can you try deleting the .snakemake directory and then re-run to see if that fixes the issue. We sometimes see this error when one of the conda envs used in the workflows has a bad install, which may have happened during previous failed snakemake runs.

ashishjain1988 commented 1 year ago

I tried again after deleting the .snakemake directory but still getting the same error.

williamrowell commented 1 year ago

Maybe the pb-human-wgs conda env is corrupt? Could you try recreating that environment? We can leave the original environment and just create a second for this test, pb-human-wgs2.

conda create -c conda-forge -c bioconda -n pb-human-wgs2 snakemake=6.15.3 pysam=0.16.0.1 python=3
ashishjain1988 commented 1 year ago

I was not able create the conda env using conda but it worked with mamba.

mamba create -c conda-forge -c bioconda -n pb-human-wgs2 snakemake=6.15.3 pysam=0.16.0.1 python=3

After that I used this conda env but still got the same error.

williamrowell commented 1 year ago

I'm finding some errors about tabulate 0.9 breaking snakemake (https://github.com/snakemake/snakemake/issues/1899). Could you activate the environment with snakemake and check the version of tabulate?

❯ conda activate pb-human-wgs
❯ conda list | grep tabulate

If it reports 0.9.*, you could try downgrading like:

mamba install 'tabulate=0.8.10'
ashishjain1988 commented 1 year ago

It worked. Thank you!