@SuppressWarnings("ConstantConditions")
    @Test
    public void testOTUConsensusConversion() {
        File otuDir = new File("/home/alext/Documents/tuit/OTU Seq90/Seqs");
        File tmpDir = new File("/home/alext/Downloads/tmp");
        File executable = new File("/usr/local/bin/clustalw2");
        File[] otuFiles = otuDir.listFiles();
        for (File f : otuFiles) {

            if (f.getPath().endsWith(".fasta")) {
                try {
                    EncodedOTU encodedOTU = EncodedOTU.newDefaultInstanceFromFile(f, tmpDir, executable);
                    String fileName = f.getName().split(".fasta")[0];
                    BufferedWriter bufferedWriter = null;
                    try {
                        bufferedWriter = new BufferedWriter(new FileWriter(new File(f.getParent(), fileName + ".cons")));
                        bufferedWriter.write(Fasta.fastaStart+fileName);
                        bufferedWriter.newLine();
                        bufferedWriter.write(encodedOTU.getOtuConsensus(51));
                        bufferedWriter.flush();
                    } catch (InterruptedException e) {
                        e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
                    } catch (AlignmentException e) {
                        e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
                    } finally {
                        if (bufferedWriter != null) {
                            bufferedWriter.close();
                        }
                    }

                } catch (IOException e) {
                    e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
                } catch (NucleotideFasta_AC_BadFormatException e) {
                    e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
                } catch (NucleotideFasta_Sequence_BadFormatException e) {
                    e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
                } catch (NucleotideFasta_BadFormat_Exception e) {
                    e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
                }
            }

        }
    }