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

More UMI Stuff (hts_ExtractUMI and hts_SuperDeduper) #264

Merged
merged 3 commits into from
Oct 24, 2024
Merged

Conversation

bnjenner
Copy link
Collaborator

So this PR has a number of changes.

  1. Additional parameters for EU (specifies separator for PE reads, optionally add UMI as a tag similar to primers) and SD (specifies column for UMI and tag option which looks in the comments of the read.)
  2. SD now correctly handles UMIs from paired end reads (would just double up on the UMI from R1 before).
  3. EU can now add UMIs in 4 ways: To R1, to R2, to both reads individually, or to both reads in tandem (i.e. ACGT+ACGT). I can clarify this a bit more with an example if needed.
  4. Added tests for the new functionality in EU and SD.
  5. Unset UMI delimiter in SD is now a space as to avoid an invalid character in the json files that other programs don't seem to like.

This one is definitely gonna need some review so let me know if any of you would like to schedule a zoom chat to discuss the changes.

Copy link
Collaborator

@joe-angell joe-angell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

for (const auto &c : get_comment()) {
idx = c.find("RX:Z:");
if (idx != std::string::npos) {
std::string umi = c.substr(idx + 5);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will the "RX:Z:" portion always be at the end of the comment string?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems to be the standard for the UMI information.

if (dragen & (del != ':')) {
throw HtsIOException("Delimiter (--delimiter) must be ':' to be compatible with --DRAGEN parameter");
if (dragen & (del != ':' || sep != '+')) {
throw HtsIOException("Delimiter (--delimiter) must be ':' and Separator (--separator) was be '+' to be compatible with --DRAGEN parameter");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Separator (--separator) was be '+' -> must be

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops

@bnjenner bnjenner merged commit e43f33c into master Oct 24, 2024
2 checks passed
@bnjenner
Copy link
Collaborator Author

Matt and I were talking about making this a release, any thoughts on that or things to change / bugs to fix before we make that happen?

@joe-angell
Copy link
Collaborator

joe-angell commented Oct 24, 2024 via email

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