Examples of OTU


Examples of org.nexml.model.OTU

    List<org.nexml.model.Character> xmlCharacters = xmlMatrix.getCharacters();
   
    // iterates over all matrix rows, i.e. ntax times
    for ( MatrixRow tbRow : tbMatrix.getRowsReadOnly() ) {
      Set<RowSegment> tbSegments = tbRow.getSegmentsReadOnly();
      OTU xmlOTU = getOTUById(xmlOTUs, tbRow.getTaxonLabel().getId());
      if ( xmlCharacters.size() <= MAX_GRANULAR_NCHAR && xmlOTUs.getAllOTUs().size() <= MAX_GRANULAR_NTAX ) {
        populateDiscreteVerboseNexmlMatrix(xmlMatrix,tbMatrix,xmlCharacters,tbRow,tbSegments,xmlOTU);
      }
      else {
        String seq = tbRow.getNormalizedSymbolString();
View Full Code Here

Examples of org.nexml.model.OTU

      ContinuousMatrix tbMatrix) {
    List<org.nexml.model.Character> characterList = xmlMatrix.getCharacters();
    OTUs xmlOTUs = xmlMatrix.getOTUs();
    for ( MatrixRow tbRow : tbMatrix.getRowsReadOnly() ) {     
      List<MatrixElement> elements = tbRow.getElements();
      OTU xmlOTU = getOTUById(xmlOTUs, tbRow.getTaxonLabel().getId());
      if ( characterList.size() <= MAX_GRANULAR_NCHAR && xmlOTUs.getAllOTUs().size() <= MAX_GRANULAR_NTAX ) {
        for ( int elementIndex = 0; elementIndex < tbMatrix.getnChar(); elementIndex++ ) {
          ContinuousMatrixElement tbCell = (ContinuousMatrixElement)elements.get(elementIndex);
          MatrixCell<Double> xmlCell = xmlMatrix.getCell(xmlOTU, characterList.get(elementIndex));
          xmlCell.setValue(tbCell.getValue());
View Full Code Here

Examples of org.nexml.model.OTU

        for ( MatrixRow tbRow : ((CharacterMatrix) tbMatrix).getRowsReadOnly() ) {
          OTUs xmlOTUs = nexMatrix.getOTUs();
         
          //need to make an OTU list because getOTUByID cannot be is private
          List<OTU> xmlOTUList = xmlOTUs.getAllOTUs();//getOTUById(xmlOTUs, tbRow.getTaxonLabel().getId());
          OTU xmlOTU = xmlOTUList.get(otuIndex); //get xmlOTUs
          List<org.nexml.model.Character> characterList = nexMatrix.getCharacters();
       
          int charIndex = 0;
          if ( characterList.size() <= MAX_GRANULAR_NCHAR && xmlOTUs.getAllOTUs().size() <= MAX_GRANULAR_NTAX ) {
         
View Full Code Here

Examples of org.nexml.model.OTU

      // now iterate over all nodes in all trees in the focal tree block
      for ( Network<?> nexTree : nexTreeBlock ) {
        for ( Node nexNode : nexTree.getNodes() ) {
         
          // check to see if there is a taxon; this may be null because we also visit internal nodes
          OTU nexOTU = nexNode.getOTU();
          if ( null != nexOTU ) {
           
            // populate a set to pass into findEquivalentObject()
            Set<TaxonLabel> tbTlset = new HashSet<TaxonLabel>();
            tbTlset.addAll(tbTls.getTaxonLabelsReadOnly());
           
            // this must not be null, though
            TaxonLabel tbTl = (TaxonLabel)findEquivalentObject(nexOTU.getId(),"Tl",tbTlset);
            Assert.assertNotNull("Have to find taxon "+nexNode.getId()+" for node "+nexNode.getId(), tbTl);
          }
        }
      }   
    }
View Full Code Here

Examples of org.nexml.model.OTU

    attachTreeBaseID(xmlNode, tbNode,PhyloTreeNode.class)
    TaxonLabel taxonLabel = tbNode.getTaxonLabel();
    if ( null != taxonLabel ) {
      Long taxonId = taxonLabel.getId();
      for ( OTUs xmlOTUs : getDocument().getOTUsList() ) {
        OTU xmlOTU = getOTUById(xmlOTUs, taxonId);
        if ( null != xmlOTU ) {
          xmlNode.setOTU(xmlOTU);
          break;
        }
      }
View Full Code Here

Examples of org.nexml.model.OTU

   * @param taxonLabel
   * @param xmlOTUs
   * @return
   */
  protected OTU fromTreeBaseToXml(TaxonLabel taxonLabel,OTUs xmlOTUs) {
    OTU xmlOTU = xmlOTUs.createOTU();
    if ( null != taxonLabel.getTaxonLabel() ) {
      xmlOTU.setLabel(taxonLabel.getTaxonLabel());
    }
    attachTreeBaseID(xmlOTU,taxonLabel,TaxonLabel.class);
    return xmlOTU;
  }
View Full Code Here

Examples of org.nexml.model.OTU

   * @param taxon
   * @param xmlOTUs
   * @return
   */
  protected OTU fromTreeBaseToXml(Taxon taxon,OTUs xmlOTUs) {
    OTU xmlOTU = xmlOTUs.createOTU();
    if ( null != taxon.getLabel() ) {
      xmlOTU.setLabel(taxon.getLabel());
    }
    attachTreeBaseID(xmlOTU,taxon,Taxon.class);
    return xmlOTU;
  }
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.