我一直在使用下面的脚本,然而,我不断地得到一个错误的输出。知道为什么吗?
#!/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文件中的变体。以下错误一直处于锁定状态:
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创建许多文件,从而避免了文件名冲突。我很难上传任何一个文件,因为它们很大,而且我的互联网速度非常慢。谢谢你的帮助。
发布于 2022-02-25 19:45:18
建议替换线:
geome=/storage1/DISK1/TCGA_scripts/ref_genome/GRCh38.ref.fa一行:
genome=/storage1/DISK1/TCGA_scripts/ref_genome/GRCh38.ref.fahttps://stackoverflow.com/questions/71266991
复制相似问题