Skip to content

Commit

Permalink
update to BEAST v2.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
rbouckaert committed Jun 10, 2019
1 parent 65aeced commit 039ac1a
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 13 deletions.
2 changes: 1 addition & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<property name="srcBeast2" location="${beast2path}/src" />
<property name="beast2classpath" location="${beast2path}/build" />
<property name="Add_on_dir" value="${release_dir}/add-on" />
<property name="version" value="1.8.2" />
<property name="version" value="1.9.0" />

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

Expand Down
2 changes: 1 addition & 1 deletion src/beast/app/beauti/FileInputEditor.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public void actionPerformed(ActionEvent arg0) {
m_entry.setText(file.getName());
m_input.setValue(newFile(file), m_beastObject);
String path = file.getPath();
Beauti.g_sDir = path;
Beauti.setCurrentDir(path);
}
} catch (Exception e) {
// TODO Auto-generated catch block
Expand Down
2 changes: 1 addition & 1 deletion src/beast/app/beauti/OutFileInputEditor.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public void actionPerformed(ActionEvent arg0) {
m_entry.setText(file.getName());
m_input.setValue(new OutFile(file.getPath()), m_beastObject);
String path = file.getPath();
Beauti.g_sDir = path;
Beauti.setCurrentDir(path);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
Expand Down
5 changes: 3 additions & 2 deletions src/beast/app/draw/SpreadSheet.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
import beast.core.BEASTObject;
import beast.evolution.alignment.Alignment;
import beast.evolution.alignment.Sequence;
import beast.util.BEASTClassLoader;
import beast.util.PackageManager;
import beast.util.XMLParser;
import beast.util.XMLProducer;
Expand Down Expand Up @@ -236,7 +237,7 @@ public void mouseClicked(MouseEvent e) {
"select", JOptionPane.PLAIN_MESSAGE, null, m_sPlugInNames, null);
if (sClassName != null) {
try {
BEASTObject plugin = (beast.core.BEASTObject) Class.forName(sClassName).newInstance();
BEASTObject plugin = (beast.core.BEASTObject) BEASTClassLoader.forName(sClassName).newInstance();
m_objects[iRow][iCol] = plugin;
m_pluginLocation.put(plugin, iRow + iCol * MAX_ROW);
m_plugins.add(plugin);
Expand Down Expand Up @@ -701,7 +702,7 @@ void parsePlugin(String sStr, int iRow, int iCol) {
}
BEASTObject plugin = null;
if (m_objects[iRow][iCol]==null || !m_objects[iRow][iCol].getClass().getName().equals(sClass)) {
plugin = (BEASTObject) Class.forName(sClass).newInstance();
plugin = (BEASTObject) BEASTClassLoader.forName(sClass).newInstance();
} else {
plugin = (BEASTObject) m_objects[iRow][iCol];
}
Expand Down
9 changes: 8 additions & 1 deletion src/beast/app/util/Application.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

import org.json.JSONObject;

import beast.app.beauti.Beauti;
import beast.app.beauti.BeautiConfig;
import beast.app.beauti.BeautiDoc;
import beast.app.draw.BEASTObjectDialog;
Expand All @@ -20,6 +21,7 @@
import beast.core.Description;
import beast.core.Input;
import beast.core.util.Log;
import beast.util.BEASTClassLoader;

@Description("BEAST application that handles argument parsing by introspection "
+ "using Inputs declared in the class.")
Expand Down Expand Up @@ -155,6 +157,10 @@ public void parseArgs(String[] args, boolean sloppy) throws Exception {
Log.info.println(getUsage());
// CLI usage only
System.exit(0);
} else if (name.equals("wd")) {
// set working directory
Beauti.g_sDir = value;
i++;
}
if (matchingInput == null) {

Expand Down Expand Up @@ -195,6 +201,7 @@ public String getUsage() {
try {
List<Input<?>> inputs = myBeastObject.listInputs();
buf.append("Usage: " + myBeastObject.getClass().getName() + "\n");
buf.append(myBeastObject.getDescription() + "\n");
for (Input<?> input : inputs) {
buf.append("-" + input.getName() + " ");
try {
Expand Down Expand Up @@ -225,7 +232,7 @@ public void run() throws Exception {
public static void main(final String[] args) throws Exception {
Application main = null;
try {
BEASTObject myBeastObject = (BEASTObject) Class.forName(args[0])
BEASTObject myBeastObject = (BEASTObject) BEASTClassLoader.forName(args[0])
.newInstance();
main = new Application(myBeastObject);
String[] args2 = new String[args.length - 1];
Expand Down
3 changes: 2 additions & 1 deletion src/beast/inference/ParticleFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import beast.core.BEASTObject;
import beast.core.Input.Validate;
import beast.math.statistic.DiscreteStatistics;
import beast.util.BEASTClassLoader;
import beast.util.Randomizer;
import beast.util.XMLProducer;

Expand Down Expand Up @@ -375,7 +376,7 @@ public void run() throws Exception {
m_nCountDown = new CountDownLatch(m_nParticles);

for (int i = 0; i < m_nParticles; i++) {
Object o = Class.forName(m_sParticleLauncher.get()).newInstance();
Object o = BEASTClassLoader.forName(m_sParticleLauncher.get()).newInstance();
if (!(o instanceof ParticleLauncher)) {
throw new Exception(m_sParticleLauncher.get() + " is not a particle launcher.");
}
Expand Down
8 changes: 4 additions & 4 deletions src/beast/math/distributions/MultiMRCAPriors.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ public class MultiMRCAPriors extends MultiMonophyleticConstraint {
public Input<List<MRCAPrior>> calibrationsInput =
new Input<List<MRCAPrior>>("distribution", "Set of calibrated nodes", new ArrayList<MRCAPrior>());

private int[] nodeToCladeGroup = null;
private int prevNodeCount = -1;
private int[] ctops = null;
private boolean[] ctopParent = null;
protected int[] nodeToCladeGroup = null;
protected int prevNodeCount = -1;
protected int[] ctops = null;
protected boolean[] ctopParent = null;

@Override
public void initAndValidate() {
Expand Down
4 changes: 2 additions & 2 deletions version.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<package name='BEASTLabs' version='1.8.2'>
<depends on='beast2' atleast='2.5.0'/>
<package name='BEASTLabs' version='1.9.0'>
<depends on='beast2' atleast='2.6.0' atmost="2.6.9"/>
<packageapp description="BEAST model spreadsheet"
class="beast.app.draw.SpreadSheet"
args=""
Expand Down

0 comments on commit 039ac1a

Please sign in to comment.