Thank you for the quick reply! Yes, I have tried that, unsuccessfully. Is there something obvious I'm missing?
# List of parameters - move to config file
SAMPLES=['T1-XX-2017-1068_S51','L-14-54_S56']
REFS = ['H37Rv']
MAPPERS= ['bowtie2']
FILTERS = ['qfilt','qnoppe']
# Define target files.
rule all:
input:
fastas=expand('results/{samp}/fasta/{samp}_{mapper}_{ref}_{filter}.fa',samp=SAMPLES, ref=REFS, mapper=MAPPERS, filter=FILTERS)
# Filter variants.
rule filter_vars:
input:
ref_path='{ref}.fa',
vcf='results/{samp}/vars/{samp}_{mapper}_{ref}_deep.g.vcf.gz',
log:
'results/{samp}/logs/{samp}_{mapper}_{ref}_filt_vcf_stats.txt'
output:
filt_vcf='results/{samp}/vars/{samp}_{mapper}_{ref}_qfilt.vcf.gz',
noppe_vcf='results/{samp}/vars/{samp}_{mapper}_{ref}_qnoppe.vcf.gz'
shell:
"scripts/filter_vars.sh {input.ref_path} {input.vcf} {output.filt_vcf} > {log}"
# Convert single_sample VCF to fasta.
rule vcf_to_fasta:
input:
ref_path='{ref}.fa',
filt_vcf='results/{samp}/vars/{samp}_{mapper}_{ref}_{filter}.vcf.gz'
output:
fasta='results/{samp}/fasta/{samp}_{mapper}_{ref}_{filter}.fa'
shell:
"scripts/vcf2fasta.sh {input.ref_path} {input.filt_vcf} {output.fasta}"
I get the same error that I'm missing an input file:
Building DAG of jobs...
MissingInputException in line 44 of /oak/stanford/scg/lab_jandr/walter/tb/test/Snakefile:
Missing input files for rule all:
results/T1-XX-2017-1068_S51/fasta/T1-XX-2017-1068_S51_bowtie2_H37Rv_qfilt.fa
results/T1-XX-2017-1068_S51/fasta/T1-XX-2017-1068_S51_bowtie2_H37Rv_qnoppe.fa
results/L-14-54_S56/fasta/L-14-54_S56_bowtie2_H37Rv_qfilt.fa
results/L-14-54_S56/fasta/L-14-54_S56_bowtie2_H37Rv_qnoppe.fa