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

Error in Nanopolish Snakemake #27

Open
ghost opened this issue May 18, 2022 · 7 comments
Open

Error in Nanopolish Snakemake #27

ghost opened this issue May 18, 2022 · 7 comments

Comments

@ghost
Copy link

ghost commented May 18, 2022

Hi,

While trying to run the Nanopolish snakemake with the example data I get the following error:

RuleException:
WorkflowError in line 25 of /METEORE/Nanopolish:
HTTPError: HTTP Error 404: Not Found
File "/METEORE/Nanopolish", line 25, in __rule_minimap2
File "/services/tools/anaconda3/4.4.0/lib/python3.6/concurrent/futures/thread.py", line 56, in run
Shutting down, this might take some time.
Exiting because a job execution failed. Look above for error message

The problem is with the wrapper: "0.66.0/bio/minimap2/aligner"

I am using the 0.14.0. version of Nanopolish.

How could I solve this?

Thank you in advance

@zakayuen
Copy link
Contributor

Hi,

Have you added minimap2 to your conda environment? Check if it is installed:

conda list | grep minimap2

If minimap2 is not installed yet, please add this to the environment:

mamba install -c bioconda minimap2

Then rerun the snakemake:

snakemake -s Nanopolish nanopolish_results/example_nanopolish-freq-perCG.tsv --cores all

You should be able to generate the output with the example data.

p.s. I have updated the wrapper code in the snakemake file Nanopolish

Zaka

@zakayuen
Copy link
Contributor

v0.66 is changes to v1.5.0/bio/minimap2/aligner

Does it work for you now?

@Bessyyi
Copy link

Bessyyi commented May 24, 2022

v0.66 is changes to v1.5.0/bio/minimap2/aligner

Does it work for you now?
Hi,
I try to use v1.5.0/bio/minimap2/aligner but while trying to run the Nanopolish snakemake with the example data I get the following error:
RuleException:
WorkflowError in line 25 of /home/ywj/METEORE-master/Nanopolish:
Unable to locate wrapper script for wrapper v1.5.0/bio/minimap2/aligner. This can be a network issue or a mistake in the wrapper URL.
File "/home/ywj/METEORE-master/Nanopolish", line 25, in __rule_minimap2
File "/home/ywj/yzy/miniconda3/envs/meteore_nanopolish_env/lib/python3.10/concurrent/futures/thread.py", line 58, in run
Shutting down, this might take some time.

@zakayuen
Copy link
Contributor

Hi @Bessyyi

What are the current versions of minimap2 and samtools in the environment?
Check the versions:

conda list minimap2
conda list samtools

The Nanopolish pipeline was tested with minimap2 v2.24 and samtools v1.15

Cheers,
Zaka

@ghost
Copy link
Author

ghost commented May 25, 2022

The problem is that it is impossible to find the folder in which the aligner is found. Could you share the total path so we can try to find it?

@zakayuen
Copy link
Contributor

zakayuen commented Jun 1, 2022

Snakemake will automatically download the wrapper from the Snakemake Wrapper Repository. The wrapper directive can point to full URLs, including URLs to local files with absolute paths file:// or relative paths file: for development purposes. See more info here: https://snakemake.readthedocs.io/en/v7.7.0/snakefiles/modularization.html

@jayradke
Copy link

jayradke commented Dec 3, 2022

similar issue...
Building DAG of jobs...
Using shell: /usr/bin/bash
Provided cores: 48
Rules claiming more threads will be scaled down.
Conda environments: ignored
Job stats:
job count min threads max threads


calculate_frequency 1 1 1
call_methylation 1 1 1
index 1 1 1
minimap2 1 6 6
samtools_index 1 1 1
samtools_sort 1 1 1
split_cpgs 1 1 1
total 7 1 6

Select jobs to execute...

[Sat Dec 3 16:21:41 2022]
rule minimap2:
input: data/ecoli_k12_mg1655.fasta, example.fastq
output: nanopolish_results/mapped/example.bam
log: nanopolish_results/mapped/example.log
jobid: 4
reason: Missing output files: nanopolish_results/mapped/example.bam
wildcards: sample=example
threads: 6
resources: tmpdir=/tmp

[Sat Dec 3 16:21:41 2022]
rule index:
input: data/example, example.fastq
output: example.fastq.index, example.fastq.index.fai, example.fastq.index.gzi, example.fastq.index.readdb
jobid: 6
reason: Missing output files: example.fastq.index, example.fastq.index.fai, example.fastq.index.gzi, example.fastq.index.readdb
wildcards: sample=example
resources: tmpdir=/tmp

/usr/bin/bash: line 1: nanopolish: command not found
[Sat Dec 3 16:21:41 2022]
Error in rule index:
jobid: 6
input: data/example, example.fastq
output: example.fastq.index, example.fastq.index.fai, example.fastq.index.gzi, example.fastq.index.readdb
shell:
nanopolish index -d data/example example.fastq
(one of the commands exited with non-zero exit code; note that snakemake uses bash strict mode!)

Traceback (most recent call last):
File "/home/jayradke/METEORE/.snakemake/scripts/tmp16fgccly.wrapper.py", line 53, in
shell(
File "/home/jayradke/miniconda3/envs/meteore_nanopolish_env/lib/python3.9/site-packages/snakemake/shell.py", line 296, in new
raise sp.CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'set -euo pipefail; (minimap2 -t 6 -a -x map-ont -a data/ecoli_k12_mg1655.fasta example.fastq | samtools view -h --output-fmt BAM - > nanopolish_results/mapped/example.bam) 2> nanopolish_results/mapped/example.log' returned non-zero exit status 127.
[Sat Dec 3 16:21:43 2022]
Error in rule minimap2:
jobid: 4
input: data/ecoli_k12_mg1655.fasta, example.fastq
output: nanopolish_results/mapped/example.bam
log: nanopolish_results/mapped/example.log (check log file(s) for error message)
conda-env: /home/jayradke/METEORE/.snakemake/conda/7ce527443c989fafe22c477840513c71_

RuleException:
CalledProcessError in line 25 of /home/jayradke/METEORE/Nanopolish:
Command 'set -euo pipefail; /home/jayradke/miniconda3/envs/meteore_nanopolish_env/bin/python3.9 /home/jayradke/METEORE/.snakemake/scripts/tmp16fgccly.wrapper.py' returned non-zero exit status 1.
File "/home/jayradke/METEORE/Nanopolish", line 25, in __rule_minimap2
File "/home/jayradke/miniconda3/envs/meteore_nanopolish_env/lib/python3.9/concurrent/futures/thread.py", line 58, in run
Removing output files of failed job minimap2 since they might be corrupted:
nanopolish_results/mapped/example.bam
Shutting down, this might take some time.
Exiting because a job execution failed. Look above for error message
Complete log: .snakemake/log/2022-12-03T162141.697612.snakemake.log

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