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

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



        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) {
View Full Code Here


                assign_out.print("\t" + ranks[i]);
            }
            assign_out.println();
        }
        for (MCSample sample : samples) {
            Sequence seq;

            while ((seq = sample.getNextSeq()) != null) {
                try {
                    ClassificationResult result = classifier.classify(new ClassifierSequence(seq), min_bootstrap_words);
                    if ( !format.equals(ClassificationResultFormatter.FORMAT.biom)){
                        printClassificationResult(result, assign_out, format, confidence);
                    }else {
                        seqClassificationMap.put(result.getSequence().getSeqName(), ClassificationResultFormatter.getOutput(result, format, confidence, ranks));
                    }
                    processClassificationResult(result, sample, root, confidence, seqCountMap);
                    sample.addRankCount(result);

                } catch (ShortSequenceException e) {
                    badSequences.add(seq.getSeqName());
                }

            }
        }
View Full Code Here

        }
        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);
View Full Code Here

        return sampleName;
    }

    public ClassifierSequence getNextSeq() throws IOException {
        if (parser != null) {
            Sequence seq = parser.readNextSequence();
            if(seq == null) {
                return null;
            } else {
                return new ClassifierSequence(seq);
            }
View Full Code Here

        String seqstring = "";
        boolean endoffile = true;
        boolean origin = false;

        Sequence seq = seqReader.readNextSequence();
        if (seq == null) {
            return null;
        }

        curSeq = new LineageSequence(seq.getSeqName(), decomposeHeader(seq.getDesc()), modifySequence(seq.getSeqString()));

        LineageSequence retval = curSeq;
        curSeq = nextSeq;

        return retval;
View Full Code Here

TOP

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

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.