Snakemake Error (incorrect wildcard use)
0
0
Entering edit mode
13 months ago

I am trying to run a simple snakemake rule for a basic bwa mem on several paired end reads. I am getting the error:

Target rules may not contain wildcards. Please specify concrete files or a rule without wildcards.

However, my rule inputs and outputs are structured much like the bwa example on the snakemake site. As I understand, you can have wildcards if they are filenames. https://snakemake.readthedocs.io/en/stable/tutorial/basics.html#step-2-generalizing-the-read-mapping-rule I do have two file in my inputs, but I specify the different reads at the end of each of these files Here is my script

rule align:
output: bam = "/path/to/alignments/{sample}.bam"
#the latest version of bwa (directory name was the date of installation)
shell:"""
bwa index -a is {input.genome}
"""


I am not sure what I am doing wrong with respect to using the wildcards.

snakemake software error • 848 views
2
Entering edit mode

You need to have at least one rule (target rule) that does not produce any output, but takes as input all your expected output.

Snakemake will take that rule as first rule, and then checks which rules produce the input of the rule. Then it checks, which rules produce the inputs for those rules, etc.

rule all:
input: "/path/to/alignments/{sample}.bam"

0
Entering edit mode

in snakemake you provide a recipe for making a target, but then you have to actually ask for the target. You can even ask on the command line but it's preferable to set a target rule as cschu181 suggested.

0
Entering edit mode

Thank you. This was helpful to me! I added in the expand option as well.

Traffic: 1465 users visited in the last hour
FAQ
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.