public static void main(String[] args) throws Exception {

        ArgParser inputParser = new ArgParser(args);

        String trueSnpPath = inputParser.getStringArg("-T");
        readTrueSnps(trueSnpPath);

        Integer printPositions = inputParser.getIntegerArg("-p");   // 0: just print statistics, 1: print all positions

        String candidateSnpPath = inputParser.getStringArg("-C");
        BufferedReader reader = new BufferedReader(new FileReader(candidateSnpPath));
        String line;

        // Key: contig name, value = [0: trueCount, 1: falseCount]
        HashMap<String, int[]> contigTFCount = new HashMap<String, int[]>();

        while((line = reader.readLine()) != null) {

            String[] d = line.split("\t");
            if(d[0].equalsIgnoreCase("Chr")) continue;

            if(printPositions == 1) System.out.print(d[0] + ":" + d[1] + "\t");

            if(candidateIsTrue(d[0], Integer.valueOf(d[1]))) {
                if(printPositions == 1) System.out.print("✓");

                int[] tf = contigTFCount.get(d[0]);
                if(tf == null) {
                    tf = new int[2];
                    tf[0]++;
                    contigTFCount.put(d[0], tf);
                } else {
                    tf[0]++;
                }
            } else {
                int[] tf = contigTFCount.get(d[0]);
                if(tf == null) {
                    tf = new int[2];
                    tf[1]++;
                    contigTFCount.put(d[0], tf);
                } else {
                    tf[1]++;
                }
            }

            if(printPositions == 1) System.out.println();

        }

        DecimalFormat df = new DecimalFormat("#.00");

        int totalTrueCount = 0, totalFalseCount = 0;

        for (Map.Entry<String, int[]> entry : contigTFCount.entrySet()) {
            int trueCount = entry.getValue()[0];
            int falseCount = entry.getValue()[1];
            totalTrueCount += trueCount;
            totalFalseCount += falseCount;
            System.err.println("Statistics for " + entry.getKey() + ":");
            System.err.println("- True variants:  " + trueCount + " (" +  df.format((double)trueCount/(trueCount+falseCount)*100) + "%)");
            System.err.println("- False variants: " + falseCount + " (" + df.format((double)falseCount/(trueCount+falseCount)*100) + "%)");
        }

        System.err.println("Total:");
        System.err.println("- True variants:  " + totalTrueCount + " (" +  df.format((double)totalTrueCount/(totalTrueCount+totalFalseCount)*100) + "%)");
        System.err.println("- False variants: " + totalFalseCount + " (" + df.format((double)totalFalseCount/(totalTrueCount+totalFalseCount)*100) + "%)");

    }