IGV does not show BAM file information
1
0
Entering edit mode
7.0 years ago
Hans ▴ 140

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 • 6.2k views
ADD COMMENT
0
Entering edit mode

what's the output of

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

in the region ?

ADD REPLY
0
Entering edit mode

Thank you for the quick response. The output is 0

ADD REPLY
0
Entering edit mode

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
ADD REPLY
1
Entering edit mode

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

ADD REPLY
0
Entering edit mode
YRAPR$ samtools view -c R1.bam chr1B:661962935-661963208
0
ADD REPLY
0
Entering edit mode

there is no read in that region.

ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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.

ADD REPLY
0
Entering edit mode
7.0 years ago
d-cameron ★ 2.9k

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).

ADD COMMENT
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

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

ADD REPLY

Login before adding your answer.

Traffic: 2541 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6