Question: Tophat & IGV viewing
0
gravatar for aleka
4.0 years ago by
aleka100
United Kingdom
aleka100 wrote:

Hi, I got the accepted_hits.bam from tophat, I created the index with samtools and then I created in IGV a genome using the reference fasta and gtf file for my species (staphylococcus aureus) and once I load the accepted_hits.bam file, IGV gives me an error. 

Any idea why?

ADD COMMENTlink modified 4.0 years ago by Istvan Albert ♦♦ 81k • written 4.0 years ago by aleka100
2

It certainly wouldn't hurt to post the error message.

ADD REPLYlink written 4.0 years ago by Brian Bushnell16k

I got exactly the same kind of error, which is the standard "Could not load index file for: /media/gigiux/float_ngs/mtb/samp1/accepted_hits.bam An index file is required for SAM & BAM files". Aleka, did you get any feedback on this issue?

ADD REPLYlink written 3.5 years ago by marongiu.luigi420

A reason why IGV does not open the accepted_hits.bam might be that it has to be indexed with samtools first, as I have found out in this link. What are the command lines to do that I don't know yet...

ADD REPLYlink written 3.5 years ago by marongiu.luigi420

The way I did is goes like this. Mapping on IGV requires the creation of sorted and indexed files with samtools (sort gives the .bam extension automatically; index creates a .bam.bai file that works as reference for the .bam; both .bam and .bam.bai need to have the same root name; IGV loads the .bam but then uses the .bam.bai internally):

samtools sort <accepted_hits.bam> <sort>
samtools index <sort.bam>
ADD REPLYlink written 3.5 years ago by marongiu.luigi420
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: 2068 users visited in the last hour