// Path: src/main/java/ch/ethz/bsse/indelfixer/utils/StatusUpdate.java
// public class StatusUpdate {
// 
//     private static final long start = System.currentTimeMillis();
//     private static final DateFormat df;
//     public static int readCount = 0;
//     public static int unmappedCount = 0;
//     public static int tooSmallCount = 0;
//     public static int alignCount1 = 0;
//     public static int alignCount2 = 0;
//     public static int alignCount3 = 0;
//     private static String oldOut = "";
// 
//     static {
//         df = new SimpleDateFormat("HH:mm:ss");
//         df.setTimeZone(TimeZone.getTimeZone("GMT"));
//     }
// 
//     public static void print(String text, double percentage) {
//         System.out.print("\r" + time() + "  " + text + Math.round(percentage * 100) / 100 + "%");
//     }
// 
//     public static void print(String text) {
//         System.out.print("\r" + time() + "  " + text);
//     }
// 
//     public synchronized static void processReads() {
//         readCount++;
//         if (!oldOut.equals(time())) {
//             oldOut = time();
//             System.out.print("\r                                                                                                                      ");
//             System.out.print("\r" + time() + " Mapped: " + readCount + "\t\tUnmapped: " + unmappedCount + "\t\tToo small: " + tooSmallCount);
//         }
//     }
// 
//     public synchronized static void processUnmapped() {
//         ++unmappedCount;
//         if (!oldOut.equals(time())) {
//             oldOut = time();
//             System.out.print("\r                                                                                                                     ");
//             System.out.print("\r" + time() + " Mapped: " + (readCount) + "\t\tUnmapped: " + unmappedCount + "\t\tToo small: " + tooSmallCount);
//         }
//     }
// 
//     public synchronized static void processLength() {
//         ++tooSmallCount;
//         if (!oldOut.equals(time())) {
//             oldOut = time();
//             System.out.print("\r                                                                                                                     ");
//             System.out.print("\r" + time() + " Mapped: " + (readCount) + "\t\tUnmapped: " + unmappedCount + "\t\tToo small: " + tooSmallCount);
//         }
//     }
// 
//     public static void println(String text) {
//         System.out.println("\r" + time() + "  " + text);
//     }
// 
//     private static String time() {
//         return df.format(new Date(System.currentTimeMillis() - start));
//     }
// }


import ch.ethz.bsse.indelfixer.utils.StatusUpdate;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.RandomAccessFile;
import java.math.BigInteger;
import java.util.HashMap;
import java.util.Map;
        byte[] flowCharsByte = new byte[numberOfFlowsPerReadBig.intValue()];
        raf.read(flowCharsByte);
        flowChars = new String(flowCharsByte);
        // keySequence
        byte[] keySequenceByte = new byte[keyLengthBig.intValue()];
        raf.read(keySequenceByte);
        keySequence = new String(keySequenceByte);
        // go to index location
        raf.seek(indexOffsetBig.longValue());
        // indexMagicNumber
        byte[] indexMagicNumberByte = new byte[4];
        raf.read(indexMagicNumberByte);
        BigInteger indexMagicNumberBig = new BigInteger(indexMagicNumberByte);
        indexMagicNumber = indexMagicNumberBig.intValue();
        // indexVersion
        byte[] indexVersionByte = new byte[4];
        raf.read(indexVersionByte);
        indexVersion = new String(indexVersionByte);
    }

    /**
     * Creates an index of the sff file by scanning the file.
     *
     * @throws IOException
     */
    private void createIndex() throws IOException {
        // go to first read
        offset = eightBytePadding(headerLength);
        int indexing = 0;
        while (offset < indexOffset) {
// Path: src/main/java/ch/ethz/bsse/indelfixer/utils/StatusUpdate.java
// public class StatusUpdate {
// 
//     private static final long start = System.currentTimeMillis();
//     private static final DateFormat df;
//     public static int readCount = 0;
//     public static int unmappedCount = 0;
//     public static int tooSmallCount = 0;
//     public static int alignCount1 = 0;
//     public static int alignCount2 = 0;
//     public static int alignCount3 = 0;
//     private static String oldOut = "";
// 
//     static {
//         df = new SimpleDateFormat("HH:mm:ss");
//         df.setTimeZone(TimeZone.getTimeZone("GMT"));
//     }
// 
//     public static void print(String text, double percentage) {
//         System.out.print("\r" + time() + "  " + text + Math.round(percentage * 100) / 100 + "%");
//     }
// 
//     public static void print(String text) {
//         System.out.print("\r" + time() + "  " + text);
//     }
// 
//     public synchronized static void processReads() {
//         readCount++;
//         if (!oldOut.equals(time())) {
//             oldOut = time();
//             System.out.print("\r                                                                                                                      ");
//             System.out.print("\r" + time() + " Mapped: " + readCount + "\t\tUnmapped: " + unmappedCount + "\t\tToo small: " + tooSmallCount);
//         }
//     }
// 
//     public synchronized static void processUnmapped() {
//         ++unmappedCount;
//         if (!oldOut.equals(time())) {
//             oldOut = time();
//             System.out.print("\r                                                                                                                     ");
//             System.out.print("\r" + time() + " Mapped: " + (readCount) + "\t\tUnmapped: " + unmappedCount + "\t\tToo small: " + tooSmallCount);
//         }
//     }
// 
//     public synchronized static void processLength() {
//         ++tooSmallCount;
//         if (!oldOut.equals(time())) {
//             oldOut = time();
//             System.out.print("\r                                                                                                                     ");
//             System.out.print("\r" + time() + " Mapped: " + (readCount) + "\t\tUnmapped: " + unmappedCount + "\t\tToo small: " + tooSmallCount);
//         }
//     }
// 
//     public static void println(String text) {
//         System.out.println("\r" + time() + "  " + text);
//     }
// 
//     private static String time() {
//         return df.format(new Date(System.currentTimeMillis() - start));
//     }
// }


// Path: src/main/java/ch/ethz/bsse/indelfixer/sffParser/SFFFile.java
import ch.ethz.bsse.indelfixer.utils.StatusUpdate;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.RandomAccessFile;
import java.math.BigInteger;
import java.util.HashMap;
import java.util.Map;

        byte[] flowCharsByte = new byte[numberOfFlowsPerReadBig.intValue()];
        raf.read(flowCharsByte);
        flowChars = new String(flowCharsByte);
        // keySequence
        byte[] keySequenceByte = new byte[keyLengthBig.intValue()];
        raf.read(keySequenceByte);
        keySequence = new String(keySequenceByte);
        // go to index location
        raf.seek(indexOffsetBig.longValue());
        // indexMagicNumber
        byte[] indexMagicNumberByte = new byte[4];
        raf.read(indexMagicNumberByte);
        BigInteger indexMagicNumberBig = new BigInteger(indexMagicNumberByte);
        indexMagicNumber = indexMagicNumberBig.intValue();
        // indexVersion
        byte[] indexVersionByte = new byte[4];
        raf.read(indexVersionByte);
        indexVersion = new String(indexVersionByte);
    }

    /**
     * Creates an index of the sff file by scanning the file.
     *
     * @throws IOException
     */
    private void createIndex() throws IOException {
        // go to first read
        offset = eightBytePadding(headerLength);
        int indexing = 0;
        while (offset < indexOffset) {
            StatusUpdate.print("Indexing SFF:\t\t" + indexing++);