mdelcorvo / TOSCA

Snakemake workflow for somatic mutation detection without matched normal samples
MIT License
11 stars 2 forks source link

Error during rule map_reads step due to python version #2

Closed ibrahimkurt closed 11 months ago

ibrahimkurt commented 1 year ago

Hey,

Thanks a lot for sharing your pipeline. I am relatively new to Snakemake, although I have some experience w/ Cromwell and Nextflow.

I created a new conda environment and installed the dependencies per your manual page, then cloned your repo. I could start a run using a tumor-only pair of FASTQs with the following command:

(TOSCA) murat@DESKTOP-MATLSPL:/mnt/g/ELM-Somatic-pipeline/TOSCA$ snakemake --use-conda --configfile config/example_config.yaml --cores all --cache --rerun-incomplete

It gives an error at the 16th step during the rule map_reads. Interestingly the error is about Python syntax:

  File "<string>", line 1
    import sys; print(f'3.11')
                            ^
SyntaxError: invalid syntax

It is because the conda environment generated from the wrapper "0.78.0/bio/bwa/mem" is using a very old Python version 1.6. It needs to be Python 3. What would be the most optimal way to fix this problem?

Here is my full log 2023-02-18T095459.992553.snakemake.log

Thanks a lot!

Platform: Ubuntu 20.04 via WSL2 on Windows 10 pro

mdelcorvo commented 1 year ago

Hi there. Apologies for the delay and thanks for your feedback. To fix this, I updated TOSCA to v1.2, which includes a more recent snakemake modules. I've also removed some outdated rules to speed up processes without affecting the accuracy of the results. It is rare to encounter errors during map_reads rule, however I think this could solve your issue.

I merged these changes into the main branch, can you update your version of TOSCA and verify that now everything works properly? (you can avoid using --cache parameter)