Thank you. This solved the problem.
Hi there,
I have been trying to run the Snakemake tutorial with the following:
rule bwa_map:
input:
"data/genome.fa",
"data/samples/A.fastq"
output:
"mapped_reads/A.bam"
shell:
"bwa mem {input} | samtools view -Sb -> {output}"
However, I am getting the error Missing output files: mapped_reads/A.bam when run with the following:
snakemake -n -r
Any advice is greatly appreciated. Thank you.
1 answer
Hi, this error tells that pipeline finished but files are not found where those are expected. With such pipes you lose all error handlings and it is not clear which command failed. For bwa mem index file is needed. Therefore it should also be included in input of this rule. But then you would need to pass inputsto shell command by providing index of the list: {input[0]} Or name those inputs as python variables for snakemake: input: index = "path/to/inputfile_index", ...
Other than this it is hard to tell what went wrong w/o full error msg.
Log in to answer this question.
Maybe try changing "->" to ">" in your shell command ?
Thank you for looking into this.