Use Math.abs so we don't get (inconsistent) -0's

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@2160 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
ebanks 2009-11-25 19:08:34 +00:00
parent fe8809d12a
commit d0f673f0c0
3 changed files with 7 additions and 6 deletions

View File

@ -32,7 +32,8 @@ public class FisherStrand extends StandardVariantAnnotation {
if ( pvalue == null )
return null;
return new Pair<String, String>("FisherStrand", String.format("%.1f", -10.0 * Math.log10(pvalue)));
// use Math.abs to prevent -0's
return new Pair<String, String>("FisherStrand", String.format("%.1f", Math.abs(10.0 * Math.log10(pvalue))));
}
public boolean useZeroQualityReads() { return false; }

View File

@ -74,7 +74,7 @@ public class VariantAnnotatorIntegrationTest extends WalkerTest {
public void testHasAnnotsAsking2() {
WalkerTestSpec spec = new WalkerTestSpec(
baseTestString() + " -all -B variant,VCF,/humgen/gsa-scr1/GATK_Data/Validation_Data/vcfexample3.vcf -I /humgen/gsa-scr1/GATK_Data/Validation_Data/NA12878.1kg.p2.chr1_10mb_11_mb.SLX.bam -L 1:10,000,000-10,050,000", 1,
Arrays.asList("1f757921997fb5db79e2c4a79082e6d1"));
Arrays.asList("fcae8ca66020be99cc01cc699f489462"));
executeTest("test file has annotations, asking for annotations, #2", spec);
}
@ -106,7 +106,7 @@ public class VariantAnnotatorIntegrationTest extends WalkerTest {
public void testNoAnnotsAsking2() {
WalkerTestSpec spec = new WalkerTestSpec(
baseTestString() + " -all -B variant,VCF,/humgen/gsa-scr1/GATK_Data/Validation_Data/vcfexample3empty.vcf -I /humgen/gsa-scr1/GATK_Data/Validation_Data/NA12878.1kg.p2.chr1_10mb_11_mb.SLX.bam -L 1:10,000,000-10,050,000", 1,
Arrays.asList("417917556d3a0f7da0eb3830e6b33c71"));
Arrays.asList("c31832ce6abf496180ebb64c1916b2e8"));
executeTest("test file doesn't have annotations, asking for annotations, #2", spec);
}

View File

@ -81,7 +81,7 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest {
public void testMultiSamplePilot1Joint() {
WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec(
"-T UnifiedGenotyper -R /broad/1KG/reference/human_b36_both.fasta -I /humgen/gsa-scr1/GATK_Data/Validation_Data/low_coverage_CEU.chr1.10k-11k.bam -varout %s -L 1:10,022,000-10,025,000 -bm empirical -gm JOINT_ESTIMATE -confidence 30", 1,
Arrays.asList("e1467f309e407a037404535b07b7e969"));
Arrays.asList("e72379c9654db9cf6ee17e7b9126f23e"));
executeTest("testMultiSamplePilot1 - Joint Estimate", spec);
}
@ -89,7 +89,7 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest {
public void testMultiSamplePilot2Joint() {
WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec(
"-T UnifiedGenotyper -R /broad/1KG/reference/human_b36_both.fasta -I /humgen/gsa-scr1/GATK_Data/Validation_Data/pilot2_daughters.chr20.10k-11k.bam -varout %s -L 20:10,000,000-10,050,000 -bm empirical -gm JOINT_ESTIMATE -confidence 30", 1,
Arrays.asList("8673c7dbe8dc4e93726706bd9276afc3"));
Arrays.asList("577ad8a1b1d16efc68e833a6d8e5b638"));
executeTest("testMultiSamplePilot2 - Joint Estimate", spec);
}
@ -97,7 +97,7 @@ public class UnifiedGenotyperIntegrationTest extends WalkerTest {
public void testSingleSamplePilot2Joint() {
WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec(
"-T UnifiedGenotyper -R /broad/1KG/reference/human_b36_both.fasta -I /humgen/gsa-scr1/GATK_Data/Validation_Data/NA12878.1kg.p2.chr1_10mb_11_mb.SLX.bam -varout %s -L 1:10,000,000-10,100,000 -bm empirical -gm JOINT_ESTIMATE -confidence 30", 1,
Arrays.asList("3d9bcf0f5525014f06b68fa006ef3fa3"));
Arrays.asList("b4a18843fc6fa76a878c39dfde1cedda"));
executeTest("testSingleSamplePilot2 - Joint Estimate", spec);
}