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

Stop dumping GAM to stdout when reading >1k BED or GFF records #4363

Merged
merged 6 commits into from
Aug 7, 2024

Conversation

adamnovak
Copy link
Member

Changelog Entry

To be copied to the draft changelog by merger:

  • When reading more than 1000 BED or GFF records, vg will no longer dump the first records to standard output and forget about them

Description

In ae44fca @jmonlong improved memory usage when converting large BED and GFF files to GAM, by adding points at which we flush the output buffer. But when I merged #4248 I didn't notice that that buffer isn't always an output buffer and is sometimes an internal collection of annotations to work with later.

So whenever we tried to load and keep a lot of annotations, we would dump them out in GAM chunks of 1000 records each and throw them away, whenever we hit 1000 loaded records.

This fixes that.

@jmonlong
Copy link
Contributor

jmonlong commented Aug 1, 2024

Sorry about the bug I introduced @adamnovak. I didn't notice that region-parsing function was used somewhere else...

I noticed the issue this week when working to make vg annotate output GAF. In #4364 I think we get both the fix and GAF output feature. If it looks good to you, could we merge this one (or add a GAF output mode to yours)?

@adamnovak adamnovak merged commit 683aa18 into master Aug 7, 2024
2 checks passed
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

Successfully merging this pull request may close these issues.

2 participants