What snakemake is going to do is to check if the file output ( in this case "output/reference" ) exist after executing the rule. Which doesn't since it is the basename for bowtie
What you can do is to pass the basename for the index as a parameter to snakemake function. Something like the following:
Hello So I tried again the suggested code but it seems that the error occurs at the rev. files:
MissingOutputException in line 26 of /home/s1104230/scripts/Snakefile:
Missing files after 5 seconds:
/home/s1104230/mapping2/reference.rev2.bt2
/home/s1104230/mapping2/reference.rev1.bt2
This might be due to filesystem latency. If that is the case, consider to increase the wait time with --latency-wait.
IP's solution is best as expected outputs are listed explicitly which would take advantage of timestamp.
Since v5.2.0, you can also accomplish this by using directory, which shorten the code by quite a bit while maintaining timestamp, but snakemake won't check if all expected outputs exist.
IP's answer is what I would do. An alternative is to use the touch function to create a marker file that signals that a task has successfully completed:
Hello,
I tried your suggestion But I get the following error:
Error in rule bowtie2Build:
jobid: 0
output: index.done
RuleException:
CalledProcessError in line 49 of /home/s1104230/scripts/Snakefile:
Command ' set -euo pipefail; bowtie2-build /home/s1104230/mapping2/reference ' returned non-zero exit status 1
File "/home/s1104230/scripts/Snakefile", line 49, in __rule_bowtie2Build
File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
-A fai file is a index on the fasta file with the format specified here
-Bowtie2 output is the Burrows-Wheeler transformation of the reference genome. You can read about the BW transform here.
They are two different indexing techniques, so bowtie2-build does create a fai file because it does not need it for the alignment. It is just searching the BWT
Hello,
Using the following code:
I get :
Hello,
after each defined output there must be a
,
.fin swimmer
I've updated this in the original (fixed the colon after
params
too). Good catch.Hello So I tried again the suggested code but it seems that the error occurs at the rev. files:
See if those files show up eventually. We usually use
--latency-wait 300
do get around this.This error is due to a simple typo. There should be a dot after "rev":
thanks for the corrections :)