我想要一个规则来执行正常和肿瘤之间的重新排列。主要问题是我不知道如何解决这个问题。是通配符还是扩展我的问题的答案?
这是我的样品清单:
conditions:
pair1:
tumor: "432"
normal: "433"
所以规则需要是这样的
rule gatk_RealignerTargetCreator:
input:
expand("mapped_reads/merged_samples/{sample}.sorted.dup.reca.bam",sample=config['conditions']['pair1']['tumor']),
"mapped_reads/merged_samples/{sample}.sorted.dup.reca.bam",sample=config['conditions']['pair1']['normal']),
output:
"mapped_reads/merged_samples/{pair1}.realign.intervals"
如何在条件下对所有键执行此操作?(我想有更多的一对)
我试过这段代码:
input:
lambda wildcards: config["conditions"][wildcards.condition],
tumor= expand("mapped_reads/merged_samples/{tumor}.sorted.dup.reca.bam",tumor=config['conditions'][wildcards.condition]['tumor']),
normal = expand("mapped_reads/merged_samples/{normal}.sorted.dup.reca.bam",normal=config['conditions'][wildcards.condition]['normal']),
output:
"mapped_reads/merged_samples/{tumor}/{tumor}_{normal}.realign.intervals"
名称“通配符”未定义
??