首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >蛇形MissingInputException

蛇形MissingInputException
EN

Stack Overflow用户
提问于 2022-10-14 09:15:29
回答 2查看 24关注 0票数 0

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

具体来说,当我想构建DAG时,snakemake告诉我,haplotype_caller规则没有参考基因组作为输入。但它在档案里。以下是相关代码:

代码语言:javascript
复制
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

在snakefile头中定义REFPATH和引用变量如下:

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

.yaml中的配置文件如下所示:

consensus:

代码语言:javascript
复制
`reference: "GCA_018104305.1_AalbF3_genomic.fasta"`
代码语言:javascript
复制
`path: "resources/genomes/" # Path to genome reference`

当我要DAG的时候:

代码语言:javascript
复制
snakemake -s workflow/rules/shave.smk --dag | dot -Tpng > test.png

我知道这个错误:

代码语言:javascript
复制
`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

这是蛇形动物的结构:

在这里输入图像描述

也试图使用蛇皮棉,但输出是可以的。

EN

回答 2

Stack Overflow用户

发布于 2022-10-14 16:12:28

我已经查看了您的Github,并且文件夹resources/genomes/只包含一个文件GCA_018104305.1_AalbF3_genomic.fasta.fai。您是否尝试过将该文件重命名为预期的输入名GCA_018104305.1_AalbF3_genomic.fasta,例如去掉.fai扩展名?

票数 0
EN

Stack Overflow用户

发布于 2022-10-16 02:18:51

谢谢你的回答,fasta是1.47GB。这就是为什么它不在资源/基因组文件夹中。.fai是fasta索引,对于一些像GATK这样的程序来说是必需的。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/74067011

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档