Reputation: 543
I have a snakemake srcipt like
# minimal example
configfile: "../snakemake/config.yaml"
import os
rule generateInclude:
input:
archaic_inc=config['input']['archaic_include'],
modern_inc=config['input']['modern_include']
output:
all_include='include_{reference_genome}.bed'
params:
reference_genome='{reference_genome}'
shell:
"""
if [ {params.reference_genome}=='hg19' ]; then
bedtools intersect -a <(zcat {input.archaic_inc} | sed 's/^chr//') \
-b <(zcat {input.modern_inc} | sed 's/^chr//') > {output.all_include}
else
bedtools intersect -a <(zcat {input.archaic_inc}) \
-b <(zcat {input.modern_inc}) > {output.all_include}
fi
"""
rule all:
input:
'include_hg19.bed'
When I run it, snakemake report
Target rules may not contain wildcards. Please specify concrete files or a rule without wildcards.
I am not sure whats wrong with it, could your please gave me some help
Upvotes: 1
Views: 47
Reputation: 16581
By default snakemake uses the first rule as the target rule. By moving rule all
to the top, you should be able to run this file:
rule all:
input:
'include_hg19.bed'
rule generateInclude:
...
Upvotes: 1