Skip to content

Commit 96c640b

Browse files
committed
template update + warning when char state count < 2
1 parent fc8c5f8 commit 96c640b

4 files changed

Lines changed: 112 additions & 96 deletions

File tree

build.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<property name="srcBeast2" location="${beast2path}/src" />
1919
<property name="beast2classpath" location="${beast2path}/build" />
2020
<property name="Add_on_dir" value="${release_dir}/add-on" />
21-
<property name="version" value="1.0.1" />
21+
<property name="version" value="1.0.2" />
2222

2323
<import file="${beast2path}/build.xml" />
2424

src/beast/app/beauti/BeautiMorphModelAlignmentProvider.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,12 @@ public void processAlignment(Alignment alignment, List<BEASTInterface> filteredA
152152
}
153153
} else {
154154
// deal with the case where there is no charStateLabel or there is no state description
155+
if (nrOfStatesPresented < 2) {
156+
throw new RuntimeException("Cannot determine the number of possible states for character " +
157+
(i+1) + ". \n There is no character description and there are fewer than two states for " +
158+
"this character in the matrix. \n Please specify the number of possible states for " +
159+
"characters in CHARSTATELABELS block");
160+
}
155161
nrOfStates = nrOfStatesPresented;
156162
}
157163
if (!stateSpaceMap.containsKey(nrOfStates)) {

0 commit comments

Comments
 (0)