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

Handle crai file support #105

Open
AlistairNWard opened this issue Aug 21, 2018 · 2 comments
Open

Handle crai file support #105

AlistairNWard opened this issue Aug 21, 2018 · 2 comments
Labels

Comments

@AlistairNWard
Copy link
Member

Currently bai files are used to calculate various metrics. Ensure we can do the same for crai.

@chmille4
Copy link
Member

Turns out this is easier then we thought. A CRAI file is a gzipped tab delimited file containing the following columns:

  1. Sequence id
  2. Alignment start
  3. Alignment span
  4. Container start byte offset in the file
  5. Slice start byte offset in the container data (‘blocks’)
  6. Slice bytes

So here is a script that will take a crai file and generate output that is identical to bamReadDepther.
craiReadDepther.js.zip

There are two things left to do for bam.iobio to support cram/crai:

  1. Turn craiReadDepther into a new deployed service. @yiq can help with this.
  2. Update bam.iobio to identify cram/crai files and then use the new craiReadDepther services instead of the bamReadDepther service.

An alternative would be to wrap the bamReadDepther with a simple script that identifies crai and bai files and sends them to the correct parser. This is probably more robust. Yi, any thoughts?

@tonydisera
Copy link
Collaborator

Excellent!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants