Question: Invalid BAI magic number - TorrentVariantCaller
0
gravatar for A Soggy Waffle
21 months ago by
A Soggy Waffle0 wrote:

Hi, I'm trying to run the IonTorrent variant caller standalone command line tool with the following command:

./tvc_vcp -r ../hg19.fa -o ~/scratch/p7/wbmet/ -b ../AmpliSeqExome.20141113.designed.bed -i ~/scratch/p7/856om_sorted.bam -n ~/scratch/p7/856wb_sorted.bam

note: tvc_vcp is a symlink to torrent_variant_valler.py

But get this error:

TargetsManager: BED not sorted at position 123252 replaced OR4F21_83939.1.14936:8:116072-116287 with PLCXD1_192345.128:7:200829-201012

TargetsManager: Loaded targets file ../AmpliSeqExome.20141113.designed.bed TargetsManager: 293903 target(s) (168513 after merging) TargetsManager: Targets required sorting

ERROR: Could not open BAM index file(s) :

BamMultiReader::LocatingIndexes: error while locating index files:

    BamReader::LocateIndex: could not locate index:
    BamRandomAccessController::OpenIndex: could not load index data from file: /gpfs/scratch1/3/swist3/p7/856om_sorted.bam.bai
    BamStandardIndex::CheckMagicNumber: invalid BAI magic number
    BamReader::LocateIndex: could not locate index:
    BamRandomAccessController::OpenIndex: could not load index data from file: /gpfs/scratch1/3/swist3/p7/856wb_sorted.bam.bai
    BamStandardIndex::CheckMagicNumber: invalid BAI magic number
  

(I apologize for any formatting mistakes) What's confusing is the BED file was taken from Ampliseq.com and should work fine with TorrentVariantCaller. The bed file is sorted by chrStart, why would this "Targets required sorting" prompt come up?

The more important error are the "invalid BAI magic number". I sorted and indexed the bams with samtools....I haven't yet been able to find anything on BAI magic numbers. Do you have any advice?

variant calling • 676 views
ADD COMMENTlink written 21 months ago by A Soggy Waffle0

I had a similar problem a few weeks ago in a different program, and I think the solution actually has to do with the other part of the message there: could not load index data from file; you should double check that the file actually exists at the location where the program is running. I think this was my problem as well, my symlinks were broken or weren't evaluating correctly

ADD REPLYlink written 21 months ago by steve2.4k

I tried running the command from the dir with torrent_variant_caller.py and using symlinks to the BAM files but I just get the same error. The files definitely exist, running hexdump on the symlinks works. I'm contemplating finding a way to just edit the BAI magic numbers myself, since from https://samtools.github.io/hts-specs/SAMv1.pdf I know they should be BAI\1

ADD REPLYlink written 21 months ago by A Soggy Waffle0
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 2366 users visited in the last hour