Skip to content

Commit

Permalink
add fix for alignments correctly saving as XML in BEAUti #1150
Browse files Browse the repository at this point in the history
  • Loading branch information
rbouckaert committed Jun 12, 2024
1 parent c9d41d9 commit 547b42d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/beast/base/evolution/alignment/Alignment.java
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,20 @@ public void initAndValidate() {
Log.info.println(toString(false));
}


/** hack to suppress empty TaxonSets in XML output
* this was no problem when Alignments was a CalculationNode,
* but became an issue changing it to a StateNode
* TODO: fix this**/
@Override
public List<Input<?>> listInputs() {
List<Input<?>> inputs = super.listInputs();
if (taxonSetInput.get() != null && taxonSetInput.get().getTaxonCount() == 0) {
inputs.remove(taxonSetInput);
}
return inputs;
}

/**
* Initializes data types using
* {@link PackageManager#find(Class, String[]) PackageManager.find}
Expand Down

0 comments on commit 547b42d

Please sign in to comment.