Skip to content

Commit

Permalink
Re-add DecimalFormat, but get rid of comma (#1444)
Browse files Browse the repository at this point in the history
  • Loading branch information
tlangs authored Dec 19, 2019
1 parent d7e09b8 commit b20b4c8
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/main/java/picard/arrays/GtcToVcf.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
import java.io.FileInputStream;
import java.io.IOException;
import java.nio.file.Path;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
Expand Down Expand Up @@ -165,8 +166,15 @@ public class GtcToVcf extends CommandLineProgram {

private static ReferenceSequenceFile refSeq;

private static final DecimalFormat df = new DecimalFormat();

private static final String DOT = ".";

static {
df.setMaximumFractionDigits(3);
df.setGroupingSize(0);
}

@Override
protected boolean requiresReference() {
return true;
Expand Down Expand Up @@ -473,7 +481,7 @@ public static String formatFloatForVcf(final float value) {
if (Float.isNaN(value)) {
return DOT;
}
return Float.toString(value);
return df.format(value);
}

/**
Expand Down

0 comments on commit b20b4c8

Please sign in to comment.