Hello everyone, I am trying to get more familiar with Snakemake. I have created this Snakefile:
rule alignment_haplotypecaller:
output:
vcf = 'variants/{sample}.g.vcf.gz'
input:
bam = 'alignment/{sample}.bam'
reference:
fasta = 'reference.fasta'
shell:
r"""
samtools index {input.bam}
~/gatk-4.2.0.0/gatk HaplotypeCaller \
--reference {reference.fasta} \
--input {input.bam} \
--output {output.vcf} \
--emit-ref-confidence BP_RESOLUTION
"""
An I run Snakemake with the following command:
snakemake -j1 -F -p alignment_haplotypecaller
I get this error message:
SyntaxError in line 7 of /mnt/shared/usr/test_snakemake/Snakefile: Unexpected keyword ref in rule definition (Snakefile, line 7)
Would anyone know why the key line 7 ("fasta") is problematic?
Check if
reference:
can be used in rules.