1
這裏是一個config.yaml的短例如:Snakemake:帶有子項目的樣本,如何捕獲它們?
samples:
sample1:
stranded: True
sample2:
stranded: False
正如所看到的,每個樣本具有一個分項(倍數實際上)。但我不知道如何抓住他們。 我的蛇形文件:
configfile: "config.yaml"
rule all:
input:
expand("output/{sample}.bam", sample=config['samples']),
rule one:
input:
"input/{sample}.bam",
output:
"output/{sample}.bam",
run:
if config['samples']["{sample}"]['stranded']: # How catch stranded value ?
option = "--stranded",
shell(
'some_command '
' {option}'
' {input} > {output}'
)
在此先感謝您的幫助。
Hetica