Package edu.msu.cme.rdp.taxatree

Examples of edu.msu.cme.rdp.taxatree.TaxonHolder


            values = oneHierBlock.get(ln);
            int taxid = Integer.parseInt(values[0]);
           
            // find the parent taxon
            String[] lineage = values[1].split(";");
            TaxonHolder parentTaxon = result.getRoot().getRootTaxonHodler();
            for ( int i= 2; i< lineage.length-2; i+=2){ // the first taxon should be the root
                TaxonHolder temp = parentTaxon.getImediateChildTaxon(lineage[i]);
                if ( temp == null){
                    throw new IOException("Error: Something is wrong with input file, can not find parent node " + lineage[i] + " in line: "+ values[1] );
                }
                parentTaxon = temp;
            }

            //check if the name and rank match the existing one, in case the result from different version
            TaxonHolder tempChild = parentTaxon.getImediateChildTaxon(values[2]);
            if ( tempChild != null){
                curTaxon = (MCTaxon) tempChild.getTaxon();

                if ( curTaxon.getTaxid() != taxid ){
                    throw new IOException("Error: Something is wrong with input file: taxon name " + values[2] + " with taxid " + taxid
                    + " does not match previous processed taxon " + curTaxon.getName() + " with taxid " + curTaxon.getTaxid()
                    + ". Possibly from different training sets ??");
View Full Code Here

TOP

Related Classes of edu.msu.cme.rdp.taxatree.TaxonHolder

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.