Better naming of output columns

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@3175 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
ebanks 2010-04-15 18:08:07 +00:00
parent e682460c1f
commit 5f7564bf0a
2 changed files with 14 additions and 17 deletions

View File

@ -8,9 +8,6 @@ import org.broadinstitute.sting.gatk.contexts.variantcontext.Allele;
import org.broadinstitute.sting.playground.utils.report.tags.Analysis;
import org.broadinstitute.sting.playground.utils.report.tags.DataPoint;
import java.util.List;
import java.util.Arrays;
/**
* The Broad Institute
* SOFTWARE COPYRIGHT NOTICE AGREEMENT
@ -32,11 +29,11 @@ public class DbSNPPercentage extends VariantEvaluator {
@DataPoint(name = "novel snps", description = "number of total snp sites")
private long novelSites = 0;
@DataPoint(name = "snps at dbsnp", description = "number of SNP sites at DPSNP sites")
private long nSNPsAtdbSNPs = 0;
@DataPoint(name = "snps at comp", description = "number of SNP sites at comp sites")
private long nSNPsAtComp = 0;
@DataPoint(name = "% eval in comp", description = "percentage of SNP sites at DPSNP sites")
private double dbSNPRate = 0.0;
@DataPoint(name = "% snps at comp", description = "percentage of SNP sites at comp sites")
private double compRate = 0.0;
@DataPoint(name = "concordant", description = "number of concordant sites")
private long nConcordant = 0;
@ -56,12 +53,12 @@ public class DbSNPPercentage extends VariantEvaluator {
return 2; // we need to see each eval track and each comp track
}
public long nNovelSites() { return Math.abs(nEvalSNPs - nSNPsAtdbSNPs); }
public double dbSNPRate() { return rate(nSNPsAtdbSNPs, nEvalSNPs); }
public double concordanceRate() { return rate(nConcordant, nSNPsAtdbSNPs); }
public long nNovelSites() { return Math.abs(nEvalSNPs - nSNPsAtComp); }
public double dbSNPRate() { return rate(nSNPsAtComp, nEvalSNPs); }
public double concordanceRate() { return rate(nConcordant, nSNPsAtComp); }
public void finalizeEvaluation() {
dbSNPRate = 100 * dbSNPRate();
compRate = 100 * dbSNPRate();
concordantRate = 100 * concordanceRate();
novelSites = nNovelSites();
}
@ -94,7 +91,7 @@ public class DbSNPPercentage extends VariantEvaluator {
if (evalIsGood) nEvalSNPs++; // count the number of dbSNP events
if (dbSNPIsGood && evalIsGood) {
nSNPsAtdbSNPs++;
nSNPsAtComp++;
if (!discordantP(eval, dbsnp)) // count whether we're concordant or not with the dbSNP value
nConcordant++;

View File

@ -18,8 +18,8 @@ public class VariantEval2IntegrationTest extends WalkerTest {
@Test
public void testVE2Simple() {
HashMap<String, String> expectations = new HashMap<String, String>();
expectations.put("-L 1:1-10,000,000", "8b93fda4a4b61c8b284063de62c84644");
expectations.put("-L 1:1-10,000,000 -family NA19238+NA19239=NA19240 -MVQ 0", "d232220a2b0d13e3a2b077310cad4540");
expectations.put("-L 1:1-10,000,000", "278c9c2798fed510a0cc3e65f3749b26");
expectations.put("-L 1:1-10,000,000 -family NA19238+NA19239=NA19240 -MVQ 0", "98ceb8dab20af47e724a0b47f82ba698");
for ( Map.Entry<String, String> entry : expectations.entrySet() ) {
String extraArgs = entry.getKey();
@ -39,10 +39,10 @@ public class VariantEval2IntegrationTest extends WalkerTest {
" -B dbsnp_130,dbSNP," + GATKDataLocation + "dbsnp_130_b36.rod" +
" -B comp_hapmap,VCF," + validationDataLocation + "CEU_hapmap_nogt_23.vcf";
String eqMD5s = "9e5a207f445febc8b432254a6cf9a182"; // next two examples should be the same!
String eqMD5s = "fe4b6bd3e46d956a829fa08f3594427d"; // next two examples should be the same!
expectations.put("", eqMD5s);
expectations.put(" -known comp_hapmap -known dbsnp", eqMD5s);
expectations.put(" -known comp_hapmap", "f6aedc4911c5c9ebfd4de1383bb1aafa");
expectations.put(" -known comp_hapmap", "cb8ce4b0f15e1b01c7aee5106dad4e95");
for ( Map.Entry<String, String> entry : expectations.entrySet() ) {
String extraArgs2 = entry.getKey();
@ -60,7 +60,7 @@ public class VariantEval2IntegrationTest extends WalkerTest {
String extraArgs = "-L 1:1-10,000,000 -family NA19238+NA19239=NA19240 -MVQ 30";
WalkerTestSpec spec = new WalkerTestSpec( root + " " + extraArgs + " -o %s -outputVCF %s",
2,
Arrays.asList("e11a104981a3d959458bc11d3c540355", "a3ce1d70d8ae3874807e9d61994d42af"));
Arrays.asList("782b569e213b494c19598d3f4dacba49", "a3ce1d70d8ae3874807e9d61994d42af"));
executeTest("testVE2WriteVCF", spec);
}
}