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

fixes bug in gga mode caused by split multallic sites with genotypes #5365

Merged
merged 1 commit into from
Oct 29, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,8 @@ protected static List<VariantContext> getVariantContextsFromGivenAlleles(final i
//TODO: how about replace it by vcSourceName = String.parseInt(nameCounter++)?
final String vcSourceName = "Comp" + givenAlleleSourceCount + "Allele" + alleleCount;
// check if this event is already in the list of events due to a repeat in the input alleles track
final VariantContext candidateEventToAdd = new VariantContextBuilder(givenAlleleVC).alleles(alleleSet).source(vcSourceName).make();
final VariantContext candidateEventToAdd = new VariantContextBuilder(givenAlleleVC).alleles(alleleSet)
.genotypes(GenotypesContext.NO_GENOTYPES).source(vcSourceName).make();

final LocationAndAlleles locationAndAlleles = new LocationAndAlleles(candidateEventToAdd.getStart(), candidateEventToAdd.getAlleles());
if (! uniqueLocationsAndAlleles.contains(locationAndAlleles)) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
package org.broadinstitute.hellbender.tools.walkers.haplotypecaller;

import com.google.common.collect.Maps;
import htsjdk.variant.variantcontext.Allele;
import htsjdk.variant.variantcontext.VariantContext;
import htsjdk.variant.variantcontext.VariantContextBuilder;
import htsjdk.variant.variantcontext.*;
import org.broadinstitute.hellbender.GATKBaseTest;
import org.broadinstitute.hellbender.utils.haplotype.EventMap;
import org.broadinstitute.hellbender.utils.haplotype.Haplotype;
Expand Down Expand Up @@ -159,6 +157,10 @@ public Object[][] getVcsAtThisLocationFromGivenAllelesData() {
final VariantContext sameLocInsVc1 = new VariantContextBuilder("a", "20", 10093568, 10093568, sameLocInsAlleles1).make();
sameLocInsHap1.setEventMap(new EventMap(Arrays.asList(sameLocInsVc1)));

final VariantContextBuilder deletionVCBuilderWithGts = new VariantContextBuilder("a", "20", 995, 1005, deletionAlleles)
.genotypes(new GenotypeBuilder("TEST", Arrays.asList(deletionAlleles.get(0), deletionAlleles.get(1))).make());
final VariantContext deletionVcWithGts = deletionVCBuilderWithGts.make();

tests.add(new Object[]{1000, Arrays.asList(snpVc), Arrays.asList(snpVCBuilder.source("Comp0Allele0").make())});
tests.add(new Object[]{995, Arrays.asList(deletionVc), Arrays.asList(deletionVCBuilder.source("Comp0Allele0").make())});
tests.add(new Object[]{1000, Arrays.asList(deletionVc), Arrays.asList(deletionVCBuilder.source("Comp0Allele0").make())});
Expand All @@ -168,6 +170,9 @@ public Object[][] getVcsAtThisLocationFromGivenAllelesData() {
tests.add(new Object[]{1000, Arrays.asList(deletionVc, deletionVcFalseDuplicate, deletionVcNoSpan),
Arrays.asList(deletionVCBuilder.source("Comp0Allele0").make(), deletionFalseDuplicateBuilder.source("Comp1Allele0").make())});

tests.add(new Object[]{1000, Arrays.asList(deletionVcWithGts, snpVc),
Arrays.asList(deletionVCBuilder.source("Comp0Allele0").make(), snpVCBuilder.source("Comp1Allele0").make())});

return tests.toArray(new Object[][]{});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@
20 10004771 . A *,T 998.77 . AC=1,0;AF=0.500,0.00;AN=2;BaseQRankSum=-1.270;DP=74;ExcessHet=3.0103;FS=2.397;MLEAC=1,0;MLEAF=0.500,0.00;MQ=51.81;MQRankSum=-6.325;QD=16.93;ReadPosRankSum=2.185;SOR=1.115 GT:AD:DP:GQ:PL 0/1:32,27,0:59:99:1027,0,1345,1162,1305,2852
20 10006819 . AAAAC T 0 LowQual AC=0;AF=0.00;AN=2;DP=75;ExcessHet=3.0103;FS=0.000;MLEAC=0;MLEAF=0.00;MQ=61.14;SOR=0.572 GT:AD:DP:GQ:PL 0/0:75,0:75:99:0,244,2147483647
20 10006823 . C *,G 0 LowQual AC=0,0;AF=0.00,0.00;AN=2;DP=73;ExcessHet=3.0103;FS=0.000;MLEAC=0,0;MLEAF=0.00,0.00;MQ=61.18;SOR=0.069 GT:AD:DP:GQ:PL 0/0:17,0,0:17:51:0,229,2147483647,51,819,590
20 10008738 . GGTTTGTTT GGTTTGTTTGTTT,GGTTTGTTTGTTTGTTT,G 0 LowQual AC=0,0,0;AF=0.00,0.00,0.00;AN=2;DP=50;ExcessHet=3.0103;FS=0.000;MLEAC=0,0,0;MLEAF=0.00,0.00,0.00;MQ=37.07;SOR=0.488 GT:AD:DP:GQ:PL 0/0:50,0,0,0:50:99:0,154,2147483647,154,2147483647,2147483647,154,2147483647,2147483647,2147483647
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,5 @@
20 10004771 . A T . . . GT 0|1
20 10006819 . AAAAC T . . . GT 0|1
20 10006823 . C G . . . GT 0|1
20 10008738 . G GGTTT,GGTTTGTTT . PASS . GT 1|2
20 10008738 . GGTTTGTTT G . PASS . GT 0|1
Binary file not shown.