-
Notifications
You must be signed in to change notification settings - Fork 597
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
Added a distinction between PCR orientation and Optical Duplicates orientation in MarkDuplicatesSpark #4752
Conversation
2120c70
to
918645b
Compare
Codecov Report
@@ Coverage Diff @@
## master #4752 +/- ##
==============================================
+ Coverage 80.097% 80.147% +0.05%
- Complexity 17402 17558 +156
==============================================
Files 1080 1082 +2
Lines 63067 63387 +320
Branches 10174 10238 +64
==============================================
+ Hits 50515 50803 +288
- Misses 8566 8582 +16
- Partials 3986 4002 +16
|
…een orientation for optical duplicats and orientation for PCR duplicates
8a0d340
to
a24be24
Compare
@lbergelson This is rebased on master and theoretically working representing that bugfix now when you get the chance to take a look. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a few aesthetic comments, docs, and a request for an additional test.
(((long)((PairedEnds)record).getUnclippedStartPosition()) << 32 | | ||
((PairedEnds)record).getFirstRefIndex() << 16 ); | ||
//| ((PairedEnds)pe).getLibraryIndex())).values(); | ||
((((long)((PairedEnds)record).getUnclippedStartPosition()) << 32) | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would remove this redundant casting, by making the type of the record
argument PairedEnds
and then casting when you call instead of here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
if (R1R && R2R) { | ||
return ReadEnds.RR; | ||
} | ||
if (R1R) { | ||
return ReadEnds.RF; //at this point we know for sure R2R is false | ||
return (optical&&wasFlipped)? ReadEnds.FR : ReadEnds.RF; //at this point we know for sure R2R is false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we get some spaces here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
} | ||
if (R2R) { | ||
return ReadEnds.FR; //at this point we know for sure R1R is false | ||
return (optical&&wasFlipped)? ReadEnds.RF :ReadEnds.FR; //at this point we know for sure R1R is false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
} | ||
|
||
@Override | ||
public byte getPCROrientation() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe rename to getOrientationForPCRDuplicates
? It makes it sound like it's somehow the orientation of the PCR which doesn't mean anything to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method should get some javadoc too explain why it's different than optical.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
public abstract int getScore(); | ||
|
||
public abstract boolean isR1R(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we rename this? it's totally unintuitive, we could just expand to isRead1ReverseStrand which is still kind of nasty, but at least someone could figure it out
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -171,14 +166,23 @@ public String toString() { | |||
* Returns one of {@link ReadEnds#RR}, {@link ReadEnds#RF}, {@link ReadEnds#FR}, {@link ReadEnds#FF} | |||
*/ | |||
public byte getOrientationForOpticalDuplicates() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we want unit tests for these two methods that assert the truth table for the two different type of orientations
@lbergelson Responded to your comments |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Fixes #4730
Blocked by #4732