Skip to content

Commit

Permalink
template clock model reversion
Browse files Browse the repository at this point in the history
  • Loading branch information
jordandouglas committed Sep 5, 2022
1 parent 7919718 commit 71df128
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 2 additions & 0 deletions fxtemplates/StarBeast3.xml
Original file line number Diff line number Diff line change
Expand Up @@ -234,10 +234,12 @@ ClusterTree/clusterType//'>
<panel spec="beastfx.app.inputeditor.BeautiPanelConfig" panelname="Site Model" tiptext="Site model and substitution model specifications" path="siteModel" hasPartitions="SiteModel" icon="3.pngx" forceExpansion="TRUE"/>
<mergepoint id="aux-sb3-sitemodel-panels"/>

<!--
<panel spec='beastfx.app.inputeditor.BeautiPanelConfig' panelname="Gene Clock Model" tiptext="Clock model"
path='branchRateModel' type="starbeast3.evolution.branchratemodel.StarBeast3Clock"
hasPartitions="ClockModel" forceExpansion='TRUE'
/>
-->
<mergepoint id='aux-sb3-clockmodel-panels'/>

<panel spec="beastfx.app.inputeditor.BeautiPanelConfig" panelname="Species Clock Model" icon='4.png.x' tiptext="Species Clock model" path="init/sharedRateModel/branchRateModel" forceExpansion="TRUE"/>
Expand Down
14 changes: 7 additions & 7 deletions src/starbeast3/evolution/branchratemodel/StarBeast3Clock.java
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,7 @@ public double getRateForBranch(Node node) {
private static Boolean initialValueOfAutoSet = null;
public static void estimateGeneClockRates(BeautiDoc doc) {

if (true) return;

/*
if (initialValueOfAutoSet == null) initialValueOfAutoSet = doc.beauti.get_autoSetClockRate().isSelected();
// Loaded in an old file. Do not overwrite
Expand All @@ -225,7 +224,7 @@ public static void estimateGeneClockRates(BeautiDoc doc) {
beautiClocksChecked.clear();
return;
}

*/
for (String str : doc.pluginmap.keySet()) {

// Find the StarBeast3Clocks
Expand All @@ -234,18 +233,19 @@ public static void estimateGeneClockRates(BeautiDoc doc) {

StarBeast3Clock clock = (StarBeast3Clock)obj;

/*
// Do not revisit this clock or the users wishes will be overridden
if (beautiClocksChecked.containsKey(clock) && beautiClocksChecked.get(clock) > 0) {
Log.warning("StarBeast3Clock Skipping " + clock.getID());
continue;
}

*/

if (clock.meanRateInput.get() != null && clock.meanRateInput.get() instanceof StateNode) {

StateNode rp = (StateNode)clock.meanRateInput.get();


rp.isEstimatedInput.set(true);
/*
// The first clock is not estimated
if (firstBeautiClock == null || firstBeautiClock == clock) {
firstBeautiClock = clock;
Expand All @@ -260,7 +260,7 @@ public static void estimateGeneClockRates(BeautiDoc doc) {
val += beautiClocksChecked.get(clock);
}
beautiClocksChecked.put(clock, val);

*/
}

}
Expand Down

0 comments on commit 71df128

Please # to comment.