RBP now operates correctly at non-variant sites so we can phase hom-ref genotypes with -sampleToPhase
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4903 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
376bc563d4
commit
8c583ea405
|
|
@ -201,7 +201,6 @@ public class ReadBackedPhasingWalker extends RodWalker<PhasingStatsAndOutput, Ph
|
||||||
if (tracker == null)
|
if (tracker == null)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
// todo -- potential performance problem here with unconditional, frequent writes to debug
|
|
||||||
mostDownstreamLocusReached = ref.getLocus();
|
mostDownstreamLocusReached = ref.getLocus();
|
||||||
if ( DEBUG ) logger.debug("map() at: " + mostDownstreamLocusReached);
|
if ( DEBUG ) logger.debug("map() at: " + mostDownstreamLocusReached);
|
||||||
|
|
||||||
|
|
@ -217,7 +216,6 @@ public class ReadBackedPhasingWalker extends RodWalker<PhasingStatsAndOutput, Ph
|
||||||
VariantAndReads vr = new VariantAndReads(vc, context);
|
VariantAndReads vr = new VariantAndReads(vc, context);
|
||||||
unphasedSiteQueue.add(vr);
|
unphasedSiteQueue.add(vr);
|
||||||
|
|
||||||
// todo -- potential performance problem here with unconditional, frequent writes to debug
|
|
||||||
if ( DEBUG ) logger.debug("Added variant to queue = " + VariantContextUtils.getLocation(getToolkit().getGenomeLocParser(),vr.variant));
|
if ( DEBUG ) logger.debug("Added variant to queue = " + VariantContextUtils.getLocation(getToolkit().getGenomeLocParser(),vr.variant));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
@ -1008,12 +1006,14 @@ public class ReadBackedPhasingWalker extends RodWalker<PhasingStatsAndOutput, Ph
|
||||||
}
|
}
|
||||||
|
|
||||||
private void writeVCF(VariantContext vc) {
|
private void writeVCF(VariantContext vc) {
|
||||||
if ( samplesToPhase == null || (vc.isVariant() && vc.isNotFiltered())) // if we are only operating on specific samples, don't write out all sites, just those where the VC is variant
|
if ( vc.isNotFiltered() )
|
||||||
|
//if ( samplesToPhase == null || (vc.isVariant() && vc.isNotFiltered())) // if we are only operating on specific samples, don't write out all sites, just those where the VC is variant
|
||||||
WriteVCF.writeVCF(vc, writer, logger);
|
WriteVCF.writeVCF(vc, writer, logger);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean processVariantInPhasing(VariantContext vc) {
|
public static boolean processVariantInPhasing(VariantContext vc) {
|
||||||
return isUnfilteredBiallelicSNP(vc);
|
return vc.isNotFiltered() && ((vc.isSNP() && vc.isBiallelic()) || ! vc.isVariant()); // we can handle the non-variant case as well
|
||||||
|
//return isUnfilteredBiallelicSNP(vc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1887,4 +1887,4 @@ class MultipleBaseCounts {
|
||||||
|
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue