我一直在使用下面的腳本,但是,我不斷收到輸出錯誤。任何想法為什么?
#!/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}
上面的腳本是并行化行程 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 創建多個檔案,以避免檔案名沖突。我很難上傳任何檔案,因為它們非常大,而且我的互聯網速度非常慢。謝謝你的幫助。
uj5u.com熱心網友回復:
建議更換線路:
geome=/storage1/DISK1/TCGA_scripts/ref_genome/GRCh38.ref.fa
帶線:
genome=/storage1/DISK1/TCGA_scripts/ref_genome/GRCh38.ref.fa
轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/434635.html
