我創建這個規則:Snakemake:規則產生奇怪的結果
rule picard_addRG2:
input:
"mapped_reads/merged_samples/{sample}.dedup.bam"
output:
"mapped_reads/merged_samples/{sample}_rg.dedup.bam"
params:
sample_idi = config['samples'],
library = "library00"
shell:
"""picard AddOrReplaceReadGroups I={input} O={output} RGID={params.sample_id} RGLB={params.library} RGPL=illumina RGPU=unit1 RGSM=20 RGPU=MP"""
我添加ØSnakemake文件規則:
expand("mapped_reads/merged_samples/{sample}_rg.dedup.bam",sample=config['samples'])
我發現了另一個規則這個奇怪的結果:
snakemake --configfile exome.yaml -np
InputFunctionException in line 17 of /illumina/runs/FASTQ/test_play/rules/samfiles.rules:
KeyError: '445_rg'
Wildcards:
sample=445_rg
我做錯了什麼?
如果我改變這樣的規則完美的作品:
rule picard_addRG2:
input:
"mapped_reads/merged_samples/{sample}.dedup.bam"
output:
"mapped_reads/merged_samples/{sample}.dedup_rg.bam"
params:
sample_id = config['samples'],
library = "library00"
shell:
"""picard AddOrReplaceReadGroups I={input} O={output} RGID={params.sample_id} RGLB={params.library} RGPL=illumina RGPU=unit1 RGSM=20 RGPU=MP"""
由於「samfiles.rules」正在拋出錯誤,您是否也能夠發佈此規則的代碼? – TBoyarski