jts / ncov-tools

Small collection of tools for performing quality control on coronavirus sequencing data and genomes
MIT License
47 stars 16 forks source link

Where is the primers_to_amplicons.py script? #105

Closed juliadouglasf closed 1 year ago

juliadouglasf commented 1 year ago

Hello,

I can't find the primers_to_amplicons.py script within the ncov-tools scripts directory.

I am trying to run the NML fork of the SIGNAL pipeline, but everything seems to be running smoothly until the ncov-tools make_amplicon_bed rule. There is no obvious error; only Error in rule make_amplicon_bed ... (one of the commands exited with non-zero exit code; note that snakemake uses bash strict mode!). Hoping to solve the issue by looking at the script mentioned in the shell command, primers_to_amplicons.py, I realized it was missing.

Is the script still in use, as the Snakefile suggests, and if so, where might I find it?

Thanks.

rdeborja commented 1 year ago

It can be found in the ncov-parser package which is one of the dependencies in the environment.yaml file.

https://github.com/simpsonlab/ncov-parser/blob/main/bin/primers_to_amplicons.py

DarianHole commented 1 year ago

The conda env for that fork should be found in your clone of the repo under .snakemake/conda/ncov-qc-pangolin4. If ncov-parser is not installed there that would be odd as as Richard said its in the environment.yaml file. Hopefully doublechecking the install fixes it

It could be an issue with one of the primer bed files as well though

juliadouglasf commented 1 year ago

Thank you both for your responses! ncov-parser wasn't listed with pip list within the conda environment @DarianHole mentioned, so I manually used pip install ncov-parser. After chmod +x primers_to_amplicons.py to get rid of the ensuing Permission denied error, my colleague and I are troubleshooting a ModuleNotFoundError for vcf.

File ".../covid-19-signal-nml/.snakemake/conda/ncov-qc-pangolin4/bin/primers_to_amplicons.py", line 8, in <module>
    import ncov.parser.primers as pr
File ".../covid-19-signal-nml/.snakemake/conda/ncov-qc-pangolin4/lib/python3.8/site-packages/ncov/parser/__init__.py", line 7, in <module>
    from .Vcf import *
File ".../covid-19-signal-nml/.snakemake/conda/ncov-qc-pangolin4/lib/python3.8/site-packages/ncov/parser/Vcf.py", line 7, in <module>
    import vcf
ModuleNotFoundError: No module named 'vcf'
DarianHole commented 1 year ago

Did potentially none of the pip installs work? That is what it somewhat sounds like which would be odd. Actually it looks like I had a spacing difference in that file so that is likely it. Sorry about that. I've adjusted it

You'll probably either have to pip install the remaining dependencies or re-make the env after pulling the fix I made to the yaml file.

https://github.com/jts/ncov-tools/blob/master/workflow/envs/environment.yml#L31 has all the dependencies

juliadouglasf commented 1 year ago

I pip installed the other dependencies, so the pipeline was able to continue until it hit rule make_tree_raw, where it's saying ERROR: Alignment must have at least 3 sequences. Since the original concern about the primers_to_amplicons.py script has been resolved, I may close this issue.

juliadouglasf commented 1 year ago

As I reproduce the installation, I can confirm that the pip dependencies were installed properly without any interventions.