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-best runs on BAMs without @RG readgroups, but fails at the end and truncates them #19

Open
AndrewC160 opened this issue Jul 20, 2024 · 1 comment

Comments

@AndrewC160
Copy link

AndrewC160 commented Jul 20, 2024

If the BAM files used do not contain an @ RG header, bam-best appears to finish the file fine but then fail at 100%, truncating the output BAMs and failing to produce a stats file. Not a tremendous issue since most BAMs will have @ RG headers and easy enough to fix, but maybe it would be possible to use a dummy @ RG value with a warning, or just have bam-best check for this at run time.

The essential part of the error message with such files is the following:

Cannot invoke htsjdk.samtools.SAMRecord.getReadName() because buffer[idx] is null

@mbreese
Copy link
Member

mbreese commented Jul 27, 2024

Can you include a full stack trace? I can't find where read-groups would play into this...

I think you are seeing two separate issues.

The other thing to try is to run bam-best with the -v verbose argument to see exactly what read throws the error.

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

2 participants