【问题标题】:Snakemake - MissingInputExceptionSnakemake - MissingInputException
【发布时间】:2022-10-15 00:12:28
【问题描述】:

我的蛇形管道包含 31 条规则,让我发疯。这是一个使用 BWA 和 HaplotypeCaller 等的映射和 snp 调用管道。根据使用的程序,我为每个规则创建了一个 conda 环境。我的代码很长,如果需要可以在此地址查看:https://github.com/ltalignani/SHAVE1

具体来说,当我想构建 DAG 时,snakemake 告诉我 haplotype_caller 规则没有参考基因组作为输入。但它在文件中。这是相关的代码:

rule haplotype_caller_gvcf:
# Aim: Call germline SNPs and indels via local re-assembly of haplotypes
# Use: gatk --java-options '-Xmx{MEM_GB}g' HaplotypeCaller  \
#           -R Homo_sapiens_assembly38.fasta \
#           -I input.bam \
#           -O output.g.vcf.gz \
#           -ERC GVCF                                                     # Essential to GenotypeGVCFs: produce genotype likelihoods
message:
    "HaplotypeCaller calling SNVs and Indels for {wildcards.sample} sample ({wildcards.aligner}-{wildcards.mincov})"
conda:
    GATK4
input:
    refpath = REFPATH,
    reference = REFERENCE,
    bam = "results/04_Variants/{sample}_{aligner}_{mincov}X_indel-qual.bam"                                                           
output:
    gvcf="results/04_Variants/haplotypecaller/{sample}_{aligner}_{mincov}X_variant-call.g.vcf"
log:
    "results/11_Reports/haplotypecaller/{sample}_{aligner}_{mincov}X_variant-call.log"               # optional
resources:
    mem_gb= MEM_GB,
shell:
    "gatk HaplotypeCaller " # --java-options '-Xmx{resources.mem_gb}g'
    "-R {input.refpath}{input.reference} "
    "-I {input.bam} "
    "-O {output.gvcf} "
    "-ERC GVCF"                                         # Essential to GenotypeGVCFs: produce genotype likelihoods

在蛇文件头中定义如下的 REFPATH 和 REFERENCE 变量:

REFPATH = config["consensus"]["path"] # Path to reference genome REFERENCE = config["consensus"]["reference"] # Genome reference sequence, in fasta format

.yaml 中的配置文件是这样的:

consensus:

reference: "GCA_018104305.1_AalbF3_genomic.fasta"

path: "resources/genomes/" # Path to genome reference

当我要求 DAG 时:

snakemake -s workflow/rules/shave.smk --dag | dot -Tpng > test.png

我收到此错误:

`MissingInputException in line 247 of /Users/loic/snakemake/short-read-alignment-vector-pipeline/workflow/rules/shave.smk:`

Missing input files for rule haplotype_caller_gvcf:

GCA_018104305.1_AalbF3_genomic.fasta

这是蛇形的结构:

enter image description here

还尝试使用snakemake --lint,但输出正常。

【问题讨论】:

    标签: snakemake


    【解决方案1】:

    我查看了你的 Github,文件夹 resources/genomes/ 只包含一个文件 GCA_018104305.1_AalbF3_genomic.fasta.fai。您是否尝试过将此文件重命名为预期的输入名称GCA_018104305.1_AalbF3_genomic.fasta,例如摆脱.fai 扩展?

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-11-11
      • 1970-01-01
      • 2020-07-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-11-13
      • 1970-01-01
      相关资源
      最近更新 更多