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

Switched MarkDuplicatesSpark tile parsing code to use shorts in order to match picard #5165

Merged
merged 4 commits into from
Sep 7, 2018

Conversation

jamesemery
Copy link
Collaborator

No description provided.

Copy link
Member

@lbergelson lbergelson left a comment

Choose a reason for hiding this comment

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

@jamesemery A few comments and a question. Change looks good, just some wonky things you forgot in your test code.

public void test() {
final ArgumentsBuilder args = new ArgumentsBuilder();
args.addOutput(createTempFile("output","bam"));
args.addInput(new File("/Users/emeryj/hellbender/gatk/compareDuplicates/picarddiffs.sam"));
Copy link
Member

Choose a reason for hiding this comment

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

This path is local to your machine.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

whoops, that was a test file from my evaluation, ill get rid of that

@@ -189,6 +189,14 @@ public void testSupplementaryReadUnmappedMate() {
}
}

@Test
public void test() {
Copy link
Member

Choose a reason for hiding this comment

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

test isn't exactly a clear name

@@ -251,7 +254,7 @@ public void testOpticalDuplicatesTheSameReadGroup() {
public void testOpticalDuplicatesAndPCRDuplicatesOrientationDifference() {
final AbstractMarkDuplicatesTester tester = getTester();
tester.setExpectedOpticalDuplicate(0);
tester.addMatePair("RUNID:7:1203:2886:82292", 19, 19, 485253, 486253, false, false, true, true, "101M", "101M", true, false, false, false, false, DEFAULT_BASE_QUALITY, "1"); // duplicate
tester.addMatePair("RUNID:7:1203:2886:16838", 19, 19, 485253, 486253, false, false, true, true, "101M", "101M", true, false, false, false, false, DEFAULT_BASE_QUALITY, "1"); // duplicate
Copy link
Member

Choose a reason for hiding this comment

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

Why did this one need to change? If it resolves differently now, how were both we and picard passing before? Or is this a gatk only test?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

So this test is different now because the tiebreaking has changed, specifically because of integer overflowing in the Y coordinate of this read. The point of this test is about orientation and optical duplicates (which it wasn't doing a good job of testing before anyway because it was failing for a different reason). The tiebreaking change caused a different read to be marked as duplicate. I could have reversed the value but it seems better to correct the test as now its actually testing what it purports to. Also, yes this does not exist in picard.

Copy link
Member

Choose a reason for hiding this comment

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

👍 Thanks for the explanation.

@@ -37,13 +37,13 @@ public TransientFieldPhysicalLocation(int partitionIndex, String name) {
public int getX() { return this.x; }

@Override
public void setX(final int x) { this.x = x; }
Copy link
Member

Choose a reason for hiding this comment

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

I would add a comment saying that in practice picard always uses short here even though the api is int.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

@jamesemery
Copy link
Collaborator Author

@lbergelson responded to comments

Copy link
Member

@lbergelson lbergelson left a comment

Choose a reason for hiding this comment

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

👍 Looks good.

@jamesemery jamesemery merged commit 83832ea into master Sep 7, 2018
@jamesemery jamesemery deleted the je_patchToShorts branch September 7, 2018 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants