Package org.broad.igv.tools.sort

Examples of org.broad.igv.tools.sort.Sorter


        userMessageWriter.println("Sorting " + ifile + "  -> " + ofile);
        File inputFile = new File(ifile);
        boolean writeStdOut = ofile.equals(STDOUT_FILE_STR);
        File outputFile = writeStdOut ? null : new File(ofile);
        Sorter sorter = Sorter.getSorter(inputFile, outputFile);
        if (tmpDirName != null && tmpDirName.trim().length() > 0) {
            File tmpDir = new File(tmpDirName);
            if (!tmpDir.exists()) {
                log.error("Error: tmp directory: " + tmpDir.getAbsolutePath() + " does not exist.");
                throw new PreprocessingException("Error: tmp directory: " + tmpDir.getAbsolutePath() + " does not exist.");
            }
            sorter.setTmpDir(tmpDir);
        }

        sorter.setMaxRecords(maxRecords);

        try {
            sorter.run();
        } catch (Exception e) {
            e.printStackTrace();
            // Delete output file as its probably corrupt
            if (writeStdOut && outputFile.exists()) {
                outputFile.delete();
View Full Code Here


        File[] files = (new File(args[0])).listFiles();
        for (File file : files) {
            if (file.getName().endsWith(".eqtl")) {

                File sortedFile = new File(file.getAbsolutePath() + ".sorted.eqtl");
                Sorter sorter = Sorter.getSorter(file, sortedFile);
                sorter.run();

                (new EqtlPreprocessor()).process(sortedFile.getAbsolutePath(), file.getAbsolutePath() + ".bin");
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.broad.igv.tools.sort.Sorter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.