Keep getting error: [E::fai_build3_core] Failed to open the file --regions for a script I have been using

Keep getting error: [E::fai_build3_core] Failed to open the file --regions for a script I have been using

我一直在使用下面的脚本,但是我一直在输出错误。有什么想法吗?

#!/bin/bash

set - eu

bam_input=

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  \
        --output-type u \
         | \
    bcftools call --multiallelic-caller \
                  --variants-only \
                  --output-type u - > ${1/.bam/}..bcf
}

export -f parallel_call


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

以上脚本是并行化进程 mpileup 的第一步,它应该在 .bam 文件中计算变体。不断出现以下错误:

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 创建多个文件,从而避免文件名冲突。我很难上传任何文件,因为它们很大而且我的网速​​很慢。感谢您的帮助。

建议更换线路:

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

配线:

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