Better exception text for common error in VQSR.

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@5734 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
rpoplin 2011-05-03 18:37:25 +00:00
parent 4bbce42861
commit 11052918d9
3 changed files with 7 additions and 4 deletions

View File

@ -132,7 +132,7 @@ public class TrancheManager {
if ( t == null ) {
if ( tranches.size() == 0 )
throw new UserException(String.format("Couldn't find any tranche containing variants with a %s > %.2f", metric.getName(), metric.getThreshold(trancheThreshold)));
throw new UserException(String.format("Couldn't find any tranche containing variants with a %s > %.2f. Are you sure the truth files contain unfiltered variants which overlap the input data?", metric.getName(), metric.getThreshold(trancheThreshold)));
break;
}

View File

@ -161,6 +161,8 @@ public class VariantRecalibrator extends RodWalker<ExpandingArrayList<VariantDat
datum.isSNP = vc.isSNP() && vc.isBiallelic();
datum.isTransition = datum.isSNP && VariantContextUtils.isTransition(vc);
datum.usedForTraining = 0;
// Loop through the training data sets and if they overlap this loci then update the prior and training status appropriately
dataManager.parseTrainingSets( tracker, ref, context, vc, datum, TRUST_ALL_POLYMORPHIC );
double priorFactor = QualityUtils.qualToProb( datum.prior );
if( datum.consensusCount != 0 ) {
@ -168,6 +170,7 @@ public class VariantRecalibrator extends RodWalker<ExpandingArrayList<VariantDat
priorFactor = 1.0 - ((1.0 - priorFactor) * (1.0 - consensusPrior));
}
datum.prior = Math.log10( priorFactor ) - Math.log10( 1.0 - priorFactor );
mapList.add( datum );
}
}
@ -224,8 +227,8 @@ public class VariantRecalibrator extends RodWalker<ExpandingArrayList<VariantDat
TRANCHES_FILE.print(Tranche.tranchesString( tranches ));
double lodCutoff = 0.0;
for(final Tranche tranche : tranches) {
if(MathUtils.compareDoubles(tranche.ts, TS_FILTER_LEVEL, 0.0001)==0) {
for( final Tranche tranche : tranches ) {
if( MathUtils.compareDoubles(tranche.ts, TS_FILTER_LEVEL, 0.0001)==0 ) {
lodCutoff = tranche.minVQSLod;
}
}

View File

@ -16,7 +16,7 @@ public class VariantRecalibratorArgumentCollection {
BOTH
}
@Argument(fullName = "mode", shortName = "mode", doc = "Recalibration mode to employ: 1.) SNP for recalibrating only SNPs (emitting indels untouched in the output VCF); 2.) INDEL for indels; and 3.) BOTH for recalibrating both SNPs and indels simultaneously.", required = false)
@Argument(fullName = "mode", shortName = "mode", doc = "Recalibration mode to employ: 1.) SNP for recalibrating only snps (emitting indels untouched in the output VCF); 2.) INDEL for indels; and 3.) BOTH for recalibrating both snps and indels simultaneously.", required = false)
public VariantRecalibratorArgumentCollection.Mode MODE = VariantRecalibratorArgumentCollection.Mode.SNP;
@Argument(fullName="maxGaussians", shortName="mG", doc="The maximum number of Gaussians to try during variational Bayes algorithm", required=false)
public int MAX_GAUSSIANS = 10;