Examples of SequenceReader


Examples of edu.msu.cme.rdp.readseq.readers.SequenceReader

        BufferedWriter wt = new BufferedWriter(new FileWriter(detailFile));


        Classifier aClassifier = factory.createClassifier();
        TaxonTree root = null;
        SequenceReader parser = null;
        Sequence pSeq = null;
        int count = 0;

        try {
            parser = new SequenceReader(inStream1);
            while((pSeq = parser.readNextSequence()) != null) {
                try {
                    ClassificationResult result = aClassifier.classify(pSeq);
                    root = reconstructTree(result, root, SAMPLE1);
                    wt.write(ClassificationResultFormatter.getOutput(result, format));

                } catch (ShortSequenceException e) {
                    System.out.println(e.getMessage());
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }

            parser = new SequenceReader(inStream2);
            while((pSeq = parser.readNextSequence()) != null) {
                try {
                    ClassificationResult result = aClassifier.classify(pSeq);
                    root = reconstructTree(result, root, SAMPLE2);
                    wt.write(ClassificationResultFormatter.getOutput(result, format));

                } catch (ShortSequenceException e) {
                    System.out.println(e.getMessage());
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        } finally {
            parser.close();
            wt.close();
        }

        if (root != null) {
            // change the assignment count for the taxa based on the confidence cutoff value
View Full Code Here

Examples of edu.msu.cme.rdp.readseq.readers.SequenceReader

        if (format == null) {
            format = CmdOptions.DEFAULT_FORMAT;
        }
        ClassifierFactory factory = ClassifierFactory.getFactory(gene);
        Classifier aClassifier = factory.createClassifier();
        SeqReader parser = new SequenceReader(new File(inputFile));
        BufferedWriter wt = new BufferedWriter(new FileWriter(outFile));
        Sequence pSeq = null;

        try {
            while ((pSeq = parser.readNextSequence()) != null) {
                try {
                    ClassificationResult result = aClassifier.classify(new ClassifierSequence(pSeq), min_bootstrap_words);
                    wt.write(ClassificationResultFormatter.getOutput(result, format));

                } catch (ShortSequenceException e) {
View Full Code Here

Examples of edu.msu.cme.rdp.readseq.readers.SequenceReader

        this.sampleName = sampleName;
        setDupCountFile(dupCountFile);
    }

    public MCSample(File in, String sampleName) throws IOException {
        parser = new SequenceReader(in);
        this.sampleName = sampleName;
    }
View Full Code Here

Examples of edu.msu.cme.rdp.readseq.readers.SequenceReader

    private LineageSequence onDeck;
    private LineageSequence curSeq = null;

    /** Creates new RawSequenceParser to parse the input fasta file. */
    public LineageSequenceParser(File inFile) throws IOException {
        seqReader = new SequenceReader(inFile);
    }
View Full Code Here

Examples of edu.msu.cme.rdp.readseq.readers.SequenceReader

        seqReader = new SequenceReader(inFile);
    }
   
    /** Creates new RawSequenceParser to parse the input fasta file. */
    public LineageSequenceParser(InputStream is) throws IOException {
        seqReader = new SequenceReader(is);
    }
View Full Code Here

Examples of org.apache.derbyTesting.system.nstest.utils.SequenceReader

    }

    // check sequence value thread
    // 60,000 msec = 1 minute delay between checks
    logger.println("Starting sequence reader thread");
    SequenceReader  sequenceReader = new SequenceReader( DriverManager.getConnection( jdbcUrl, prop ), 60000 );
    sequenceReader.start();

    // Wait for the test threads to finish and join back
    for (int j = 0; j < maxTestThreads; j++)
        {
            logger.println("Waiting for thread " + j+ " to join back/finish");
      testThreads[j].join();
    }

        if ( timerThread != null )
        {
            timerThread.stopNow();
            timerThread.interrupt();
            timerThread.join();
        }

        // stop the sequence reader thread
    sequenceReader.stopNow = true;
    sequenceReader.interrupt();
    sequenceReader.join();

    // Print statistics
        printStatistics();

    // Finally also stop the memory checker thread
View Full Code Here

Examples of org.apache.servicemix.eip.support.resequence.SequenceReader

    private long timeout;
   
    private SequenceElementComparator<MessageExchange> comparator;
   
    public Resequencer() {
        this.reader = new SequenceReader(this);
        this.comparator = new DefaultComparator();
    }
View Full Code Here

Examples of org.fnlp.data.reader.SequenceReader

    Pipe pipe = createProcessor();

    // 测试集
    testSet = new InstanceSet(pipe);

    testSet.loadThruStagePipes(new SequenceReader(testfile,hasLabel,"utf8"));
    System.out.println("测试样本个数:\t" + testSet.size()); // 样本个数

    long featuretime = System.currentTimeMillis();

View Full Code Here

Examples of org.fnlp.data.reader.SequenceReader

    features = factory.DefaultFeatureAlphabet();
    features.setStopIncrement(false);
    labels.setStopIncrement(false);

    // 训练集
    trainSet.loadThruStagePipes(new SequenceReader(train, true));

    long endTime = System.currentTimeMillis();
    System.out.println(" done!");
    System.out.println("Time escape: " + (endTime - beginTime) / 1000 + "s");
    System.out.println();
View Full Code Here

Examples of org.fnlp.data.reader.SequenceReader

        pipe = featurePipe;
      }

      // 测试集
      testSet = new InstanceSet(pipe);
      testSet.loadThruStagePipes(new SequenceReader(testfile, hasTarget, "utf8"));
      System.out.println("Test Number: " + testSet.size()); // 样本个数
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.