use of beast.evolution.alignment.TaxonSet in project beast2 by CompEvol.
the class GeneTreeForSpeciesTreeDistribution method getSetID.
/**
* @param lineageID
* @return species ID to which the lineage ID belongs according to the TaxonSets
*/
String getSetID(final String lineageID) {
final TaxonSet taxonSuperset = speciesTreePriorInput.get().taxonSetInput.get();
final List<Taxon> taxonSets = taxonSuperset.taxonsetInput.get();
for (final Taxon taxonSet : taxonSets) {
final List<Taxon> taxa = ((TaxonSet) taxonSet).taxonsetInput.get();
for (final Taxon aTaxa : taxa) {
if (aTaxa.getID().equals(lineageID)) {
return taxonSet.getID();
}
}
}
return null;
}
Aggregations