Bedtools multicov: Could not find/load indexes.

761 views
Skip to first unread message

Davide Gaudesi, Ph.D.

unread,
Mar 1, 2018, 12:46:55 PM3/1/18
to bedtools-discuss
Dear bedtools users,

I tried to use bedconv in multicov mode to get reads count on my RNAseq samples; I put all the necessary files in the sam directory:

- bam files
- bai files
- bed file

but when I lunch the command:

bedtools multicov -bams *.bam -bed mm10_genes.bed


This is the error I get:

Could not find/load indexes.
BamMultiReader::LocatingIndexes: error while locating index files:
    BamReader::LocateIndex: could not locate index:
    BamRandomAccessController::OpenIndex: could not load index data from file: d28-30-1.merge.bam.bai
    BamStandardIndex::OpenFile: could not open file: d28-30-1.merge.bam.bai
    BamReader::LocateIndex: could not locate index:
    BamRandomAccessController::OpenIndex: could not load index data from file: d28-30-2.merge.bam.bai
    BamStandardIndex::OpenFile: could not open file: d28-30-2.merge.bam.bai
    BamReader::LocateIndex: could not locate index:
    BamRandomAccessController::OpenIndex: could not load index data from file: d28-30.merge.bam.bai
    BamStandardIndex::OpenFile: could not open file: d28-30.merge.bam.bai
    BamReader::LocateIndex: could not locate index:
    BamRandomAccessController::OpenIndex: could not load index data from file: d9-20-1.merge.bam.bai
    BamStandardIndex::OpenFile: could not open file: d9-20-1.merge.bam.bai
    BamReader::LocateIndex: could not locate index:
    BamRandomAccessController::OpenIndex: could not load index data from file: d9-20-2.merge.bam.bai
    BamStandardIndex::OpenFile: could not open file: d9-20-2.merge.bam.bai
    BamReader::LocateIndex: could not locate index:
    BamRandomAccessController::OpenIndex: could not load index data from file: d9-20.merge.bam.bai
    BamStandardIndex::OpenFile: could not open file: d9-20.merge.bam.bai
    BamReader::LocateIndex: could not locate index:
    BamRandomAccessController::OpenIndex: could not load index data from file: wt-1.merge.bam.bai
    BamStandardIndex::OpenFile: could not open file: wt-1.merge.bam.bai
    BamReader::LocateIndex: could not locate index:
    BamRandomAccessController::OpenIndex: could not load index data from file: wt-2.merge.bam.bai
    BamStandardIndex::OpenFile: could not open file: wt-2.merge.bam.bai
    BamReader::LocateIndex: could not locate index:
    BamRandomAccessController::OpenIndex: could not load index data from file: wt.merge.bam.bai
    BamStandardIndex::OpenFile: could not open file: wt.merge.bam.bai




I also tried using one single bam file:

bedtools multicov -bams wt.merge.bam -bed mm10_genes.bed

nontheless I get the same error messagge:

Could not find/load indexes.
BamMultiReader::LocatingIndexes: error while locating index files:
    BamReader::LocateIndex: could not locate index:
    BamRandomAccessController::OpenIndex: could not load index data from file: wt.merge.bam.bai
    BamStandardIndex::OpenFile: could not open file: wt.merge.bam.bai.



Is there anybody who can help me, please?
Kind regards

--

Davide Gaudesi Ph.D.

ttnph...@gmail.com

unread,
Dec 7, 2018, 9:11:40 AM12/7/18
to bedtools-discuss
Hi Davide,

I literally had the same problem but I fixed the issue by renaming my index file. For example, if my bam file is named 'A.bam' then my index file would be 'A.bam.bai' and NOT (what I had previously) 'A.bai'. I know this is a late reply but I hope that it resolves your issue and others in the future.

Kind regards,
A really inexperience bioinformatician 
Reply all
Reply to author
Forward
0 new messages