diff --git a/src/snap/AncestralTreeHeightLogger.java b/src/snap/AncestralTreeHeightLogger.java index eb78c50..9d85546 100644 --- a/src/snap/AncestralTreeHeightLogger.java +++ b/src/snap/AncestralTreeHeightLogger.java @@ -32,7 +32,7 @@ public void init(PrintStream out) { } @Override - public void log(int nSample, PrintStream out) { + public void log(long nSample, PrintStream out) { for (Node node : tree.getNodesAsArray()) { out.append(node.getHeight() + "\t"); } diff --git a/src/snap/CoalescentUnitTreeLogger.java b/src/snap/CoalescentUnitTreeLogger.java index d2fda74..006a3b8 100644 --- a/src/snap/CoalescentUnitTreeLogger.java +++ b/src/snap/CoalescentUnitTreeLogger.java @@ -34,7 +34,7 @@ public void init(PrintStream out) { } @Override - public void log(int nSample, PrintStream out) { + public void log(long nSample, PrintStream out) { // make sure we get the current version of the inputs coalescenceRate = (RealParameter) ((StateNode) coalescenceRate).getCurrent(); // write out the log tree with meta data diff --git a/src/snap/Data.java b/src/snap/Data.java index 0c8c035..f02282f 100644 --- a/src/snap/Data.java +++ b/src/snap/Data.java @@ -32,18 +32,15 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; -import beast.app.beauti.Beauti; import beast.core.Description; import beast.core.Input; import beast.core.Input.Validate; -import beast.core.util.Log; import beast.evolution.alignment.Sequence; import beast.evolution.alignment.Taxon; import beast.evolution.alignment.TaxonSet; import beast.evolution.datatype.Binary; import beast.evolution.datatype.DataType; import beast.evolution.datatype.IntegerData; -import beast.evolution.datatype.IntegerData2; import beast.evolution.datatype.Nucleotide; import beast.evolution.datatype.StandardData; diff --git a/src/snap/MCMC.java b/src/snap/MCMC.java index 7f606c2..bd9a560 100644 --- a/src/snap/MCMC.java +++ b/src/snap/MCMC.java @@ -66,7 +66,7 @@ public void run() throws SAXException, IOException, ParserConfigurationException operatorSchedule.setStateFileName(stateFileName); int nBurnIn = burnInInput.get(); - int nChainLength = chainLengthInput.get(); + long nChainLength = chainLengthInput.get(); int nStateBurnin = m_oStateBurnIn.get(); if (restoreFromFile) { state.restoreFromFile(); @@ -161,7 +161,7 @@ public void run() throws SAXException, IOException, ParserConfigurationException boolean bStayAlive = true; - for (int iSample = -nBurnIn; iSample <= nChainLength && bStayAlive; iSample++) { + for (long iSample = -nBurnIn; iSample <= nChainLength && bStayAlive; iSample++) { //State proposedState = state.copy(); state.store(iSample); diff --git a/src/snap/ML.java b/src/snap/ML.java index 114048b..7638942 100644 --- a/src/snap/ML.java +++ b/src/snap/ML.java @@ -66,7 +66,7 @@ public void run() throws IOException { state.setEverythingDirty(true); int nBurnIn = burnInInput.get(); - int nChainLength = chainLengthInput.get(); + long nChainLength = chainLengthInput.get(); //int nStateBurnin = m_oStateBurnIn.get(); System.err.println("Start state:"); @@ -121,7 +121,7 @@ public void run() throws IOException { state.setEverythingDirty(true); double fOldLogLikelihood = calc(); System.err.println("Start likelihood: = " + fOldLogLikelihood); - for (int iSample = -nBurnIn; iSample <= nChainLength; iSample++) { + for (long iSample = -nBurnIn; iSample <= nChainLength; iSample++) { //State proposedState = state.copy(); state.store(iSample); diff --git a/src/snap/ThetaLogger.java b/src/snap/ThetaLogger.java index 10d70cb..3018325 100644 --- a/src/snap/ThetaLogger.java +++ b/src/snap/ThetaLogger.java @@ -36,7 +36,7 @@ public void init(PrintStream out) { } @Override - public void log(int nSample, PrintStream out) { + public void log(long nSample, PrintStream out) { RealParameter var = (RealParameter) m_coalescenceRate.get(); int nValues = var.getDimension(); for (int iValue = 0; iValue < nValues; iValue++) { diff --git a/src/snap/TreeLengthLogger.java b/src/snap/TreeLengthLogger.java index 0c7cdcb..0750c54 100644 --- a/src/snap/TreeLengthLogger.java +++ b/src/snap/TreeLengthLogger.java @@ -29,7 +29,7 @@ public void init(PrintStream out) { } @Override - public void log(int nSample, PrintStream out) { + public void log(long nSample, PrintStream out) { Tree tree = (Tree) m_tree.get(); double heightsum = tree.getRoot().getHeight(); heightsum += heightSum(tree.getRoot()); diff --git a/src/snap/TreeNodeLogger.java b/src/snap/TreeNodeLogger.java index f7ebb84..738fa8f 100644 --- a/src/snap/TreeNodeLogger.java +++ b/src/snap/TreeNodeLogger.java @@ -38,7 +38,7 @@ void initLog(PrintStream out, Node node) { } @Override - public void log(int nSample, PrintStream out) { + public void log(long nSample, PrintStream out) { final Tree tree = m_tree.get(); logTree(out, tree.getRoot()); } diff --git a/src/snap/likelihood/NormalisedDistributionLogger.java b/src/snap/likelihood/NormalisedDistributionLogger.java index c5f48a4..ae98d1f 100644 --- a/src/snap/likelihood/NormalisedDistributionLogger.java +++ b/src/snap/likelihood/NormalisedDistributionLogger.java @@ -29,7 +29,7 @@ public void init(PrintStream out) { } @Override - public void log(final int nSample, final PrintStream out) { + public void log(final long nSample, final PrintStream out) { out.print(distribution.getCurrentLogP() - treeLikelihood.getAscSitesLogP() + "\t"); } diff --git a/src/snap/likelihood/SnAPTreeLikelihood.java b/src/snap/likelihood/SnAPTreeLikelihood.java index 7f4b770..115e88c 100644 --- a/src/snap/likelihood/SnAPTreeLikelihood.java +++ b/src/snap/likelihood/SnAPTreeLikelihood.java @@ -381,7 +381,7 @@ public void init(PrintStream out) { } @Override - public void log(int nSample, PrintStream out) { + public void log(long nSample, PrintStream out) { super.log(nSample, out); if (!m_bUsenNonPolymorphic) { out.append(m_fP0 + "\t");