Skip to content

More UMI Stuff (hts_ExtractUMI and hts_SuperDeduper)#264

Merged
bnjenner merged 3 commits intomasterfrom
development
Oct 24, 2024
Merged

More UMI Stuff (hts_ExtractUMI and hts_SuperDeduper)#264
bnjenner merged 3 commits intomasterfrom
development

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.

Bradley Jenner added 3 commits September 20, 2024 13:06
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
@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