Entering edit mode
8.4 years ago
nikelle.petrillo
▴
110
Hello,
I created a de novo transcriptome assembly using Trinity. I used Trinity's align_and_estimate_abundance.pl to align my reads using bowtie. I now want to visualize my reads and I have heard a lot about using IGV, however, do I need to sort and index my bowtie.bam file before loading it into IGV?
I tried samtools sort bowtie.bam and I am not sure what is supposed to happen to my .bam file but
If anyone can shed some light on this that would be much appreciated,
Thank you,
Nikelle
Yes you do need to sort and index your alignment file before loading it into IGV. If you are using the new samtools (v.1.3) you need to provide a filename for the sorted version by using the
-o
option withsamtools sort
. Thensamtools index
the sorted file.Thanks Genomax.
I followed your instructions. When I went to upload the file into IGV, there was an error saying:
ERROR: Loading SAM/BAM index files are not supported: /Users/nikellepetrillo/Documents/Senior/RichardsonResearch/Research Meeting/bowtiesorted.bai Load the SAM or BAM file directly.
I am not sure what the problem is
As the error suggests, load the BAM file directly. It looks like you are loading a BAI file, not BAM file. However, the loaded BAM file should have a corresponding BAI file in the same directory.
Hi Nikelle,
I'm not sure if you figured this out. But here's my input...
The extension if you index the BAM files using samtools is usually .bam.bai. I've found heaps of resources online saying that you need to upload a coordinate-sorted, and indexed BAM file. However, I've found that IGV will only take a BAM file without the .bai extension. So I use samtools to sort the BAM file by coordinates, then upload that one to IGV.
samtools sort <filename.bam> <filename_sorted>
During the process samtools will create a heap of intermediate files, then join them all together to give a single file at the end.