Cleanup formatting of VCF floats
-- Final integrationtest update before commit (and fixing new formatting changes)
This commit is contained in:
parent
8b01969762
commit
fbc45e14d3
|
|
@ -452,8 +452,8 @@ class VCFWriter extends IndexingVariantContextWriter {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public static final String formatVCFDouble(final double d) {
|
public static final String formatVCFDouble(final double d) {
|
||||||
String format = "%.2f";
|
String format;
|
||||||
if ( d < 0.1 ) {
|
if ( d < 1 ) {
|
||||||
if ( d < 0.01 ) {
|
if ( d < 0.01 ) {
|
||||||
if ( Math.abs(d) >= 1e-20 )
|
if ( Math.abs(d) >= 1e-20 )
|
||||||
format = "%.3e";
|
format = "%.3e";
|
||||||
|
|
@ -464,6 +464,8 @@ class VCFWriter extends IndexingVariantContextWriter {
|
||||||
} else {
|
} else {
|
||||||
format = "%.3f";
|
format = "%.3f";
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
format = "%.2f";
|
||||||
}
|
}
|
||||||
|
|
||||||
return String.format(format, d);
|
return String.format(format, d);
|
||||||
|
|
|
||||||
|
|
@ -110,7 +110,7 @@ public class CombineVariantsIntegrationTest extends WalkerTest {
|
||||||
" -priority NA19240_BGI,NA19240_ILLUMINA,NA19240_WUGSC,denovoInfo" +
|
" -priority NA19240_BGI,NA19240_ILLUMINA,NA19240_WUGSC,denovoInfo" +
|
||||||
" -genotypeMergeOptions UNIQUIFY -L 1"),
|
" -genotypeMergeOptions UNIQUIFY -L 1"),
|
||||||
1,
|
1,
|
||||||
Arrays.asList("90fa9f9b73fd10291e8067ecf7757b8d"));
|
Arrays.asList("59cbe0d9a2aa562b59bd546e20b9abad"));
|
||||||
executeTest("threeWayWithRefs", spec);
|
executeTest("threeWayWithRefs", spec);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue