Exemplo n.º 1
0
 /* .......................................... DNAData .................................................. */
 public long getTaxonNumberInTree(Taxa taxa, int it) {
   Associable tInfo = getTaxaInfo(data, true);
   if (tInfo != null) {
     return (int) tInfo.getAssociatedLong(TNTtoAnalyze, it);
   }
   return -1;
 }
Exemplo n.º 2
0
  /*.................................................................................................................*/
  private void recordSourceProject() {
    MesquiteString s = new MesquiteString();
    s.setValue(getProject().getHomeFileName());
    if (!QueryDialogs.queryString(
        containerOfModule(),
        "Name to Stamp",
        "Indicate source file name to stamp on matrix rows",
        s)) return;

    int numMatrices = getProject().getNumberCharMatrices();
    NameReference sourceRef = NameReference.getNameReference("SourceFile");

    for (int im = 0; im < numMatrices; im++) {
      CharacterData data = getProject().getCharacterMatrix(im);
      Taxa taxa = data.getTaxa();
      Associable tInfo = data.getTaxaInfo(true);
      boolean anySelected = taxa.anySelected();
      for (int it = 0; it < taxa.getNumTaxa(); it++) {
        if (data.hasDataForTaxon(it) && (!anySelected || taxa.getSelected(it)))
          tInfo.setAssociatedObject(sourceRef, it, s.getValue());
      }
    }
  }
Exemplo n.º 3
0
 /* .......................................... MolecularData .................................................. */
 public void setTaxonNumberInTree(Taxa taxa, int it, int value) {
   Associable tInfo = getTaxaInfo(data, true);
   if (tInfo != null) {
     tInfo.setAssociatedLong(TNTtoAnalyze, it, value);
   }
 }