How can I specify the file obtained by glob_wildcards
?
Suppose I have sample1.txt, sample2.txt, sample3.txt, and sample4.txt are in the same directory.
The following code is just an example:
FILES = glob_wildcards("data/{sample}.txt")
SAMPLES = FILES.sample
rule all:
input:
expand("{sample}txt", sample=SAMPLES),
"concat.txt"
rule concat:
input:
SAMPLES[0],
SAMPLES[1]
output:
"concat.txt"
shell:
"cat {input[0]} {input[1]} > {output}"
When I want to concat sample1.txt and sample2.txt as shown in rule concat
, how can I specify those files? Is it correct to write SAMPLES[0]
and SAMPLES[1]
?