Examples of TaxonLabel


Examples of org.cipres.treebase.domain.taxon.TaxonLabel

        for (int j = 0; j < taxaIDs.length; j++) {
          Taxon taxon = t.getTaxon(j);

          String aLabel = taxon.getName();

          TaxonLabel taxonLabel = getTaxonLabelHome().getByDescriptionAndStudy(
            aLabel,
            pStudy);

          labelSet.addPhyloTaxonLabel(taxonLabel);
        }
View Full Code Here

Examples of org.cipres.treebase.domain.taxon.TaxonLabel

   *
   * @param pTaxonLabel the instance to be updated.
   * @return the updated instance.
   */
  public TaxonLabel updateAndRegenerateNewick(TaxonLabel pTaxonLabel) {
    TaxonLabel newLabel = super.update(pTaxonLabel);

    if (newLabel != null) {
      List<TaxonLabel> labels = new ArrayList<TaxonLabel>();
      labels.add(newLabel);

View Full Code Here

Examples of org.cipres.treebase.domain.taxon.TaxonLabel

    PhyloTree tree = new PhyloTree();
    tree.setTitle(newName);
   
    List<TaxonLabel> labels = new ArrayList<TaxonLabel>();
    labels.add(new TaxonLabel("Heppiella_verticillata"));
    labels.add(new TaxonLabel("Heppiella_ulmifolia"));
    labels.add(new TaxonLabel("Heppiella_viscida"));
    labels.add(new TaxonLabel("Heppiella_repens"));
    labels.add(new TaxonLabel("Gloxinia"));
   
    //String newick2 = "[&R] (Gloxinia,Gloxinia_1234,(Heppiella_repens,Heppiella_verticillata,Heppiella_viscida,Heppiella_ulmifolia))";
    String newick = "[&R] (Gloxinia,(Heppiella_repens,Heppiella_verticillata,Heppiella_viscida,Heppiella_ulmifolia))";
   
//    Parser mesqParser = new Parser(newick2);
View Full Code Here

Examples of org.cipres.treebase.domain.taxon.TaxonLabel

        submissions.get(tl).add(sub);
      }
    }

    for (Object o : tlHome.findAll(TaxonLabel.class)) {
      TaxonLabel tl = (TaxonLabel) o;
      Submission correctSub = tl.getSubmission();
      List<Submission> otherSubs = submissions.get(tl);

      warn("#" + tl.getId());
      if (otherSubs.size() == 1
          && otherSubs.iterator().next().equals(correctSub)) {
        warn("  already correct");
        continue;
      }
View Full Code Here

Examples of org.cipres.treebase.domain.taxon.TaxonLabel

            // 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.cipres.treebase.domain.taxon.TaxonLabel

        Map<String, MatrixRow> taxonLabelRowMap = pMatrix.buildTaxonLabelRowMap();
        aRowSegment.update(pMappedFields, lineStr, taxonLabelRowMap, pExecution);
       
        //specimen label
        String specimenTaxonLabel = aRowSegment.getSpecimenTaxonLabelStr();
        TaxonLabel taxonLabel = getTaxonLabelHome().getByDescriptionAndStudy(
          specimenTaxonLabel, pStudy);
       
        aRowSegment.setTaxonLabel(taxonLabel);
       
        //validate
View Full Code Here

Examples of org.cipres.treebase.domain.taxon.TaxonLabel

    long taxonLabelId = jdbcTemplate.queryForLong(labelStr);
    logger.info("taxonLabel id: " + taxonLabelId);
    assertTrue(taxonLabelId > 0);
   
    //get taxon label object
    TaxonLabel label = (TaxonLabel) loadObject(TaxonLabel.class, taxonLabelId);
    assertTrue(label != null);
 
    Set<PhyloTreeNode> nodes = getFixture().findNodesByTaxonLabel(label)
    assertTrue(nodes.size() >= 1);
    for (PhyloTreeNode n : nodes)
View Full Code Here

Examples of org.cipres.treebase.domain.taxon.TaxonLabel

    long taxonLabelId = jdbcTemplate.queryForLong(labelStr);
    logger.info("taxonLabel id: " + taxonLabelId);
    assertTrue(taxonLabelId > 0);

    // 2. query
    TaxonLabel label = (TaxonLabel) loadObject(TaxonLabel.class, taxonLabelId);
    assertTrue(label != null);

    List<TaxonLabel> labelList = new ArrayList<TaxonLabel>();
    labelList.add(label);

    Collection<PhyloTree> trees = getFixture().findByAnyTaxonLabel(labelList);
    assertTrue(trees != null && !trees.isEmpty());

    // 3. verify
    for (PhyloTree phyloTree : trees) {

      long treeId = phyloTree.getId();
      String treeCountStr = "select count(tree.phylotree_id) from phylotree tree, phylotreenode node "
        + " where tree.PHYLOTREE_ID = node.PHYLOTREE_ID and node.TAXONLABEL_ID = "
        + label.getId() + " and tree.PHYLOTREE_ID = " + treeId;
      int count = jdbcTemplate.queryForInt(treeCountStr);
      assertTrue(count > 0);
    }

    if (logger.isInfoEnabled()) {
View Full Code Here

Examples of org.cipres.treebase.domain.taxon.TaxonLabel

      // If this taxon label is not shared by some other study, ignore it
      if (referringStudies.isEmpty()) continue;

      {
        TaxonLabel replacementTaxonLabel = new TaxonLabel();
        replacementTaxonLabel.setTaxonLabel(tl.getTaxonLabel());
        replacementTaxonLabel.setStudy(s);
        replacementTaxonLabel.setTaxonVariant(tl.getTaxonVariant());
        getTaxonLabelHome().save(replacementTaxonLabel);
       
        replacement.put(tl, replacementTaxonLabel);
     
    }
View Full Code Here

Examples of org.cipres.treebase.domain.taxon.TaxonLabel

    // Now remove the non-canonical labels from the old submission
    {
      warn("  Removing labels from submissions");
      for (TaxonLabel tl : canonical.keySet()) {
        if (tl == null) continue;
        TaxonLabel tlCanonical = canonical.get(tl);
        if (tl == tlCanonical) continue;
       
        Submission newLabelSub = tlCanonical.getSubmission();
        Submission oldLabelSub = tl.getSubmission();
       
        // Remove old label from submission
        oldLabelSub.removeTaxonLabel(tl);
       
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.