Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support BAI index aka BAM index index #802

Closed
cmdcolin opened this issue Jan 26, 2020 · 2 comments
Closed

Support BAI index aka BAM index index #802

cmdcolin opened this issue Jan 26, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@cmdcolin
Copy link
Collaborator

For some BAM files like nanopore and pacbio, the index file is regularly 100MB or bigger

There is the concept of a BAI index created here
https://github.com/hammerlab/bai-indexer/

This implementation doesn't include the chromosome names in the BAI index, so it is actually not really usable for us IMO. I don't think it's a good thing to rely on chromosomes being connected to the index in an array e.g. chr1 is position 0 in array

So we probably want our own BAI index, and also we could create a BAI index on the e.g. first download BAI, then index it and store it in localstorage or similar, then subsequent refreshes use the BAI index. This is good because chrome decides not to cache large BAI files in it's file cache. We can also have a on-disk representation of the BAI index so that this could be used instead of the localstorage also

@cmdcolin cmdcolin added the enhancement New feature or request label Jan 26, 2020
@cmdcolin
Copy link
Collaborator Author

I had also discussed on desktop the entire index files could be cached (samtools for example does this) but having BAI index cache would basically be sufficient to cut down download times and would help both web and desktop

@cmdcolin cmdcolin changed the title Support BAI index Support BAI index aka BAM index index Jan 27, 2020
@cmdcolin
Copy link
Collaborator Author

cmdcolin commented Feb 1, 2020

Moved to bam-js GMOD/bam-js#52

@cmdcolin cmdcolin closed this as completed Feb 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant