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

appending records to a .bam #3250

Open
notestaff opened this issue Mar 5, 2024 · 1 comment
Open

appending records to a .bam #3250

notestaff opened this issue Mar 5, 2024 · 1 comment
Labels
question a user question how to do certain things

Comments

@notestaff
Copy link

Is it possible with seqan3 to open a .bam file for writing in append mode, so that any records pushed to it get appended to the end, but the file header of the existing file is not touched (and a new file header is not mistakenly appended)? Thanks! @eseiler

@notestaff notestaff added the question a user question how to do certain things label Mar 5, 2024
@smehringer
Copy link
Member

Hi @notestaff,

interesting use case. No, currently this is not possible because a header is always written. There might be even more issues but this one I am sure of.

The problem with allow appending to a BAM file is that you have to extremely careful that the header information in the file-to-be-appended-to is the same as the one in memory of the program writing new records. Do you know if other tools allow this?

An obvious workaround (that you are probably already using) is to write individual files and then, as a postprocessing step, concatenate them all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question a user question how to do certain things
Projects
None yet
Development

No branches or pull requests

2 participants