You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be great if there was some way to convert an alignment into a SAM/BAM.Record so that it could be exported to the filesystem for future use. Note that I will only refer to SAM.Record from here on, but the same would be expected for BAM.Record, along the lines of #25.
Expected Behavior
Ideally, this would simply be a new method for the SAM.Record constructor. Something like
XAM.SAM.Record(aln::PairwiseAlignment, kwargs...)
There would need to be other information (possibly with defaults?) added, as a SAM.Record contains more fields than
Current Behavior
There is no such behavior.
Possible Solution / Implementation
The challenge here is that SAM.Records store more information than PairwiseAlignments. Here's a map of what I think could be inferred vs. what needs to be passed as an argument.
It might be possible to compute some of the flags based on the sequence, but I don't know how to do so.
**
In my experience, BioAlignments.cigar generates an alignment that always starts at position 1, and then pads it with deletions.
***
These fields are context-sensitive. Maybe generating records should be stateful 🤷?
****
Technically, the Number of Mismatches field is optional, but it is included in the recommended practices, and some tools fail if it isn't included.
Context
I was working on generating very specific alignments for variant calling purposes, and found that I couldn't export the result to another tool. Having this functionality would remedy that.
The text was updated successfully, but these errors were encountered:
It would be great if there was some way to convert an alignment into a
SAM
/BAM.Record
so that it could be exported to the filesystem for future use. Note that I will only refer toSAM.Record
from here on, but the same would be expected forBAM.Record
, along the lines of #25.Expected Behavior
Ideally, this would simply be a new method for the
SAM.Record
constructor. Something likeThere would need to be other information (possibly with defaults?) added, as a
SAM.Record
contains more fields thanCurrent Behavior
There is no such behavior.
Possible Solution / Implementation
The challenge here is that
SAM.Record
s store more information thanPairwiseAlignment
s. Here's a map of what I think could be inferred vs. what needs to be passed as an argument.PairwiseAlignment
accessorNotes
*
It might be possible to compute some of the flags based on the sequence, but I don't know how to do so.
**
In my experience,
BioAlignments.cigar
generates an alignment that always starts at position 1, and then pads it with deletions.***
These fields are context-sensitive. Maybe generating records should be stateful 🤷?
****
Technically, the Number of Mismatches field is optional, but it is included in the recommended practices, and some tools fail if it isn't included.
Context
I was working on generating very specific alignments for variant calling purposes, and found that I couldn't export the result to another tool. Having this functionality would remedy that.
The text was updated successfully, but these errors were encountered: