I'm following the Snakemake tutorial from what I gather it's the official documentation. After having downloaded the tools in the setup phase I am stuck in understunding the wildcard use in step 2, obtaining the error message.
MissingInputException in rule bwa_map in file "/home/user/SnakeTest/SnakeTest/Snakefile", line 1:
Missing input files for rule bwa_map:
output: mapped_reads/{sample}.bam
wildcards: sample={sample}
affected files:
data/samples/{sample}.fastq
I suspected that I was missing some file, but everything is where it should be and properly named. This is what the whole snakefile looks like; it's got two variables defined globally because this kicks in afterwards, but it doesn't change my tests.
My actual guess is that I am misunderstanding the use of wildcards. I gathered that you don't need to define what Snakemake will replace in the wildcard, because it will infer it from the kind of inputs available following the pattern provided by the name of the output directive. Here the patterns match: data/samples/{sample}.fastq reflects the three data/samples/A.fastq data/samples/B.fastq data/samples/C.fastq, but Snakemake begs to disagree.
I don't get what I am misunderstandng, can someone please shed a light on it? Thanks in advance.
snakemake -n, I get the expected output:MissingInputException in rule bwa_map ... affected files: data/samples/A.fastqnotdata/samples/{sample}.fastq{samples}in place of any of the three files. Side question: why in your case it has focused onA.fastq?rule all) and works its way backwards, how to get it, building the dag. ForA.fastqit does not find a file or a rule which produces it so it reports an error. In this caseA.fastqis just the first one snakemake tries. If you would change the order of theSAMPLES-List or would providedata/samples/A.fastqanddata/genome.fa, snakemake would give the same error for B.fastq