I am new to snakemake and would like to use the following rule :
input_path = config["PATH"]
samples = pd.read_csv(config["METAFILE"], sep = '\t', header = 0)['sample']
rule getPaired:
output:
fwd = temp(tmp_path + "/reads/{sample}_fwd.fastq.gz"),
rev = temp(tmp_path + "/reads/{sample}_rev.fastq.gz")
params:
input_path = input_path
run:
shell("scp -i {params.input_path}/{wildcards.sample}_*1*.f*q.gz {output.fwd}"),
shell("scp -i {params.input_path}/{wildcards.sample}_*2*.f*q.gz {output.rev}")
Input files have different patterns :
- {sampleID}_R[1-2]_001.fq.gz (for example : 2160_J15_S480_R1_001.fastq.gz)
- {sampleID}_[1-2].fq.gz (for example : SRX000001_1.fq.gz)
The getPaired rule works for input like {sample}_[1-2].fq.gz but not for the second pattern.
What am I doing wrong ?