Package edu.msu.cme.rdp.readseq.readers

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


        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

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

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

    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

        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

TOP

Related Classes of edu.msu.cme.rdp.readseq.readers.SequenceReader

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.