Question: Snakemake: Missing output files:
0
gravatar for Jiji
6 months ago by
Jiji0
Jiji0 wrote:

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.

snakemake • 226 views
ADD COMMENTlink modified 6 months ago by karolismatjosaitis30 • written 6 months ago by Jiji0
1

Maybe try changing "->" to ">" in your shell command ?

ADD REPLYlink written 6 months ago by Giovanni.madrigal12160

Thank you for looking into this.

ADD REPLYlink written 6 months ago by Jiji0
1
gravatar for karolismatjosaitis
6 months ago by
karolismatjosaitis30 wrote:

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.

ADD COMMENTlink written 6 months ago by karolismatjosaitis30

Thank you. This solved the problem.

ADD REPLYlink written 6 months ago by Jiji0
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1205 users visited in the last hour