Discussion:
[Samtools-help] tview fail to load BAM index
Fuad Gwadry
2009-11-26 20:10:34 UTC
Permalink
Hello All,

I am using samtools version 0.1.7 and generating SAM output using bowtie version 0.11.3. I am able to convert my SAM Bowtie output to BAM and then sort, however I am not able to view the sequence in tview. I consistently get the following error "bam_index_load] fail to load BAM index" however I can create an index using faidx. I am wondering if I am doing anything wrong.

***@cn-r5-18:~/src/bowtie-0.11.3> bowtie -S e_coli reads/e_coli_10000snp.fq ec_snp.sam
# reads processed: 10000
# reads with at least one reported alignment: 10000 (100.00%)
# reads that failed to align: 0 (0.00%)
Reported 10000 alignments to 1 output stream(s)
***@cn-r5-18:~/src/bowtie-0.11.3> samtools view -bS -o ec_snp.bam ec_snp.sam
[samopen] SAM header is present: 1 sequences.
***@cn-r5-18:~/src/bowtie-0.11.3> samtools sort ec_snp.bam ec_snp.sorted

***@cn-r5-18:~/src/bowtie-0.11.3> samtools tview ec_snp.sorted.bam reads/e_coli_10000snp.fa
[bam_index_load] fail to load BAM index.

however, I can still

***@cn-r5-18:~/src/bowtie-0.11.3> samtools faidx reads/e_coli_10000snp.fa

Thanks,

Fuad


_________________________________________________________________
Windows Live: Make it easier for your friends to see what you’re up to on Facebook.
http://go.microsoft.com/?linkid=9691816
Keiran Raine
2009-11-26 21:30:31 UTC
Permalink
Hi Faud,

faidx indexes the reference.fa file. You need to index your BAM file.

just run the following command before you run tview (will create
ec_sorted.bam.bai, which you need to keep co-located with the bam file).

samtools index ec_snp.sorted.bam

Regards,


Keiran Raine
Senior Computer Biologist
The Cancer Genome Project
Ext: 2100
***@sanger.ac.uk

The Wellcome Trust Sanger Institute is operated by Genome Research
Limited, a charity registered in England with number 1021457 and a
company registered in England with number 2742969, whose registered
office is 215 Euston Road, London, NW1 2BE.
Post by Fuad Gwadry
Hello All,
I am using samtools version 0.1.7 and generating SAM output using
bowtie version 0.11.3. I am able to convert my SAM Bowtie output to
BAM and then sort, however I am not able to view the sequence in
tview. I consistently get the following error "bam_index_load] fail
to load BAM index" however I can create an index using faidx. I am
wondering if I am doing anything wrong.
e_coli_10000snp.fq ec_snp.sam
# reads processed: 10000
# reads with at least one reported alignment: 10000 (100.00%)
# reads that failed to align: 0 (0.00%)
Reported 10000 alignments to 1 output stream(s)
[samopen] SAM header is present: 1 sequences.
ec_snp.sorted
reads/e_coli_10000snp.fa
[bam_index_load] fail to load BAM index.
however, I can still
e_coli_10000snp.fa
Thanks,
Fuad
Windows Live: Make it easier for your friends to see what you’re up to on Facebook.
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008
30-Day
trial. Simplify your report design, integration and deployment - and
focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july_______________________________________________
Samtools-help mailing list
https://lists.sourceforge.net/lists/listinfo/samtools-help
--
The Wellcome Trust Sanger Institute is operated by Genome Research

Limited, a charity registered in England with number 1021457 and a
compa
ny registered in England with number 2742969, whose registered
office is 2
15 Euston Road, London, NW1 2BE.
Loading...