首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >继续获取错误:[E::fai_build3_core]未能打开我一直在使用的脚本的文件区域

继续获取错误:[E::fai_build3_core]未能打开我一直在使用的脚本的文件区域
EN

Stack Overflow用户
提问于 2022-02-25 14:01:36
回答 1查看 370关注 0票数 0

我一直在使用下面的脚本,然而,我不断地得到一个错误的输出。知道为什么吗?

代码语言:javascript
复制
#!/bin/bash

set - eu

bam_input=$3

geome=/storage1/DISK1/TCGA_scripts/ref_genome/GRCh38.ref.fa
export genome




function bam_chromosomes {
        samtools idxstats $bam_input | cut -f 1 | grep -v '*'
}

export -f bam_chromosomes




function parallel_call {
    bcftools mpileup \
        --fasta-ref ${genome} \
        --regions $2 \
        --output-type u \
        $1 | \
    bcftools call --multiallelic-caller \
                  --variants-only \
                  --output-type u - > ${1/.bam/}.$2.bcf
}

export -f parallel_call


chrom_set=`bam_chromosomes test.bam`
parallel --verbose -j 90% parallel_call sample_A.bam ::: ${chrom_set}

上面的脚本是并行化流程mpil发的第一步,它应该计算.bam文件中的变体。以下错误一直处于锁定状态:

代码语言:javascript
复制
parallel_call sample_A.bam 'Usage:'
parallel_call sample_A.bam samtools
parallel_call sample_A.bam idxstats
parallel_call sample_A.bam '[options]'
Note: none of --samples-file, --ploidy or --ploidy-file given, assuming all sites are     diploid
[E::fai_build3_core] Failed to open the file --regions
Failed to open -: unknown file type
parallel_call sample_A.bam '<in.bam>'
Note: none of --samples-file, --ploidy or --ploidy-file given, assuming all sites are   diploid
[E::fai_build3_core] Failed to open the file --regions
Failed to open -: unknown file type
Note: none of --samples-file, --ploidy or --ploidy-file given, assuming all sites are   diploid
[E::fai_build3_core] Failed to open the file --regions
Failed to open -: unknown file type
parallel_call sample_A.bam --input-fmt-option
parallel_call sample_A.bam 'OPT[=VAL]'
Note: none of --samples-file, --ploidy or --ploidy-file given, assuming all sites are  diploid
[E::fai_build3_core] Failed to open the file --regions
Failed to open -: unknown file type
parallel_call sample_A.bam Specify
parallel_call sample_A.bam a
Note: none of --samples-file, --ploidy or --ploidy-file given, assuming all sites are diploid
[E::fai_build3_core] Failed to open the file --regions

理论上,上面的脚本应该使用变量替换${1/..bam/}.$2.bcf创建许多文件,从而避免了文件名冲突。我很难上传任何一个文件,因为它们很大,而且我的互联网速度非常慢。谢谢你的帮助。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-02-25 19:45:18

建议替换线:

代码语言:javascript
复制
 geome=/storage1/DISK1/TCGA_scripts/ref_genome/GRCh38.ref.fa

一行:

代码语言:javascript
复制
 genome=/storage1/DISK1/TCGA_scripts/ref_genome/GRCh38.ref.fa
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71266991

复制
相关文章

相似问题

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