Closed wulj2 closed 5 years ago
This is great. I reviewed the changes and think it makes sense.
Before I merge to the main branch, could I suggest that we make the AlignSequence method that takes an UnalignedSequence call the original AlignSequence method, and then add the comments at the end? That way if there needs to be a change to AlignSequence, the two functions don't become out of sync. Something like:
void AlignSequence(const UnalignedSequence& us, BamRecordVector& vec, bool hardclip,
double keep_sec_with_frac_of_primary_score, int max_secondary) const {
AlignSequence(us.Seq, us.Name, vec, hardclip,
keep_sec_with_frac_of_primary_score, max_secondary);
for (BamRecordVector::iterator i = vec.begin(); i != vec.end(); ++i)
if (copy_comment)
i->AddZTag("BC", us.Com);
}
wow, I didn't even think about this genius trick before. That's really a good idea.
Thank you!
Hello walaj, I have create a pull request of those functionality enhancement I mentioned in https://github.com/walaj/SeqLib/issues/41 Please check whether it's okay to merge these changes.