This is a test version of Biostars. For the public version, visit https://www.biostars.org.
IGV does not show BAM file information

Hello I have analyzed RNA seq data from two samples. I have compared them for SNP discovery. First, I aligned the reads to a reference genome using HiSet and creating SAM files. SAM files were converted to BAM files that were piled up using samtools mpileup. Variants were called using bcftools call. Now i want to visualise the results. I use IGV. I have loaded the reference genome file, the VCF file and the two indexed BAM files. I can see the information on specific SNPs in the VCF file but, the BAM files, even though presented as a track in the IGV, shows zero coverage and do not show any reads. Please help

rna-seq next-gen igv bam

what's the output of

samtools view -c the.bam "chrom:start-end"

in the region ?

Thank you for the quick response. The output is 0

Sorry, this is the full output:

[bam_parse_region] fail to determine the sequence name.
[main_samview] region "chrom:start-end" specifies an unknown reference name. Continue anyway.
0

You have to use your BAM file name and valid values for chrom, start and end. What was your exact command?

YRAPR$ samtools view -c R1.bam chr1B:661962935-661963208
0

Remember to zoom in significantly (start with a gene of your choice and go to that region) before you can start seeing actual reads.

Hi I am looking at a window of 275bp. I can see SNPs in the VCF file with coverage data but the BAM file coverage track say 0 coverage. When loading the BAM file to IGV, I get this error: Error encountered querying alignments: htsjdk.samtools.SAMException: Unexpected number of metadata chunks 3

htsjdk.samtools.SAMException

what is the length of the LONGEST chromosome in your reference ? if it's greater than 2^32, then i won't be supported by IGV.

1 answer

Indexed BAM access is limited to chromosomes shorter than 512Mb. You need to chop your reference chromosomes up such as they are all smaller than 512Mb, or convert your BAMs to CRAM (or SAM but then they'd be huge).

Hi The chromosomes are bigger than 512Mb. Converting to CRAM and trying to load them to IGV resulted in this error message: "Error loading BAM file: htsjdk.samtools.SAMException: Exception creating BAM index for slice slice" Thank you

Delete any .bai index file, convert to SAM, then to CRAM. It might also be worth trying samtools (v1.6) to generate the CRAM if you're having issues.

My solution was to use sam files, they were indexed by igv.
Thank you

Log in to answer this question.