Merged bug fix from Stable into Unstable
This commit is contained in:
commit
a733723439
|
|
@ -744,11 +744,16 @@ public class PhaseByTransmission extends RodWalker<HashMap<Byte,Integer>, HashMa
|
||||||
|
|
||||||
String mvfLine;
|
String mvfLine;
|
||||||
|
|
||||||
if (tracker != null) {
|
if (tracker == null)
|
||||||
VariantContext vc = tracker.getFirstValue(variantCollection.variants, context.getLocation());
|
return metricsCounters;
|
||||||
VariantContextBuilder builder = new VariantContextBuilder(vc);
|
|
||||||
|
|
||||||
GenotypesContext genotypesContext = GenotypesContext.copy(vc.getGenotypes());
|
final VariantContext vc = tracker.getFirstValue(variantCollection.variants, context.getLocation());
|
||||||
|
if (vc == null)
|
||||||
|
return metricsCounters;
|
||||||
|
|
||||||
|
final VariantContextBuilder builder = new VariantContextBuilder(vc);
|
||||||
|
|
||||||
|
final GenotypesContext genotypesContext = GenotypesContext.copy(vc.getGenotypes());
|
||||||
for (Sample sample : trios) {
|
for (Sample sample : trios) {
|
||||||
Genotype mother = vc.getGenotype(sample.getMaternalID());
|
Genotype mother = vc.getGenotype(sample.getMaternalID());
|
||||||
Genotype father = vc.getGenotype(sample.getPaternalID());
|
Genotype father = vc.getGenotype(sample.getPaternalID());
|
||||||
|
|
@ -799,7 +804,7 @@ public class PhaseByTransmission extends RodWalker<HashMap<Byte,Integer>, HashMa
|
||||||
|
|
||||||
builder.genotypes(genotypesContext);
|
builder.genotypes(genotypesContext);
|
||||||
vcfWriter.add(builder.make());
|
vcfWriter.add(builder.make());
|
||||||
}
|
|
||||||
return metricsCounters;
|
return metricsCounters;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue