Package mesquite.lib

Examples of mesquite.lib.Parser


      // taxa.getTaxon(it).setNameIsDefault(true);
    }

    // need to make sure newick string consists of indices:
    StringBuffer newick = new StringBuffer();
    Parser mesqParser = new Parser(pNewick);
    String aToken = mesqParser.getNextToken();
    int i = 0;
    while (!TreebaseUtil.isEmpty(aToken)) {
      // logger.debug(" " + i+ ": " + aToken);
      String aTokenwithUnderline = StringUtil.blanksToUnderline(aToken);
      if (taxonLabelStrToIndexMap.containsKey(aTokenwithUnderline)) {
        newick.append(taxonLabelStrToIndexMap.get(aTokenwithUnderline).toString());
      } else {
        newick.append(aToken);
      }
      i++;
      aToken = mesqParser.getNextToken();
    }

    if (LOGGER.isDebugEnabled()) {
      LOGGER.debug("replace newick=" + newick); //$NON-NLS-1$
    }
View Full Code Here

TOP

Related Classes of mesquite.lib.Parser

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.