Truncate the floating point numbers coming out of the variant recalibration walkers. Integration tests now work with both 1.6.0_16-b01 and 1.6.0_21-b06
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4253 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
8f1a32acae
commit
7b113a4886
|
|
@ -135,7 +135,7 @@ public class VariantDataManager {
|
|||
|
||||
public void printClusterFileHeader( PrintStream outputFile ) {
|
||||
for( int jjj = 0; jjj < numAnnotations; jjj++ ) {
|
||||
outputFile.println("@!ANNOTATION," + annotationKeys.get(jjj) + "," + meanVector[jjj] + "," + varianceVector[jjj]);
|
||||
outputFile.println(String.format("@!ANNOTATION," + annotationKeys.get(jjj) + ",%.8f,%.8f", meanVector[jjj], varianceVector[jjj]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -402,13 +402,13 @@ public final class VariantGaussianMixtureModel extends VariantOptimizationModel
|
|||
if( Math.pow(10.0, pClusterLog10[kkk]) > 1E-4 ) { // BUGBUG: make this a command line argument
|
||||
final double sigmaVals[][] = sigma[kkk].getArray();
|
||||
clusterFile.print("@!CLUSTER");
|
||||
clusterFile.print("," + Math.pow(10.0, pClusterLog10[kkk]));
|
||||
clusterFile.print(String.format(",%.8f", Math.pow(10.0, pClusterLog10[kkk])));
|
||||
for(int jjj = 0; jjj < numAnnotations; jjj++ ) {
|
||||
clusterFile.print("," + mu[kkk][jjj]);
|
||||
clusterFile.print(String.format(",%.8f", mu[kkk][jjj]));
|
||||
}
|
||||
for(int jjj = 0; jjj < numAnnotations; jjj++ ) {
|
||||
for(int ppp = 0; ppp < numAnnotations; ppp++ ) {
|
||||
clusterFile.print("," + (sigmaVals[jjj][ppp] / hyperParameter_a[kkk]) );
|
||||
clusterFile.print(String.format(",%.8f", (sigmaVals[jjj][ppp] / hyperParameter_a[kkk]) ));
|
||||
}
|
||||
}
|
||||
clusterFile.println();
|
||||
|
|
@ -574,9 +574,9 @@ public final class VariantGaussianMixtureModel extends VariantOptimizationModel
|
|||
logger.info("\t" + String.format("%.4f novel Ti/Tv ratio", ((double)numNovelTi) / ((double)numNovelTv)));
|
||||
foundDesiredNumVariants = true;
|
||||
}
|
||||
outputReportDatFile.println( qCut + "," + numKnown + "," + numNovel + "," +
|
||||
( numKnownTi == 0 || numKnownTv == 0 ? "NaN" : ( ((double)numKnownTi) / ((double)numKnownTv) ) ) + "," +
|
||||
( numNovelTi == 0 || numNovelTv == 0 ? "NaN" : ( ((double)numNovelTi) / ((double)numNovelTv) ) ));
|
||||
outputReportDatFile.println( String.format("%.6f,%d,%d,%.4f,%.4f", qCut, numKnown, numNovel,
|
||||
( numKnownTv == 0 ? 0.0 : ( ((double)numKnownTi) / ((double)numKnownTv) ) ),
|
||||
( numNovelTv == 0 ? 0.0 : ( ((double)numNovelTi) / ((double)numNovelTv) ) )));
|
||||
|
||||
numKnownAtCut[jjj] = numKnown;
|
||||
numNovelAtCut[jjj] = numNovel;
|
||||
|
|
@ -592,7 +592,7 @@ public final class VariantGaussianMixtureModel extends VariantOptimizationModel
|
|||
for( jjj = NUM_BINS-1; jjj >= 0; jjj-- ) {
|
||||
|
||||
if( tranche >= 0 && novelTiTvAtCut[jjj] >= fdrCutAsTiTv[tranche] ) {
|
||||
tranchesOutputFile.println(String.format("%.2f,%.2f,%.2f,%d,FDRtranche%.2fto%.2f",
|
||||
tranchesOutputFile.println(String.format("%.2f,%.4f,%.4f,%d,FDRtranche%.2fto%.2f",
|
||||
FDRtranches[tranche],novelTiTvAtCut[jjj],theCut[jjj],numNovelAtCut[jjj],
|
||||
(tranche == 0 ? 0.0 : FDRtranches[tranche-1]) ,FDRtranches[tranche]));
|
||||
tranche--;
|
||||
|
|
|
|||
|
|
@ -14,8 +14,8 @@ public class VariantRecalibrationWalkersIntegrationTest extends WalkerTest {
|
|||
@Test
|
||||
public void testGenerateVariantClusters() {
|
||||
HashMap<String, String> e = new HashMap<String, String>();
|
||||
e.put( validationDataLocation + "yri.trio.gatk_glftrio.intersection.annotated.filtered.chr1.vcf", "c8a0eaeed9a4f8c12b90d89c65ad3405" );
|
||||
e.put( validationDataLocation + "lowpass.N3.chr1.raw.vcf", "ead6836dcc9fde2dd26f42317395e92d" );
|
||||
e.put( validationDataLocation + "yri.trio.gatk_glftrio.intersection.annotated.filtered.chr1.vcf", "ab2629d67e378fd3aceb8318f0fbfe04" );
|
||||
e.put( validationDataLocation + "lowpass.N3.chr1.raw.vcf", "725489156426e4ddd8d623ab3d4b1023" );
|
||||
|
||||
for ( Map.Entry<String, String> entry : e.entrySet() ) {
|
||||
String vcf = entry.getKey();
|
||||
|
|
@ -44,9 +44,9 @@ public class VariantRecalibrationWalkersIntegrationTest extends WalkerTest {
|
|||
public void testVariantRecalibrator() {
|
||||
HashMap<String, List<String>> e = new HashMap<String, List<String>>();
|
||||
e.put( validationDataLocation + "yri.trio.gatk_glftrio.intersection.annotated.filtered.chr1.vcf",
|
||||
Arrays.asList("274b58b7e45619411b061610d2ae0b3f", "e96c86d63be4401414dbadd43181e433","acd93e4747f5abb6ab81755a229168b5")); // Each test checks the md5 of three output files
|
||||
Arrays.asList("e7dc06c6d4d8c2cdd03bfdac483aa92b", "038c31c5bb46a4df89b8ee69ec740812","7d42bbdfb69fdfb18cbda13a63d92602")); // Each test checks the md5 of three output files
|
||||
e.put( validationDataLocation + "lowpass.N3.chr1.raw.vcf",
|
||||
Arrays.asList("80176c57b9d9bbacee36e8dec9ec2c93", "f12879c5d4aa214c50d50f2d0fd6a60b","59f0f0d2bdb9f2f3c112a71f38dc834f")); // Each test checks the md5 of three output files
|
||||
Arrays.asList("80243bd6731f6b0341fa1762c095a72e", "661360e85392af9c97e386399871854a","371e5a70a4006420737c5ab259e0e23e")); // Each test checks the md5 of three output files
|
||||
|
||||
for ( Map.Entry<String, List<String>> entry : e.entrySet() ) {
|
||||
String vcf = entry.getKey();
|
||||
|
|
@ -83,8 +83,8 @@ public class VariantRecalibrationWalkersIntegrationTest extends WalkerTest {
|
|||
@Test
|
||||
public void testApplyVariantCuts() {
|
||||
HashMap<String, String> e = new HashMap<String, String>();
|
||||
e.put( validationDataLocation + "yri.trio.gatk_glftrio.intersection.annotated.filtered.chr1.vcf", "52538fbc9113271e1a0bf0ae3c904c93" );
|
||||
e.put( validationDataLocation + "lowpass.N3.chr1.raw.vcf", "b70686bf091d0306fd23daef729d05fb" );
|
||||
e.put( validationDataLocation + "yri.trio.gatk_glftrio.intersection.annotated.filtered.chr1.vcf", "ee22087a813aadf7d9426cab5a6a2164" );
|
||||
e.put( validationDataLocation + "lowpass.N3.chr1.raw.vcf", "d9e00e6fe8269b3218880d2c084804c6" );
|
||||
|
||||
for ( Map.Entry<String, String> entry : e.entrySet() ) {
|
||||
String vcf = entry.getKey();
|
||||
|
|
|
|||
Loading…
Reference in New Issue