Skip to content

Commit

Permalink
make sure TipDatesRandomWalker picks up correct taxon set when used i…
Browse files Browse the repository at this point in the history
…n BEAuti. CompEvol/BeastFX#45
  • Loading branch information
rbouckaert committed Oct 1, 2023
1 parent 2ef96e8 commit 8d560c9
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/beast/base/evolution/operator/TipDatesRandomWalker.java
Expand Up @@ -43,9 +43,17 @@ public void initAndValidate() {

// determine taxon set to choose from
if (m_taxonsetInput.get() != null) {
List<String> taxaNames = new ArrayList<>();
for (String taxon : treeInput.get().getTaxaNames()) {
taxaNames.add(taxon);
List<String> taxaNames;
if (treeInput.get().m_taxonset.get() != null) {
// taxonset may have changed in BEAUti, and
// internal tree state not updated yet, so use
// taxonset input of tree directly
taxaNames = treeInput.get().m_taxonset.get().asStringList();
} else {
taxaNames = new ArrayList<>();
for (String taxon : treeInput.get().getTaxaNames()) {
taxaNames.add(taxon);
}
}

List<String> set = m_taxonsetInput.get().asStringList();
Expand Down

0 comments on commit 8d560c9

Please sign in to comment.