[Gmod-ajax] Faster initial BAM tracks

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[Gmod-ajax] Faster initial BAM tracks

Keiran Raine

Thought this would be worth highlighting as I know the BAM tracks use the same underlying code as BioDalliance.


Keiran Raine
Principal Bioinformatician
Cancer Genome Project
Wellcome Trust Sanger Institute

Tel:+44 (0)1223 834244 Ext: 7703
Office: H104

Begin forwarded message:

From: Dan Vanderkam <[hidden email]>
Subject: [Samtools-devel] Indexing a BAM Index (BAI)
Date: 24 October 2014 19:54:43 BST

My group's BAI files have gotten quite large (10+MB) and are proving to be a bottleneck when loading interactive visualizations like IGV or BioDalliance. Downloading a 10MB file takes many seconds, during which time the visualization can't display anything.

A simple index of the BAM Index would solve this -- if I'm viewing short reads on a small portion of chr20, there's no reason that the visualization should have to pull in all the index data for the other chromosomes.

I asked about this on BioStars (https://www.biostars.org/p/116339/) but didn't get any clear guidance about how to index the BAM index.

So I wrote my own:

and added support for it to BioDalliance:

The index index is a simple JSON blob of byte ranges. Using this took the initial load time for BioDalliance on my test page from ~20s down to ~2s. A huge win!

I'm curious what others thoughts are on this:
- Does the CRAM format mitigate this problem?
- Does CSI (instead of BAI) help with this?
- Is there a more standard approach?

My thought for now is to put a foo.bam.bai.json file alongside all my foo.bam.bai files.

  - Dan
Samtools-devel mailing list
[hidden email]

-- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.


Gmod-ajax mailing list
[hidden email]