SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem merging BAM files hlwright Bioinformatics 6 10-11-2011 12:36 AM
problem converting bam to pileup crh Bioinformatics 0 08-01-2011 12:35 PM
problem with indexing using bfast fjackling Bioinformatics 2 06-30-2011 06:19 PM
help me on reheader ".bam for indexing and mpileup jianfeng.mao Bioinformatics 3 12-17-2010 02:48 AM
Error indexing BAM file using samtools veena Bioinformatics 9 03-04-2010 04:52 AM

Reply
 
Thread Tools
Old 01-27-2012, 02:12 PM   #1
SeqVicious
Member
 
Location: New Hampshire

Join Date: Sep 2011
Posts: 20
Default Bam indexing problem?

After a struggle to get samtools successfully installed and working on my windows machine, I'm now having trouble (I think) indexing a bam file. I'm using cygwin to use samtools. I'm planning on visualizing a metagenomic sequence for SNP screening in IGV but the bam file format isn't supported. A message pops up saying that the bam file needs to be indexed. In samtools I'm using ./samtools sort <file.bam> <file.sorted> and a sorted file is successfully made. However when I go to index the file using ./samtools index file.sorted.bam a 24kb file is made. Is there something I'm doing wrong here? Thank you all for your help so far.
SeqVicious is offline   Reply With Quote
Old 01-27-2012, 04:14 PM   #2
swbarnes2
Senior Member
 
Location: San Diego

Join Date: May 2008
Posts: 912
Default

IGV supports .bam files. I look at indexed .bam files all the time on IGV. It woud be rather useless software if it didn't handle .bams. 24 kb sounds about right for the index. Make the index, then try to load the .bam into IGV.
swbarnes2 is offline   Reply With Quote
Old 01-27-2012, 04:27 PM   #3
mnkyboy
Member
 
Location: Seattle, WA

Join Date: Mar 2009
Posts: 87
Default

IGV will also index them for you if you do not have one.
mnkyboy is offline   Reply With Quote
Old 01-28-2012, 06:29 AM   #4
SeqVicious
Member
 
Location: New Hampshire

Join Date: Sep 2011
Posts: 20
Default

When I try to load a .bam file it tells me it needs to be indexed. Do I have to load both the .bam and the index simultaneously?
SeqVicious is offline   Reply With Quote
Old 01-28-2012, 10:34 AM   #5
swbarnes2
Senior Member
 
Location: San Diego

Join Date: May 2008
Posts: 912
Default

No, just load the .bam. IGV will lok for a .bam.bai with the same name in the directory with the .bam, and when it finds it, it will work.
swbarnes2 is offline   Reply With Quote
Old 01-28-2012, 10:53 AM   #6
SeqVicious
Member
 
Location: New Hampshire

Join Date: Sep 2011
Posts: 20
Default

Thank you for your help guys, I got it to work.
SeqVicious is offline   Reply With Quote
Old 01-29-2012, 10:12 AM   #7
Jim Robinson
Member
 
Location: Boston, MA

Join Date: May 2009
Posts: 75
Default

Hi,
I'd like to make a slight correction for the benefit of future googlers. IGV will not create an index for a BAM file, although we might add this in the future. Use samtools or Picard to create such an index. It will index a SAM file for you, that is an IGV specific index created before the BAM index spec and implementation were finished, i.e. a long time ago. We keep it for backward compatibility, but it is not the same index as the BAM file index.
Jim
Jim Robinson is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 07:01 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO