Merge branch 'master' of github.com:broadinstitute/gsa-unstable
This commit is contained in:
commit
fb1e525e0f
|
|
@ -95,7 +95,8 @@ import static org.broadinstitute.sting.utils.codecs.vcf.VCFUtils.getVCFHeadersFr
|
||||||
|
|
||||||
@DocumentedGATKFeature( groupName = "Variant Discovery Tools", extraDocs = {CommandLineGATK.class} )
|
@DocumentedGATKFeature( groupName = "Variant Discovery Tools", extraDocs = {CommandLineGATK.class} )
|
||||||
public class ReadBackedPhasing extends RodWalker<PhasingStatsAndOutput, PhasingStats> {
|
public class ReadBackedPhasing extends RodWalker<PhasingStatsAndOutput, PhasingStats> {
|
||||||
private static final boolean DEBUG = false;
|
@Argument(fullName="debug", shortName="debug", doc="If specified, print out very verbose debug information (if -l DEBUG is also specified)", required = false)
|
||||||
|
protected boolean DEBUG = false;
|
||||||
/**
|
/**
|
||||||
* The VCF file we are phasing variants from.
|
* The VCF file we are phasing variants from.
|
||||||
*
|
*
|
||||||
|
|
@ -949,7 +950,7 @@ public class ReadBackedPhasing extends RodWalker<PhasingStatsAndOutput, PhasingS
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DEBUG) logger.debug("\nPhasing table [AFTER CALCULATION]:\n" + sampleHaps + "\n");
|
if (DEBUG) logger.debug("\nPhasing table [AFTER CALCULATION]:\n" + sampleHaps + "\n");
|
||||||
MaxHaplotypeAndQuality maxHapQual = new MaxHaplotypeAndQuality(sampleHaps, true);
|
MaxHaplotypeAndQuality maxHapQual = new MaxHaplotypeAndQuality(sampleHaps, DEBUG);
|
||||||
double posteriorProb = maxHapQual.maxEntry.getScore().getValue();
|
double posteriorProb = maxHapQual.maxEntry.getScore().getValue();
|
||||||
|
|
||||||
if (DEBUG)
|
if (DEBUG)
|
||||||
|
|
@ -971,7 +972,7 @@ public class ReadBackedPhasing extends RodWalker<PhasingStatsAndOutput, PhasingS
|
||||||
public MaxHaplotypeAndQuality(PhasingTable hapTable, boolean printDebug) {
|
public MaxHaplotypeAndQuality(PhasingTable hapTable, boolean printDebug) {
|
||||||
// Marginalize each haplotype to its first 2 positions:
|
// Marginalize each haplotype to its first 2 positions:
|
||||||
hapTable = HaplotypeTableCreator.marginalizeAsNewTable(hapTable);
|
hapTable = HaplotypeTableCreator.marginalizeAsNewTable(hapTable);
|
||||||
if (DEBUG && printDebug)
|
if (printDebug)
|
||||||
logger.debug("\nPhasing table [AFTER MAPPING]:\n" + hapTable + "\n");
|
logger.debug("\nPhasing table [AFTER MAPPING]:\n" + hapTable + "\n");
|
||||||
|
|
||||||
calculateMaxHapAndPhasingQuality(hapTable, printDebug);
|
calculateMaxHapAndPhasingQuality(hapTable, printDebug);
|
||||||
|
|
@ -981,7 +982,7 @@ public class ReadBackedPhasing extends RodWalker<PhasingStatsAndOutput, PhasingS
|
||||||
|
|
||||||
private void calculateMaxHapAndPhasingQuality(PhasingTable hapTable, boolean printDebug) {
|
private void calculateMaxHapAndPhasingQuality(PhasingTable hapTable, boolean printDebug) {
|
||||||
hapTable.normalizeScores();
|
hapTable.normalizeScores();
|
||||||
if (DEBUG && printDebug)
|
if (printDebug)
|
||||||
logger.debug("\nPhasing table [AFTER NORMALIZATION]:\n" + hapTable + "\n");
|
logger.debug("\nPhasing table [AFTER NORMALIZATION]:\n" + hapTable + "\n");
|
||||||
|
|
||||||
// Determine the phase at this position:
|
// Determine the phase at this position:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue