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

BAM header to_hashmap() fails on CO records #276

Open
andrewpatto opened this issue Sep 30, 2020 · 1 comment
Open

BAM header to_hashmap() fails on CO records #276

andrewpatto opened this issue Sep 30, 2020 · 1 comment

Comments

@andrewpatto
Copy link

andrewpatto commented Sep 30, 2020

Just in doing some work on printing example BAM headers - and thought we'd use to_hashmap() to get us the header data nicely split up. But it appears to be panicking on the unwrap() at line 88 of src/bam/header.rs

let cap = TAG_RE.captures(part).unwrap();

which would make sense as the TAG_RE expects to see a colon, but the comment records do not necessarily fit that pattern

For example, the public cram

"s3://1000genomes/data/NA18616/alignment/NA18616.alt_bwamem_GRCh38DH.20150718.CHB.low_coverage.cram"

has some header records

"@co\tFASTQ=ERR009378_1.fastq.gz",

without investigating any further, my guess is that those are the records that are failing. I'm not enough of a bioinformatics expect to know if it is the headers themselves at fault, so I'll just leave it here as an issue.

@andrewpatto
Copy link
Author

@brainstorm follow up to the lambda example

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

No branches or pull requests

1 participant