Skip to content

SAM input to gBAM - #27

Open
chris7716 wants to merge 8 commits into
NickRoz1:masterfrom
chris7716:rust-sam-support
Open

chris7716 wants to merge 8 commits into
NickRoz1:masterfrom
chris7716:rust-sam-support

Conversation

@chris7716

@chris7716 chris7716 commented Jul 14, 2025

Copy link
Copy Markdown
Contributor

Logic

  • SAM record -> BAM record -> gBAM record

SAM > GBAM > SAM records are identical. But there is an issue in the rust GBAM reader code how we set SAM header. We do not set AS: tags in the header when reconverting gbam to bam. Because of that reconverted bam's header is not identical to the orginal bam's header. https://github.com/NickRoz1/gbam/blob/master/gbam_tools/src/bam/gbam_to_bam.rs#L21-L24

@AndreaGuarracino

AndreaGuarracino commented Jul 14, 2025 via email

Copy link
Copy Markdown
Contributor

@chris7716

Copy link
Copy Markdown
Contributor Author

Can we avoid going through BAM records? Sent from Outlook for Androidhttps://aka.ms/AAb9ysg

The current gbam writer expects a BAMRawRecord. Because of that I converted the SamRecord to BAMRawRecord rather than directly passing the sam record. I felt it would be risky to change the stable writer code to support SAM directly. But if there are "considerable" performance issuse, we may consider avoid creating BAMRawRecords. WDYT @AndreaGuarracino

@AndreaGuarracino

AndreaGuarracino commented Jul 14, 2025 via email

Copy link
Copy Markdown
Contributor

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