diff --git a/Source/mesquite/Mesquite.java b/Source/mesquite/Mesquite.java
index 4ca36fde1..42cd234a0 100644
--- a/Source/mesquite/Mesquite.java
+++ b/Source/mesquite/Mesquite.java
@@ -37,24 +37,24 @@ public class Mesquite extends MesquiteTrunk
{
/*.................................................................................................................*/
public String getCitation() {
- return "Maddison, W.P. & D.R. Maddison. 2018. Mesquite: A modular system for evolutionary analysis. Version 3.6. http://www.mesquiteproject.org";
+ return "Maddison, W.P. & D.R. Maddison. 2019. Mesquite: A modular system for evolutionary analysis. Version 3.61. http://www.mesquiteproject.org";
}
/*.................................................................................................................*/
public String getVersion() {
- return "3.6";
+ return "3.61";
}
/*.................................................................................................................*/
public int getVersionInt() {
- return 360;
+ return 361;
}
/*.................................................................................................................*/
public double getMesquiteVersionNumber(){
- return 3.6;
+ return 3.61;
}
/*.................................................................................................................*/
public String getDateReleased() {
- return "December 2018"; //"April 2007";
+ return "December 2019"; //"April 2007";
}
/*.................................................................................................................*/
public boolean isPrerelease(){
@@ -380,7 +380,7 @@ else if (prefsFile.exists() || prefsFileXML.exists()) {
String logInitString = "Mesquite version " + getMesquiteVersion() + getBuildVersion() + "\n";
if (StringUtil.notEmpty(MesquiteModule.getSpecialVersion()))
logInitString +=" " + MesquiteModule.getSpecialVersion()+ "\n";
- logInitString += ("Copyright (c) 1997-2018 W. Maddison and D. Maddison\n");
+ logInitString += ("Copyright (c) 1997-2019 W. Maddison and D. Maddison\n");
logInitString += "The basic Mesquite package (class library and basic modules) is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License. "
+ " Mesquite is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY. For details on license and "
+ "lack of warranty see the GNU Lesser General Public License by selecting \"Display License\" from the Window menu or at www.gnu.org\n"
diff --git a/Source/mesquite/align/AlignDNAToProtein/AlignDNAToProtein.java b/Source/mesquite/align/AlignDNAToProtein/AlignDNAToProtein.java
index 4bfbb9eb6..9dc72173e 100644
--- a/Source/mesquite/align/AlignDNAToProtein/AlignDNAToProtein.java
+++ b/Source/mesquite/align/AlignDNAToProtein/AlignDNAToProtein.java
@@ -70,7 +70,7 @@ public boolean forceAlignment(DNAData dnaData, ProteinData proteinData, int it)
int numBases = dnaData.getNumberApplicableInTaxon(it, true);
int numAAs = proteinData.getNumberApplicableInTaxon(it, true);
if (numAAs*3!= numBases) {
- logln("Number of nucleotides in sequence does not correspond to number of amino acids in protein sequence (taxon " + it+1 + ")");
+ logln("Number of nucleotides (\" + numBases + \") in sequence does not correspond to number of amino acids (\" + numAAs + \") in protein sequence (taxon " + (it+1) + ")");
return false;
}
diff --git a/Source/mesquite/align/MuscleAlign/MuscleAlign.java b/Source/mesquite/align/MuscleAlign/MuscleAlign.java
index 759fd5979..e2e245907 100644
--- a/Source/mesquite/align/MuscleAlign/MuscleAlign.java
+++ b/Source/mesquite/align/MuscleAlign/MuscleAlign.java
@@ -40,7 +40,7 @@ public boolean showCitation() {
}
/*.................................................................................................................*/
public String getCitation() {
- return "Please remember to cite the version of Muscle you used.";
+ return "Please remember to cite the version of MUSCLE you used.";
}
/*.................................................................................................................*/
public boolean isSubstantive(){
@@ -52,11 +52,11 @@ public boolean isPrerelease(){
}
/*.................................................................................................................*/
public String getName() {
- return "Muscle Align";
+ return "MUSCLE Align";
}
/*.................................................................................................................*/
public String getNameForMenuItem() {
- return "Muscle Align...";
+ return "MUSCLE Align...";
}
/*.................................................................................................................*/
/** returns an explanation of what the module does.*/
@@ -65,9 +65,13 @@ public String getExplanation() {
}
public String getProgramName(){
- return "Muscle";
+ return "MUSCLE";
}
-
+ /*.................................................................................................................*/
+ public String getHelpURL(){
+ return "http://www.drive5.com/muscle/manual/";
+ }
+
/*.................................................................................................................*/
public String getHelpString() {
String s = " In the Muscle Options field, place any Muscle options you wish to use. For example, if you wished to change the"
diff --git a/Source/mesquite/align/lib/AlignUtil.java b/Source/mesquite/align/lib/AlignUtil.java
index 1ef62db39..0eff6f03a 100644
--- a/Source/mesquite/align/lib/AlignUtil.java
+++ b/Source/mesquite/align/lib/AlignUtil.java
@@ -590,7 +590,7 @@ public static boolean integrateAlignment(long[][] alignedMatrix, MolecularData d
data.setSelected(i, true);
}
- MesquiteTrunk.mesquiteTrunk.logln("Alignment completed.");
+ MesquiteTrunk.mesquiteTrunk.logln("Alignment completed for " + data.getName());
data.removeCharactersThatAreEntirelyGaps(icStart, icEnd, true); // added 1 June 2016
return true;
diff --git a/Source/mesquite/align/lib/ExternalSequenceAligner.java b/Source/mesquite/align/lib/ExternalSequenceAligner.java
index 05be6ce47..9c416b78f 100644
--- a/Source/mesquite/align/lib/ExternalSequenceAligner.java
+++ b/Source/mesquite/align/lib/ExternalSequenceAligner.java
@@ -450,15 +450,15 @@ else if (!(firstTaxon==0 && lastTaxon==matrix.getNumTaxa())) { // we are doing
if (success) {
for (int i=1; i=0 && j+1keys[j+1]; j--) {
- alignedTaxa.swapParts(j, j+1);
+ alignedTaxa.swapParts(j, j+1, false);
int kj = keys[j];
keys[j] = keys[j+1];
keys[j+1] = kj;
//alignedData.swapTaxa(j, j+1);
}
}
+ alignedTaxa.notifyListeners(this, new Notification(MesquiteListener.PARTS_MOVED));
alignedData.changed(this, alignedTaxa, new Notification(MesquiteListener.PARTS_MOVED));
-
if (alignedData instanceof MolecularData){
aligned = new long[alignedData.getNumChars()][originalTaxa.getNumTaxa()];
for (int ic = 0; ic1){
+ if (observedStates != null && getProject() != null && getProject().getNumberCharMatricesVisible()>1){
CharacterData d = observedStates.getParentData();
if (d != null && d.getName()!= null) {
String n = d.getName();
diff --git a/Source/mesquite/categ/lib/CategoricalData.java b/Source/mesquite/categ/lib/CategoricalData.java
index efca112b0..64b89ec04 100644
--- a/Source/mesquite/categ/lib/CategoricalData.java
+++ b/Source/mesquite/categ/lib/CategoricalData.java
@@ -545,12 +545,12 @@ public boolean swapAssociated(int first, int second){
if (second<0 || second >= numChars)
return false;
- return super.swapParts(first,second);
+ return super.swapParts(first,second, true);
}
/*.......................................... CategoricalData ..................................................*/
/**swaps characters first and second*/
- public boolean swapParts(int first, int second){
+ public boolean swapParts(int first, int second, boolean notify){
if (first<0 || first >= numChars)
return false;
if (second<0 || second >= numChars)
@@ -564,7 +564,7 @@ public boolean swapParts(int first, int second){
StringArray.swapColumns(stateNotes, first, second);
Object2DArray.swapColumns(stateAnnotations, first, second);
- return super.swapParts(first,second);
+ return super.swapParts(first,second, notify);
}
/*.......................................... CategoricalData ..................................................*/
diff --git a/Source/mesquite/categ/lib/MProteinEmbedded.java b/Source/mesquite/categ/lib/MProteinEmbedded.java
index 4d276d90e..d3ebb5048 100644
--- a/Source/mesquite/categ/lib/MProteinEmbedded.java
+++ b/Source/mesquite/categ/lib/MProteinEmbedded.java
@@ -70,5 +70,22 @@ public long getAllStates() { //
}
return s;
}
+ /*..........................................................*/
+ /** This readjust procedure can be called to readjust the size of storage of
+ states of a character for nodes. */
+ public MCharactersHistory adjustHistorySize(Tree tree, MCharactersHistory charStates) {
+ int numNodes = tree.getNumNodeSpaces();
+ MCharactersHistory soc =charStates;
+ if (charStates==null || ! (charStates.getClass() == MProteinHistory.class))
+ soc = new MProteinHistory(tree.getTaxa(), getNumChars(), numNodes);
+ else if (numNodes!= charStates.getNumNodes() || charStates.getNumChars()!= getNumChars())
+ soc = new MProteinHistory(tree.getTaxa(), getNumChars(), numNodes);
+ else {
+ soc =charStates;
+ }
+ soc.setParentData(getParentData());
+ return soc;
+ }
+
}
diff --git a/Source/mesquite/categ/lib/MolecularData.java b/Source/mesquite/categ/lib/MolecularData.java
index 6db2f6072..56815d62e 100644
--- a/Source/mesquite/categ/lib/MolecularData.java
+++ b/Source/mesquite/categ/lib/MolecularData.java
@@ -231,12 +231,12 @@ public boolean moveParts(int starting, int num, int justAfter){
}
/*-----------------------------------------------------------*/
/**Swaps characters first and second.*/
- public boolean swapParts(int first, int second){
+ public boolean swapParts(int first, int second, boolean notify){
//swapping characters; deal with inversions
if (inversions != null){
MesquiteMessage.warnProgrammer("Swapping characters and strand inversions not yet fully supported");
}
- return super.swapParts(first, second);
+ return super.swapParts(first, second, notify);
}
/*.................................................................................................................*/
protected CharacterState moveOne(int i, int distance, int it, CharacterState cs, MesquiteBoolean dataChanged){
diff --git a/Source/mesquite/categ/lib/ProteinCharacterHistory.java b/Source/mesquite/categ/lib/ProteinCharacterHistory.java
index 657c0954d..904a955f9 100644
--- a/Source/mesquite/categ/lib/ProteinCharacterHistory.java
+++ b/Source/mesquite/categ/lib/ProteinCharacterHistory.java
@@ -135,7 +135,7 @@ public String toString (int node, String lineEnding) {
return s;
}
else
- return ProteinState.toString(getState(node), null, 0, false);
+ return ProteinState.toString(getState(node), null, 0, false, true);
}
/*.......................................... ProteinCharacterHistory ...................................................*/
/**returns string describing states at nodes. */
diff --git a/Source/mesquite/categ/lib/ProteinState.java b/Source/mesquite/categ/lib/ProteinState.java
index b2b54cc0d..78ea57a3e 100644
--- a/Source/mesquite/categ/lib/ProteinState.java
+++ b/Source/mesquite/categ/lib/ProteinState.java
@@ -125,7 +125,7 @@ public static String toString(long s, CategoricalData data, int ic, boolean useB
return toString(s, data, ic, useBraces, false);
}
/*..........................................ProteinState.....................................*/
- /** converts passed long (treated as ProteinState) to string. Uses character state names if available.*/
+ /** converts passed long (treated as ProteinState) to string.*/
public static String toString(long s, CategoricalData data, int ic, boolean useBraces, boolean useSymbols) {
if (s == impossible)
return "impossible";
@@ -152,7 +152,10 @@ else if (s == inapplicable){
if (isElement(s, e)) {
if (!first)
temp+=" ";
- temp+=ProteinData.symbolsAsStrings[e];
+ if (useSymbols)
+ temp+=ProteinData.symbolsAsStrings[e];
+ else
+ temp+=ProteinData.longNamesAsStrings[e]; //added Feb 2019
first=false;
}
}
@@ -161,7 +164,8 @@ else if (s == inapplicable){
if (useBraces)
temp+="}";
return temp;
- }
+ }
+
/*..........................................ProteinState.....................................*/
/**return the state set containing the state represented by the character (e.g., '0' to {0}) �*/
public long fromChar(char c) {
diff --git a/Source/mesquite/charMatrices/BasicDataWindowMaker/BasicDataWindowMaker.java b/Source/mesquite/charMatrices/BasicDataWindowMaker/BasicDataWindowMaker.java
index a66f5941a..059baf346 100644
--- a/Source/mesquite/charMatrices/BasicDataWindowMaker/BasicDataWindowMaker.java
+++ b/Source/mesquite/charMatrices/BasicDataWindowMaker/BasicDataWindowMaker.java
@@ -302,6 +302,7 @@ class BasicDataWindow extends TableWindow implements MesquiteListener {
MesquiteBoolean useDiagonal = new MesquiteBoolean(false);
MesquiteBoolean allowAutosize;
boolean oldShowStates;
+ boolean oldReduceCellBorders;
boolean oldSuppress;
int oldColumnsWidths;
MesquiteMenuItemSpec linkedScrollingItem = null;
@@ -377,6 +378,7 @@ public BasicDataWindow(BasicDataWindowMaker ownerModule, CharacterData data) {
}
oldShowStates = table.showStates.getValue();
+ oldReduceCellBorders = table.reduceCellBorders.getValue();
oldColumnsWidths = table.getColumnWidthsUniform();
oldSuppress = table.suppressAutosize;
interleaved = new MesquiteBoolean(data.interleaved);
@@ -463,6 +465,8 @@ public BasicDataWindow(BasicDataWindowMaker ownerModule, CharacterData data) {
ownerModule.addCheckMenuItemToSubmenu(ownerModule.displayMenu, softnessSubmenu, "Lighten Missing", MesquiteModule.makeCommand("togglePaleMissing", this), table.paleMissing);
ownerModule.addCheckMenuItemToSubmenu(ownerModule.displayMenu, softnessSubmenu, "Lighten Excluded Characters", MesquiteModule.makeCommand("toggleShowPaleExcluded", this), showPaleExcluded);
+ ownerModule.addCheckMenuItem(ownerModule.displayMenu,"Reduce Cell Borders", MesquiteModule.makeCommand("toggleReduceCellBorders", this), table.reduceCellBorders);
+
//CHANGES
ownerModule.addCheckMenuItem(ownerModule.displayMenu, "Show Changes Since Saved", MesquiteModule.makeCommand("toggleShowChanges", this), table.showChanges);
if (data instanceof CategoricalData && !(data instanceof DNAData) && !(data instanceof ProteinData))
@@ -912,6 +916,7 @@ public Snapshot getSnapshot(MesquiteFile file) {
temp.addLine("toggleShowChanges " + table.showChanges.toOffOnString());
temp.addLine("toggleSeparateLines " + table.statesSeparateLines.toOffOnString());
temp.addLine("toggleShowStates " + table.showStates.toOffOnString());
+ temp.addLine("toggleReduceCellBorders " + table.reduceCellBorders.toOffOnString());
temp.addLine("toggleAutoWCharNames " + table.autoWithCharNames.toOffOnString());
temp.addLine("toggleAutoTaxonNames " + table.autoRowNameWidth.toOffOnString());
temp.addLine("toggleShowDefaultCharNames " + table.showDefaultCharNames.toOffOnString());
@@ -1990,6 +1995,11 @@ else if (checker.compare(this.getClass(), "Sets whether or not states are to be
table.doAutosize = true;
table.repaintAll();
}
+ else if (checker.compare(this.getClass(), "Sets whether or not cell borders should be reduced", "[on or off]", commandName, "toggleReduceCellBorders")) {
+ table.reduceCellBorders.toggleValue(ParseUtil.getFirstToken(arguments, pos));
+ table.doAutosize = true;
+ table.repaintAll();
+ }
else if (checker.compare(this.getClass(), "Sets whether or not default character names are shown", "[on or off]", commandName, "toggleShowDefaultCharNames")) {
table.showDefaultCharNames.toggleValue(ParseUtil.getFirstToken(arguments, pos));
table.doAutosize = true;
@@ -2944,6 +2954,8 @@ class MatrixTable extends mesquite.lib.table.CMTable implements MesquiteDroppedF
MesquiteBoolean showStates;
+ MesquiteBoolean reduceCellBorders;
+
MesquiteBoolean showDefaultCharNames;
MesquiteBoolean autoWithCharNames;
@@ -3023,6 +3035,7 @@ public MatrixTable(BasicDataWindowMaker editorModule, BasicDataWindow window, Ch
this.data = data;
cellAnnotated = new CellAnnotation(data);
showStates = new MesquiteBoolean(true);
+ reduceCellBorders = new MesquiteBoolean(false);
showDefaultCharNames = new MesquiteBoolean(false);
autoWithCharNames = new MesquiteBoolean(!(data instanceof MolecularData));
showBirdsEyeView = new MesquiteBoolean(false);
@@ -3795,7 +3808,7 @@ public void drawMatrixCell(Graphics g, int x, int y, int w, int h, int column, i
if (data == null)
return;
boolean writeStates = !showBirdsEyeView.getValue() && showStates.getValue();
- boolean leaveEdges = writeStates && !tight.getValue();
+ boolean leaveEdges = !reduceCellBorders.getValue() && writeStates && !tight.getValue();
drawMatrixCell(g, x, y, w, h, column, row, selected, writeStates, leaveEdges);
}
diff --git a/Source/mesquite/charMatrices/CompileProcessedMatrices/CompileProcessedMatrices.java b/Source/mesquite/charMatrices/CompileProcessedMatrices/CompileProcessedMatrices.java
index 41bdbe076..0c7439d9d 100644
--- a/Source/mesquite/charMatrices/CompileProcessedMatrices/CompileProcessedMatrices.java
+++ b/Source/mesquite/charMatrices/CompileProcessedMatrices/CompileProcessedMatrices.java
@@ -17,6 +17,7 @@
import java.awt.FileDialog;
import java.util.Vector;
+import mesquite.categ.lib.ProteinData;
import mesquite.lib.*;
import mesquite.lib.characters.CharacterData;
import mesquite.lib.duties.*;
@@ -77,7 +78,10 @@ void checkTaxonList(CharacterData data, String saveFile){
void writeMatrixToFile(String file, CharacterData data, String matrixName){
MesquiteFile.appendFileContents(file, "BEGIN CHARACTERS;" + StringUtil.lineEnding() + "\tTITLE " + ParseUtil.tokenize(matrixName) + ";" + StringUtil.lineEnding() , true);
MesquiteFile.appendFileContents(file, "\tDIMENSIONS NCHAR= " + data.getNumChars() + " ;" + StringUtil.lineEnding() , true);
- MesquiteFile.appendFileContents(file, "\tFORMAT DATATYPE = DNA GAP = - MISSING = ?;" + StringUtil.lineEnding() + "\tMATRIX" + StringUtil.lineEnding() , true);
+ if (data instanceof ProteinData)
+ MesquiteFile.appendFileContents(file, "\tFORMAT DATATYPE = PROTEIN GAP = - MISSING = ?;" + StringUtil.lineEnding() + "\tMATRIX" + StringUtil.lineEnding() , true);
+ else
+ MesquiteFile.appendFileContents(file, "\tFORMAT DATATYPE = DNA GAP = - MISSING = ?;" + StringUtil.lineEnding() + "\tMATRIX" + StringUtil.lineEnding() , true);
for (int it = 0; it < data.getNumTaxa(); it++){
MesquiteFile.appendFileContents(file, "\t" + ParseUtil.tokenize(data.getTaxa().getTaxonName(it)) + "\t" , true);
StringBuffer description = new StringBuffer();
@@ -95,7 +99,7 @@ public boolean processFile(MesquiteFile file){
if (saveFile == null || okToInteractWithUser(CAN_PROCEED_ANYWAY, "Asking for file to save")){ //need to check if can proceed
- MesquiteFileDialog fdlg= new MesquiteFileDialog(containerOfModule(), "Output File for Matrices(s)", FileDialog.SAVE);
+ MesquiteFileDialog fdlg= new MesquiteFileDialog(containerOfModule(), "Output File for Compiled Matrices(s)", FileDialog.SAVE);
fdlg.setBackground(ColorTheme.getInterfaceBackground());
fdlg.setVisible(true);
String fileName=fdlg.getFile();
diff --git a/Source/mesquite/charMatrices/CondensedPatternMatrix/CondensedPatternMatrix.java b/Source/mesquite/charMatrices/CondensedPatternMatrix/CondensedPatternMatrix.java
index 77778f09f..c6480020d 100644
--- a/Source/mesquite/charMatrices/CondensedPatternMatrix/CondensedPatternMatrix.java
+++ b/Source/mesquite/charMatrices/CondensedPatternMatrix/CondensedPatternMatrix.java
@@ -125,8 +125,8 @@ private MCharactersDistribution condense(MCharactersDistribution mData){
}
}
if (bestCharacter>=0 && ic0) {
+ result.setValue(count);
+ } else
+ result.setValue(0.0);
+
+ if (resultString!=null) {
+ resultString.setValue("Number of selected taxa with data: " + result.toString());
+ }
+ saveLastResult(result);
+ saveLastResultString(resultString);
+ }
+ boolean hasData(MCharactersDistribution data, int it){
+ CharacterState cs = null;
+ try {
+ for (int ic=0; ic=0 && compare(gT, data.getCharacterName(j), data.getCharacterName(j+1)); j--) {
- data.swapParts(j, j+1);
+ data.swapParts(j, j+1, false);
data.swapInLinked(j, j+1, false);
}
}
diff --git a/Source/mesquite/charMatrices/SortTaxa/SortTaxa.java b/Source/mesquite/charMatrices/SortTaxa/SortTaxa.java
index 69ab1984a..4fef4a9a8 100644
--- a/Source/mesquite/charMatrices/SortTaxa/SortTaxa.java
+++ b/Source/mesquite/charMatrices/SortTaxa/SortTaxa.java
@@ -90,7 +90,7 @@ void swapParts(Taxa taxa, int first, int second, String[] text){
String temp = text[first];
text[first] = text[second];
text[second] = temp;
- taxa.swapParts(first, second);
+ taxa.swapParts(first, second, true);
}
MesquiteInteger pos = new MesquiteInteger();
diff --git a/Source/mesquite/cont/lib/ContinuousData.java b/Source/mesquite/cont/lib/ContinuousData.java
index eb5703576..9290eba46 100644
--- a/Source/mesquite/cont/lib/ContinuousData.java
+++ b/Source/mesquite/cont/lib/ContinuousData.java
@@ -425,7 +425,7 @@ else if (starting>numChars)
}
/*..........................................ContinuousData................*/
/**swaps characters first and second.*/
- public boolean swapParts(int first, int second){
+ public boolean swapParts(int first, int second, boolean notify){
if (first<0 || first >= numChars)
return false;
if (second<0 || second >= numChars)
@@ -434,7 +434,7 @@ public boolean swapParts(int first, int second){
Double2DArray oldMatrix = ((Double2DArray)matrices.elementAt(item));
Double2DArray.swapColumns(oldMatrix.getMatrix(), first, second);
}
- return super.swapParts(first, second);
+ return super.swapParts(first, second, notify);
}
/*..........................................ContinuousData................*/
/**moves num characters from position "first" to just after position "justAfter"; returns true iff successful.*/
diff --git a/Source/mesquite/distance/ExportTaxaDistancesByGroup/ExportTaxaDistancesByGroup.java b/Source/mesquite/distance/ExportTaxaDistancesByGroup/ExportTaxaDistancesByGroup.java
new file mode 100644
index 000000000..876a9d22d
--- /dev/null
+++ b/Source/mesquite/distance/ExportTaxaDistancesByGroup/ExportTaxaDistancesByGroup.java
@@ -0,0 +1,243 @@
+/* Mesquite source code. Copyright 1997 and onward, W. Maddison and D. Maddison.
+
+
+Disclaimer: The Mesquite source code is lengthy and we are few. There are no doubt inefficiencies and goofs in this code.
+The commenting leaves much to be desired. Please approach this source code with the spirit of helping out.
+Perhaps with your help we can be more than a few, and make Mesquite better.
+
+Mesquite is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY.
+Mesquite's web site is http://mesquiteproject.org
+
+This source code and its compiled class files are free and modifiable under the terms of
+GNU Lesser General Public License. (http://www.gnu.org/copyleft/lesser.html)
+ */
+package mesquite.distance.ExportTaxaDistancesByGroup;
+
+
+import java.util.*;
+import java.awt.*;
+
+import mesquite.lib.*;
+import mesquite.lib.duties.*;
+import mesquite.distance.lib.*;
+
+
+
+public class ExportTaxaDistancesByGroup extends FileInterpreterI {
+ TaxaDistanceSource distanceTask;
+ Taxa currentTaxa = null;
+ boolean suspend = false;
+
+ /*.................................................................................................................*/
+ public boolean startJob(String arguments, Object condition, boolean hiredByName) {
+ return true; //make this depend on taxa reader being found?)
+ }
+
+ public boolean isPrerelease(){
+ return true;
+ }
+ public boolean loadModule(){
+ return false;
+ }
+ public boolean isSubstantive(){
+ return true;
+ }
+ /*.................................................................................................................*/
+ public String preferredDataFileExtension() {
+ return "txt";
+ }
+ /*.................................................................................................................*/
+ public boolean canExportEver() {
+ return true; //
+ }
+ /*.................................................................................................................*/
+ public boolean canExportProject(MesquiteProject project) {
+ return true;
+ }
+
+ /*.................................................................................................................*/
+ public boolean canExportData(Class dataClass) {
+ return false;
+ }
+ /*.................................................................................................................*/
+ public boolean canImport() {
+ return false;
+ }
+
+ /*.................................................................................................................*/
+ public void readFile(MesquiteProject mf, MesquiteFile file, String arguments) {
+ }
+ /*.................................................................................................................*/
+ /** returns the version number at which this module was first released. If 0, then no version number is claimed. If a POSITIVE integer
+ * then the number refers to the Mesquite version. This should be used only by modules part of the core release of Mesquite.
+ * If a NEGATIVE integer, then the number refers to the local version of the package, e.g. a third party package*/
+ public int getVersionOfFirstRelease(){
+ return NEXTRELEASE;
+ }
+
+
+ /* ============================ exporting ============================*/
+ /*.................................................................................................................*/
+ String fileName = "distances.txt";
+ String addendum = "";
+ /*
+ public boolean getExportOptions(Taxa taxa){
+ MesquiteInteger buttonPressed = new MesquiteInteger(1);
+ ExporterDialog exportDialog = new ExporterDialog(this,containerOfModule(), "Export distance matrix", buttonPressed);
+ exportDialog.setSuppressLineEndQuery(true);
+ exportDialog.setDefaultButton(null);
+ exportDialog.addLargeOrSmallTextLabel("Distances are to be exported from:\n\n" + distanceTask.getNameAndParameters());
+/ * Checkbox itCheckBox = exportDialog.addCheckBox("Include Taxa Block", includeTaxaBlock);
+ exportDialog.addLabel("Addendum: ");
+
+ addendum = "";
+
+ TextArea fsText =exportDialog.addTextAreaSmallFont(addendum,16);
+ * /
+ exportDialog.completeAndShowDialog();
+
+ boolean ok = (exportDialog.query()==0);
+
+
+ exportDialog.dispose();
+ return ok;
+ }
+ /*.................................................................................................................*/
+ /** Called to provoke any necessary initialization. This helps prevent the module's initialization queries to the user from
+ happening at inopportune times (e.g., while a long chart calculation is in mid-progress)*/
+ public void initialize(Taxa taxa){
+ setPreferredTaxa(taxa);
+ distanceTask = (TaxaDistanceSource)hireEmployee(TaxaDistanceSource.class, "Source of Distances among Taxa");
+ if (distanceTask == null)
+ return;
+ }
+ public void endJob(){
+ if (currentTaxa!=null)
+ currentTaxa.removeListener(this);
+ storePreferences();
+ super.endJob();
+ }
+ /*.................................................................................................................*/
+ /** passes which object changed*/
+ public void disposing(Object obj){
+ if (obj == currentTaxa) {
+ currentTaxa = null;
+ }
+ }
+
+ /*.................................................................................................................*/
+
+ public void setPreferredTaxa(Taxa taxa){
+ if (taxa !=currentTaxa) {
+ if (currentTaxa!=null)
+ currentTaxa.removeListener(this);
+ currentTaxa = taxa;
+ currentTaxa.addListener(this);
+ }
+
+ }
+
+ /*.................................................................................................................*/
+ public boolean exportFile(MesquiteFile file, String arguments) { //if file is null, consider whole project open to export
+ Arguments args = new Arguments(new Parser(arguments), true);
+
+ Taxa taxa = getProject().chooseTaxa(getModuleWindow(), "Choose taxa block");
+ if (taxa==null)
+ return false;
+
+ if (distanceTask==null || taxa!=currentTaxa) {
+ initialize(taxa);
+ if (distanceTask==null)
+ return false;
+ distanceTask.initialize(currentTaxa);
+ }
+
+
+ MesquiteString dir = new MesquiteString();
+ MesquiteString fn = new MesquiteString();
+ String suggested = fileName;
+ if (file !=null) {
+ suggested = file.getFileName();
+ if (StringUtil.getLastItem(suggested, ".").equalsIgnoreCase("nex")) {
+ suggested = StringUtil.getAllButLastItem(suggested, ".") +".distances.txt";
+ }
+ else if (StringUtil.getLastItem(suggested, ".").equalsIgnoreCase("nxs")) {
+ suggested = StringUtil.getAllButLastItem(suggested, ".") +".distances.txt";
+ }else
+ suggested = suggested +".distances.txt";
+ }
+
+ MesquiteFile f;
+ /*if (!usePrevious){
+ if (!getExportOptions(null)) {
+ distanceTask=null;
+ return false;
+ }
+ }
+ */
+ if (!distanceTask.getDistanceOptions()) {
+ fireEmployee(distanceTask);
+ distanceTask=null;
+ return false;
+ }
+ TaxaDistance distances = distanceTask.getTaxaDistance(taxa);
+ if (distances == null){
+ return false;
+ }
+ TaxaPartition partitions = (TaxaPartition)taxa.getCurrentSpecsSet(TaxaPartition.class);
+
+ String path = getPathForExport(arguments, suggested, dir, fn);
+ if (path != null) {
+ f = MesquiteFile.newFile(dir.getValue(), fn.getValue());
+ if (f !=null){
+ f.openWriting(true);
+ StringBuffer line = new StringBuffer(1000);
+ for (int it = 0; it"};
+
+ //TODO: note that the sample code in the names file CANNOT contain "/"
public boolean startJob(String arguments, Object condition, boolean hiredByName) {
loadPreferences();
@@ -273,6 +275,8 @@ public String getSeqNamesFromTabDelimitedFile(MesquiteString sampleCode, String
MesquiteMessage.warnUser("Taxon \"" + taxonName + "\" has no target string to match.");
return null;
}
+ if (sampleCodeString.contains("/")) // if there is more than one item, then take only the first one.
+ sampleCodeString = StringUtil.getFirstItem(sampleCodeString, "/");
for (int row = 0; row= 0) {
if (!MesquiteThread.isScripting()){
@@ -299,7 +303,8 @@ else if (replaceDataOfTaxonWithSameNameInt==REPLACEIFEMPTYOTHERWISEIGNORE) {
recordAsNewlyAddedTaxon(taxa,taxonNumber);
checkMaximumTaxonFilled(taxonNumber); // record this taxonNumber to see if it is the biggest yet.
- t.setName(token);
+ if (!replace) // we only set the name if we are not replacing the data of an already existing taxon
+ t.setName(token);
if (progIndicator!=null) {
progIndicator.setText("Reading taxon " + taxonNumber+": "+token);
CommandRecord.tick("Reading taxon " + taxonNumber+": "+token);
@@ -514,6 +519,9 @@ protected String getSupplementForTaxon(Taxa taxa, int it){
return "";
}
protected String getTaxonName(Taxa taxa, int it){
+ return getTaxonName(taxa, it, null);
+ }
+ protected String getTaxonName(Taxa taxa, int it, CharacterData data){
if (simplifyTaxonName)
return StringUtil.cleanseStringOfFancyChars(taxa.getTaxonName(it)+uniqueSuffix,false,true);
else
@@ -561,7 +569,7 @@ public StringBuffer getDataAsFileText(MesquiteFile file, CharacterData data) {
counter = 1;
outputBuffer.append(">");
- outputBuffer.append(getTaxonName(taxa,it));
+ outputBuffer.append(getTaxonName(taxa,it, data));
String sup = getSupplementForTaxon(taxa, it);
if (StringUtil.notEmpty(sup))
outputBuffer.append(sup);
diff --git a/Source/mesquite/io/lib/InterpretHennig86Base.java b/Source/mesquite/io/lib/InterpretHennig86Base.java
index 56d5bab97..5d2879e96 100644
--- a/Source/mesquite/io/lib/InterpretHennig86Base.java
+++ b/Source/mesquite/io/lib/InterpretHennig86Base.java
@@ -463,6 +463,7 @@ public StringBuffer getDataAsFileText(MesquiteFile file, CharacterData data) {
writeTaxaWithAllMissing = file.writeTaxaWithAllMissing;
writeExcludedCharacters = file.writeExcludedCharacters;
fractionApplicable = file.fractionApplicable;
+ writeCharLabels = file.writeCharLabels;
}
@@ -473,7 +474,7 @@ public StringBuffer getDataAsFileText(MesquiteFile file, CharacterData data) {
dread.appendCommandToStringBuffer(outputBuffer, taxa, data, progIndicator);
else
xread.appendCommandToStringBuffer(outputBuffer, taxa, data, progIndicator);
- if (catData==null || (catData.hasStateNames()|| data.characterNamesExist()))
+ if (writeCharLabels && (catData==null || (catData.hasStateNames()|| data.characterNamesExist())))
availableCommands[cnamesElement].appendCommandToStringBuffer(outputBuffer, taxa, data, progIndicator);
availableCommands[2].appendCommandToStringBuffer(outputBuffer, taxa, data, progIndicator); //ccode
diff --git a/Source/mesquite/lib/Associable.java b/Source/mesquite/lib/Associable.java
index 834c814f7..d70d790a3 100644
--- a/Source/mesquite/lib/Associable.java
+++ b/Source/mesquite/lib/Associable.java
@@ -1022,8 +1022,19 @@ public void restoreToPreviousOrder(){
}
}
}
- /*-----------------------------------------*/
+
+
+ MesquiteTimer t3 = new MesquiteTimer();
+ MesquiteTimer t4 = new MesquiteTimer();
+ MesquiteTimer t5 = new MesquiteTimer();
+ MesquiteTimer t6 = new MesquiteTimer();
+
+ /*-----------------------------------------*
public boolean swapParts(int first, int second){
+ return swapParts(first, second, true);
+ }
+ */
+ public boolean swapParts(int first, int second, boolean notify){
if (first>numParts || first<0)
return false;
if (second>numParts || second<0)
diff --git a/Source/mesquite/lib/AssociableWithSpecs.java b/Source/mesquite/lib/AssociableWithSpecs.java
index 1744fc415..54d114fbb 100644
--- a/Source/mesquite/lib/AssociableWithSpecs.java
+++ b/Source/mesquite/lib/AssociableWithSpecs.java
@@ -176,19 +176,19 @@ public boolean moveParts(int starting, int num, int justAfter){
}
return true;
}
- public boolean swapParts(int first, int second){
- if (!super.swapParts(first, second))
+ public boolean swapParts(int first, int second, boolean notify){
+ if (!super.swapParts(first, second, notify))
return false;
if (specsVectors!=null){ //update size of specification sets
for (int i=0; i=size() || second<0 || second>=size())
return false;
mesquite.lib.duties.ElementManager m = null;
@@ -385,9 +390,9 @@ public boolean swapParts(int first, int second) {
Object objSecond = vec.elementAt(second);
vec.setElementAt(objSecond, first);
vec.setElementAt(objFirst, second);
- if (m != null)
+ if (notify && m != null)
m.elementsReordered(this);
- return super.swapParts(first, second);
+ return super.swapParts(first, second, notify);
}
/*...........................................................*/
diff --git a/Source/mesquite/lib/MesquiteDialog.java b/Source/mesquite/lib/MesquiteDialog.java
index b6980b62d..ebd1309d6 100644
--- a/Source/mesquite/lib/MesquiteDialog.java
+++ b/Source/mesquite/lib/MesquiteDialog.java
@@ -75,12 +75,15 @@ else if (parent instanceof MesquiteWindow){
MesquiteWindow mw = ((MesquiteWindow)parent);
if (!mw.isVisible() && mw.getOwnerModule() != null)
mw = mw.getOwnerModule().visibleContainerOfModule();
- if (mw == null)
+ if (mw == null) {
f = MesquiteWindow.dialogAnchor;
+ }
else
f = mw.getParentFrame();
}
}
+ if (f == MesquiteWindow.dialogAnchor && (MesquiteTrunk.debugMode))
+ MesquiteMessage.printStackTrace("@@@@@@@@@@@DIALOG ANCHOR USED FOR " + title); //Debugg.println
parentDialog = new MesquiteDialogParent(f, title, !usingWizard);
//parentDialog = new MesquiteDialogParent(MesquiteWindow.dialogAnchor, title, !usingWizard);
diff --git a/Source/mesquite/lib/MesquiteFileUtil.java b/Source/mesquite/lib/MesquiteFileUtil.java
index 061c75961..613049103 100644
--- a/Source/mesquite/lib/MesquiteFileUtil.java
+++ b/Source/mesquite/lib/MesquiteFileUtil.java
@@ -38,6 +38,15 @@ public static String createDirectoryForFiles(MesquiteModule module, boolean askF
public static final int BESIDE_HOME_FILE = 1;
public static final int ASK_FOR_LOCATION = 2;
/*.................................................................................................................*/
+ public static String pathForFiles(String enclosingDirectoryPath, String name, String suffix, boolean createUniqueDatedName) {
+ String path = enclosingDirectoryPath + StringUtil.cleanseStringOfFancyChars(name, false, true);
+ if (createUniqueDatedName) {
+ path+= "-" + StringUtil.getDateDayOnly() + suffix;
+ path = MesquiteFile.getUniqueNumberedPath(path);
+ }
+ return path;
+ }
+ /*.................................................................................................................*/
public static String createDirectoryForFiles(MesquiteModule module, int location, String name, String suffix, boolean createUniqueDatedName) {
MesquiteBoolean directoryCreated = new MesquiteBoolean(false);
String rootDir = null;
@@ -45,11 +54,7 @@ public static String createDirectoryForFiles(MesquiteModule module, int location
rootDir = module.createEmptySupportDirectory(directoryCreated) + MesquiteFile.fileSeparator; //replace this with current directory of file
else if (location == BESIDE_HOME_FILE) {
String dir = module.getProject().getHomeFile().getDirectoryName();
- String path = dir + StringUtil.cleanseStringOfFancyChars(name, false, true);
- if (createUniqueDatedName) {
- path+= "-" + StringUtil.getDateDayOnly() + suffix;
- path = MesquiteFile.getUniqueNumberedPath(path);
- }
+ String path = pathForFiles(dir, name, suffix, createUniqueDatedName);
File f = new File(path);
boolean b = f.mkdir();
directoryCreated.setValue(b);
@@ -57,12 +62,19 @@ else if (location == BESIDE_HOME_FILE) {
rootDir = path + MesquiteFile.fileSeparator;
}
if (!directoryCreated.getValue()) {
- rootDir = MesquiteFile.chooseDirectory("Choose folder for storing "+name+" files");
- if (rootDir==null) {
+ String path = MesquiteFile.chooseDirectory("Choose folder for storing "+name+" files");
+ if (path==null) {
MesquiteMessage.discreetNotifyUser("Sorry, directory for storing "+name+" files could not be created.");
return null;
- } else
- rootDir += MesquiteFile.fileSeparator;
+ } else {
+ path += MesquiteFile.fileSeparator;
+ path = pathForFiles(path, name, suffix, createUniqueDatedName);
+ File f = new File(path);
+ boolean b = f.mkdir();
+ directoryCreated.setValue(b);
+ if (b)
+ rootDir = path + MesquiteFile.fileSeparator;
+ }
}
return rootDir;
}
diff --git a/Source/mesquite/lib/MesquiteFrame.java b/Source/mesquite/lib/MesquiteFrame.java
index 2496cd299..7d18a623a 100644
--- a/Source/mesquite/lib/MesquiteFrame.java
+++ b/Source/mesquite/lib/MesquiteFrame.java
@@ -356,6 +356,9 @@ else if (project.hasName())
setTitle(project.getHomeFileName());
+ }
+ public MesquiteWindow getFrontWindow(){
+ return frontWindow;
}
public void fixFrontness(){
MesquiteWindow w = frontMostInLocation(MesquiteFrame.POPTILE);
diff --git a/Source/mesquite/lib/MesquiteModule.java b/Source/mesquite/lib/MesquiteModule.java
index bebb30155..54a9b997c 100644
--- a/Source/mesquite/lib/MesquiteModule.java
+++ b/Source/mesquite/lib/MesquiteModule.java
@@ -67,12 +67,12 @@ public abstract class MesquiteModule extends EmployerEmployee implements Command
/*.................................................................................................................*/
/** returns build date of the Mesquite system (e.g., "22 September 2003") */
public final static String getBuildDate() {
- return "27 December 2018";
+ return "26 December 2019";
}
/*.................................................................................................................*/
/** returns version of the Mesquite system */
public final static String getMesquiteVersion() {
- return "3.6";
+ return "3.61";
}
/*.................................................................................................................*/
/** returns letter in the build number of the Mesquite system (e.g., "e" of "e58") */
@@ -85,7 +85,7 @@ public final static String getBuildLetter() {
public final static int getBuildNumber() {
//as of 26 Dec 08, build naming changed from letter + number to just number. Accordingly j105 became 473, based on
// highest build numbers of d51+e81+g97+h66+i69+j105 + 3 for a, b, c
- return 917;
+ return 927;
}
//0.95.80 14 Mar 01 - first beta release
//0.96 2 April 01 beta - second beta release
@@ -137,6 +137,7 @@ public final static int getBuildNumber() {
//3.50 = 888 released 4 May 2O18
//3.51 = 898 released 28 June 2O18
//3.6 = 917 released 27 Dec 2O18
+ //3.61 = 927 released 26 Dec 2O19
/*.................................................................................................................*/
/** returns a string if this is a special version of Mesquite */
public final static String getSpecialVersion() {
diff --git a/Source/mesquite/lib/MesquiteProject.java b/Source/mesquite/lib/MesquiteProject.java
index 97c840dd5..2d0eee4a0 100644
--- a/Source/mesquite/lib/MesquiteProject.java
+++ b/Source/mesquite/lib/MesquiteProject.java
@@ -81,15 +81,23 @@ public MesquiteProject(FileCoordinator ownerModule) {
this.ownerModule = ownerModule;
startupTime = System.currentTimeMillis();
datas = new ListableVector();
+ datas.setProject(this);
+ datas.setName("Character Matrices");
taxas = new ListableVector();
+ taxas.setProject(this);
+ taxas.setName("Taxa Blocks");
charModels = new ModelVector();
+ charModels.setProject(this);
datas.addListener(this);
taxas.addListener(this);
charModels.addListener(this);
modelListener = new CentralModelListener();
treeVectors = new ListableVector();
+ treeVectors.setProject(this);
+ treeVectors.setName("Tree Blocks");
otherElements = new ListableVector();
otherElements.setName("other file elements in project");
+ otherElements.setProject(this);
files = new ListableVector();
nexusBlocks = new ListableVector( 1);
idNumber = totalCreated;
@@ -275,29 +283,26 @@ public TreeVector getTreesByID(long id) {
return null;
}
+ /*.................................................................................................................*/
+ /** returns the number of Tree Vectors */
+ public int getNumberTreeVectors(Taxa t) {
+ int count = 0;
+ for (int i = 0; i=properties.length || second<0 || second>=properties.length)
return false;
setDirty(true);
diff --git a/Source/mesquite/lib/Parser.java b/Source/mesquite/lib/Parser.java
index b4ef25a2d..74be37717 100644
--- a/Source/mesquite/lib/Parser.java
+++ b/Source/mesquite/lib/Parser.java
@@ -523,7 +523,7 @@ else if (line.equals(""))
return "";
if (pos.getValue() >= line.length())
return null;
- char c=getNextCharRaw(); //Debugg.println(this had used NEXUS characters, i.e. skipped brackets) OK to have changed?
+ char c=getNextCharRaw();
buffer.setLength(0);
while (!lineEndCharacter(c) && pos.getValue()<=line.length() && c!=(char)0) {
diff --git a/Source/mesquite/lib/StringUtil.java b/Source/mesquite/lib/StringUtil.java
index 80a882ee6..40b3b53d3 100644
--- a/Source/mesquite/lib/StringUtil.java
+++ b/Source/mesquite/lib/StringUtil.java
@@ -188,6 +188,13 @@ public static String getDateTime() {
return getDateTime(dnow);
}
/*.................................................................................................................*/
+ public static String getDateTimeWithSeconds() {
+ long t = System.currentTimeMillis();
+ Date dnow = new Date(t);
+ SimpleDateFormat sdf = new SimpleDateFormat("dd MMMMM yyyy, HH:mm:ss.SSS z");
+ return sdf.format(dnow);
+ }
+ /*.................................................................................................................*/
public static String getOutputFileStamp(MesquiteModule m) {
StringBuffer sb = new StringBuffer();
sb.append("Mesquite version " + m.getMesquiteVersion() + m.getBuildVersion() + "\n");
diff --git a/Source/mesquite/lib/Taxa.java b/Source/mesquite/lib/Taxa.java
index 29812903f..c23c6fdd8 100644
--- a/Source/mesquite/lib/Taxa.java
+++ b/Source/mesquite/lib/Taxa.java
@@ -909,6 +909,11 @@ public boolean deleteParts(int starting, int num) {
return true;
}
+ /*-----------------------------------------------------------*/
+ /**Swaps taxa first and second.*/
+ public boolean swapParts(int first, int second){
+ return swapParts(first, second, true);
+ }
/* ................................................................................................................. */
/** Swaps taxa first and second */
public boolean swapTaxa(int first, int second, boolean notify) {
@@ -919,7 +924,7 @@ public boolean swapTaxa(int first, int second, boolean notify) {
return false;
if (inhibitEdit>0)
return false;
- swapParts(first, second);
+ swapParts(first, second, notify);
notifyOfChangeLowLevel(MesquiteListener.PARTS_SWAPPED, first, second, 0);
inFlux = true;
/*
@@ -951,7 +956,7 @@ public final boolean moveTaxa(int first, int num, int justAfter, boolean notify)
}
/* ........................................................... */
- public boolean swapParts(int first, int second) {
+ public boolean swapParts(int first, int second, boolean notify) {
if (first < 0 || first >= taxon.length || second < 0
|| second >= taxon.length)
return false;
@@ -963,7 +968,7 @@ public boolean swapParts(int first, int second) {
Taxon temp = taxon[first];
taxon[first] = taxon[second];
taxon[second] = temp;
- boolean success = super.swapParts(first, second);
+ boolean success = super.swapParts(first, second, notify);
taxon[first].setIndex(first);
taxon[second].setIndex(second);
inFlux = false;
diff --git a/Source/mesquite/lib/TaxaBitsSet.java b/Source/mesquite/lib/TaxaBitsSet.java
index 393481c6e..c0beabfd1 100644
--- a/Source/mesquite/lib/TaxaBitsSet.java
+++ b/Source/mesquite/lib/TaxaBitsSet.java
@@ -50,9 +50,9 @@ public boolean moveParts(int first, int num, int justAfter){
return super.moveParts(first, num, justAfter);
}
/*.................................................................................................................*/
- public boolean swapParts(int first, int second){
+ public boolean swapParts(int first, int second, boolean notify){
setDirty(true);
- return super.swapParts(first, second);
+ return super.swapParts(first, second, notify);
}
/*.................................................................................................................*/
public String getStringList(String delimiter, TaxonNamer namer, boolean justFirst){
diff --git a/Source/mesquite/lib/TaxaSpecsSet.java b/Source/mesquite/lib/TaxaSpecsSet.java
index d7313913c..57e936851 100644
--- a/Source/mesquite/lib/TaxaSpecsSet.java
+++ b/Source/mesquite/lib/TaxaSpecsSet.java
@@ -30,7 +30,7 @@ public interface TaxaSpecsSet extends Listable {
public boolean moveParts(int first, int num, int justAfter);
/*.................................................................................................................*/
/*.................................................................................................................*/
- public boolean swapParts(int first, int second);
+ public boolean swapParts(int first, int second, boolean notify);
public Taxa getTaxa();
}
diff --git a/Source/mesquite/lib/TaxaStringsSet.java b/Source/mesquite/lib/TaxaStringsSet.java
index 74da0c0ac..7f698c1e6 100644
--- a/Source/mesquite/lib/TaxaStringsSet.java
+++ b/Source/mesquite/lib/TaxaStringsSet.java
@@ -73,9 +73,9 @@ public boolean moveParts(int first, int num, int justAfter){
return super.moveParts(first, num, justAfter);
}
/*.................................................................................................................*/
- public boolean swapParts(int first, int second){
+ public boolean swapParts(int first, int second, boolean notify){
setDirty(true);
- return super.swapParts(first, second);
+ return super.swapParts(first, second, notify);
}
}
diff --git a/Source/mesquite/lib/TaxaTreeDisplay.java b/Source/mesquite/lib/TaxaTreeDisplay.java
index 50c4065cd..78ba8ee1f 100644
--- a/Source/mesquite/lib/TaxaTreeDisplay.java
+++ b/Source/mesquite/lib/TaxaTreeDisplay.java
@@ -181,6 +181,42 @@ public void pleaseUpdate(boolean resetElements) { //TODO: this whole system nee
public void repaint(boolean resetElements){
repaint();
}
+ public String repaintChain = "";
+ public long chainResetTime = -1;
+ public boolean chainEnabled = false;
+ public void enableChain(){
+ chainEnabled = true;
+ }
+ public void resetChain(){
+ if (chainEnabled == false)
+ return;
+ repaintChain = "";
+ chainResetTime = -1;
+ }
+ public void restartChain(String s){
+ if (chainEnabled == false)
+ return;
+ repaintChain = s;
+ chainResetTime = System.currentTimeMillis();
+ }
+ public void addToChain(String s){
+ if (chainEnabled == false)
+ return;
+ if (chainResetTime <0) //hasn't yet started
+ return;
+ repaintChain = repaintChain + "\n" + s;
+ }
+ public void reportChain(String s){
+ if (chainEnabled == false)
+ return;
+ if (chainResetTime <0) //hasn't yet started
+ return;
+ repaintChain = repaintChain + "\n" + s;
+ MesquiteMessage.println("@@@@@@@@\nTime since tree changed in tree window " + ((System.currentTimeMillis()-chainResetTime)/1000.0) + " seconds");
+ MesquiteMessage.println(repaintChain);
+ resetChain();
+ }
+
public void repaint() { //TODO: this whole system needs revamping.
if (!isVisible())
return;
@@ -195,6 +231,8 @@ public void repaint() { //TODO: this whole system needs revamping.
}
repaintsPending++;
if (repaintsPending<=1){
+ if (MesquiteTrunk.debugMode)
+ addToChain("TTD-repaintCalled " + repaintsPending + " " + StringUtil.getDateTimeWithSeconds());
super.repaint();
crossDrawn=false;
}
diff --git a/Source/mesquite/lib/TreeDisplay.java b/Source/mesquite/lib/TreeDisplay.java
index 0f8e4ad87..cd31874b5 100644
--- a/Source/mesquite/lib/TreeDisplay.java
+++ b/Source/mesquite/lib/TreeDisplay.java
@@ -198,8 +198,11 @@ public void setTree(Tree tree) {
if (tree!=null && tree.getTaxa() != taxa)
setTaxa(tree.getTaxa());
- if (inProgress)
+ if (inProgress){
+ if (MesquiteTrunk.debugMode)
+ addToChain("TD-setTree HOLDING " + StringUtil.getDateTimeWithSeconds());
holdingTree = tree;
+ }
else {
this.tree = tree;
if (treeDrawing !=null) {
diff --git a/Source/mesquite/lib/TreeVector.java b/Source/mesquite/lib/TreeVector.java
index ea2853240..583cba97f 100644
--- a/Source/mesquite/lib/TreeVector.java
+++ b/Source/mesquite/lib/TreeVector.java
@@ -89,13 +89,19 @@ public void attachCloneToFile(MesquiteFile f, ElementManager manager){
}
}
- public boolean swapParts(int first, int second) {
+ /*public boolean swapPartsQ(int first, int second) {
- return swapParts(first, second, false); //NOTE DEFAULT IS FALSE. The reason is to avoid time cost on multiple swaps
+ return swapParts(first, second, false, false); //NOTE DEFAULT IS FALSE. The reason is to avoid time cost on multiple swaps
}
+ */
public boolean swapParts(int first, int second, boolean resetNumbers) {
- boolean success = super.swapParts(first, second);
+ return swapParts(first, second, false, resetNumbers); //NOTE DEFAULT IS FALSE. The reason is to avoid time cost on multiple swaps
+ }
+
+ public boolean swapParts(int first, int second, boolean notify, boolean resetNumbers) {
+
+ boolean success = super.swapParts(first, second, notify);
if (resetNumbers)
resetAssignedNumbers();
return success;
diff --git a/Source/mesquite/lib/characters/CharSpecsSet.java b/Source/mesquite/lib/characters/CharSpecsSet.java
index b9a7c1b47..11425c879 100644
--- a/Source/mesquite/lib/characters/CharSpecsSet.java
+++ b/Source/mesquite/lib/characters/CharSpecsSet.java
@@ -34,7 +34,7 @@ public interface CharSpecsSet extends Listable, Identifiable {
public boolean moveParts(int first, int num, int justAfter);
/*.................................................................................................................*/
/*.................................................................................................................*/
- public boolean swapParts(int first, int second);
+ public boolean swapParts(int first, int second, boolean notify);
public CharacterData getCharacterData();
}
diff --git a/Source/mesquite/lib/characters/CharacterData.java b/Source/mesquite/lib/characters/CharacterData.java
index 44901ba3d..b5f16b9ec 100644
--- a/Source/mesquite/lib/characters/CharacterData.java
+++ b/Source/mesquite/lib/characters/CharacterData.java
@@ -84,6 +84,7 @@ public abstract class CharacterData extends FileElement implements MesquiteListe
private Vector cellObjects; //Vector of arrays of objects (Object2DArray) that are attached to cells. A courtesy to modules, so that they can attach and maintain info at the cells
private boolean[][] cellObjectsDisplay; //indicates whether there exist cell objects at a cell that need to be displayed in any way
private boolean[][] changedSinceSave; //records whether changed since last save.
+ private boolean anyChangesSinceSave= false;
private int[] firstApplicable; //records the character number of the first non-applicable character.
private int[] lastApplicable; //records the character number of the first non-applicable character.
@@ -162,7 +163,7 @@ public CharacterData(CharMatrixManager matrixManager, int numTaxa, int numChars,
/* the following should probably be done only on demand (e.g., so that simulation matrices don't need to remake this)*/
characterNames = new String[numChars];
cellObjects = new Vector();
- cellObjectsDisplay = new boolean[numChars][numTaxa];
+ cellObjectsDisplay = null; //make on demand; new boolean[numChars][numTaxa];
changedSinceSave = new boolean[numChars][numTaxa];
firstApplicable = new int[numTaxa];
lastApplicable = new int[numTaxa];
@@ -189,6 +190,7 @@ public void disconnectListening(){
public void nullifyBooleanArrays () {
cellObjectsDisplay = null;
changedSinceSave = null;
+ anyChangesSinceSave = false;
}
/*.................................................................................................................*/
public boolean getCharNumChanging() {
@@ -792,8 +794,6 @@ else if (starting>=numChars)
newCharIDs[i + starting+num+1] = charIDs[starting + i+1];
charIDs = newCharIDs;
-
-
if (characterNames!=null){
characterNames = StringArray.addParts(characterNames, starting, num);
}
@@ -840,17 +840,18 @@ else if (starting>=numChars)
}
if (changedSinceSave!=null){
boolean[][] newCOD = new boolean[newNumChars][numTaxa];
- for (int j = 0; jnumChars)
}
if (changedSinceSave!=null){
boolean[][] newCOD = new boolean[newNumChars][numTaxa];
- for (int j = 0; j0){
for (int i=0; i=numChars || it<0 || it>=numTaxa) {
return;
}
- else if (cellObjectsDisplay!=null && !(ic<0 || ic>=cellObjectsDisplay.length || it<0 || cellObjectsDisplay[ic]==null || it>=cellObjectsDisplay[ic].length)){
- cellObjectsDisplay[ic][it] = true;
+ else {
+
+ if (cellObjectsDisplay==null)
+ cellObjectsDisplay = new boolean[numChars][numTaxa];
+ if ( !(ic<0 || ic>=cellObjectsDisplay.length || it<0 || cellObjectsDisplay[ic]==null || it>=cellObjectsDisplay[ic].length))
+ cellObjectsDisplay[ic][it] = true;
}
}
/*.................................................................................................................*/
@@ -2977,8 +2997,10 @@ public void stampHistoryChange(int ic, int it) {
return;
}
else {
- if (changedSinceSave!=null && !(ic<0 || ic>=changedSinceSave.length || it<0 || changedSinceSave[ic]==null || it>=changedSinceSave[ic].length))
+ if (changedSinceSave!=null && !(ic<0 || ic>=changedSinceSave.length || it<0 || changedSinceSave[ic]==null || it>=changedSinceSave[ic].length)){
changedSinceSave[ic][it] = true;
+ anyChangesSinceSave = true;
+ }
notifyOfChangeLowLevel(MesquiteListener.DATA_CHANGED, ic, it, 0);
checksumValid = false;
//if (watchForChange)
@@ -3026,8 +3048,10 @@ public void stampHistoryChange(int ic, int it) {
public void stampHistoryChange() {
if (changedSinceSave!=null)
for (int ic = 0; ic=include.length || include[ik]){
+ if (include==null || ik>=include.length || include[ik]){// only pay attention to included characters if the boolean array "include" is present
count++;
int thisPos = getInt(ik);
if (thisPos == targetPos || (thisPos==MesquiteInteger.unassigned && (targetPos==unassignedPosition))) {
@@ -104,7 +105,7 @@ public String getListOfMatches(int targetPos, int offset, boolean[] include, boo
count++;
int thisPos = getInt(ic);
if (thisPos == targetPos || (thisPos==MesquiteInteger.unassigned && (targetPos==unassignedPosition))) {
- if (continuing == 0) {
+ if (continuing == 0) {
//first, check to see if there is a series of thirds....
int lastThird = endSequenceByThree(targetPos, getNumberOfParts(), ic, count, include, charNumberOfLastThird);
//if so, then go the series of thirds
@@ -115,6 +116,8 @@ public String getListOfMatches(int targetPos, int offset, boolean[] include, boo
}
list += " " + CharacterStates.toExternal(count+offset) + "-" + CharacterStates.toExternal(lastThird+offset) + "\\3";
+ if (writeCommas)
+ writeSeparator=true;
ic = charNumberOfLastThird.getValue();
count = lastThird;
@@ -141,6 +144,8 @@ else if (continuing>0) { // we are in a contiguous stretch of the same thing
writeSeparator=false;
}
list += " " + CharacterStates.toExternal(count-1+offset);
+ if (writeCommas)
+ writeSeparator=true;
lastWritten = count-1;
}
else {
diff --git a/Source/mesquite/lib/duties/CharMatrixManager.java b/Source/mesquite/lib/duties/CharMatrixManager.java
index 914243ba9..e20c257c7 100644
--- a/Source/mesquite/lib/duties/CharMatrixManager.java
+++ b/Source/mesquite/lib/duties/CharMatrixManager.java
@@ -262,7 +262,7 @@ else if (nameTaxa && it=0){
- discreetAlert("WARNING: The merging process resulted in INCORRECT assignments of states for taxon " + (warnChimera+1) + " (" + taxa.getTaxonName(warnChimera) + "). The problem may have affected other taxa as well. It is recommended that you DO NOT SAVE THE FILE and instead merge again so as to prevent this. To prevent this, ensure that the incoming (merging) data matrix is NOT INTERLEAVED. Interleaving the matrix presents special problems in merging.");
+ discreetAlert("WARNING: The merging process resulted in INCORRECT assignments of states for taxon " + (warnChimera+1) + " (" + taxa.getTaxonName(warnChimera) + ") in matrix " + data.getName() + ". The problem may have affected other taxa as well. It is recommended that you DO NOT SAVE THE FILE and instead merge again so as to prevent this. To prevent this, ensure that the incoming (merging) data matrix is NOT INTERLEAVED. Interleaving the matrix presents special problems in merging.");
MesquiteTrunk.errorReportedDuringRun = true;
}
if (toDelete){
diff --git a/Source/mesquite/lib/duties/DataAlterer.java b/Source/mesquite/lib/duties/DataAlterer.java
index 6c5d55b7e..081d83d24 100644
--- a/Source/mesquite/lib/duties/DataAlterer.java
+++ b/Source/mesquite/lib/duties/DataAlterer.java
@@ -36,7 +36,10 @@ public String getDutyName() {
return "Data Alterer";
}
- public long getNumCellsAltered(){
+ public String[] getDefaultModule() {
+ return new String[] {"#MultipleAlignService"};
+ }
+ public long getNumCellsAltered(){
return numCellsAltered;
}
/** if returns true, then requests to remain on even after operateData is called. Default is false*/
diff --git a/Source/mesquite/lib/duties/FileCoordinator.java b/Source/mesquite/lib/duties/FileCoordinator.java
index 521952b6e..0502a1773 100644
--- a/Source/mesquite/lib/duties/FileCoordinator.java
+++ b/Source/mesquite/lib/duties/FileCoordinator.java
@@ -26,6 +26,7 @@
public abstract class FileCoordinator extends MesquiteModule {
public static boolean maxLinesOfAnyElementInPanelQueried = false; // has this been set by the user?
public static int maxLinesOfAnyElementInPanel = 50; //starts here; if exceeded and hasn't been previously set, then asks user for value. Preferences saved by mesquite.minimal.Defaults
+ public static int maxLinesOfMatricesTreeBlocksSeparateInPanel = 16; //starts here; if exceeded and hasn't been previously set, then asks user for value. Preferences saved by mesquite.minimal.Defaults
public boolean getSearchableAsModule(){
return false;
diff --git a/Source/mesquite/lib/duties/FileInterpreter.java b/Source/mesquite/lib/duties/FileInterpreter.java
index 089b6522a..95943900e 100644
--- a/Source/mesquite/lib/duties/FileInterpreter.java
+++ b/Source/mesquite/lib/duties/FileInterpreter.java
@@ -32,6 +32,7 @@ public abstract class FileInterpreter extends MesquiteModule {
public static final int WINDOWSDELIMITER=2;
public static final int UNIXDELIMITER=3;
public int lineDelimiter = CURRENTDELIMITER;
+ public boolean writeCharLabels = true;
public boolean writeOnlySelectedData = false;
public boolean writeOnlyIncludedData = true;
public boolean writeOnlySelectedTaxa = false;
diff --git a/Source/mesquite/lib/duties/FileProcessor.java b/Source/mesquite/lib/duties/FileProcessor.java
index ddf333fe8..51090e541 100644
--- a/Source/mesquite/lib/duties/FileProcessor.java
+++ b/Source/mesquite/lib/duties/FileProcessor.java
@@ -29,7 +29,10 @@ public abstract class FileProcessor extends MesquiteModule {
public Class getDutyClass() {
return FileProcessor.class;
}
- public String getDutyName() {
+ public String[] getDefaultModule() {
+ return new String[] {"#AlterAllMatrices", "#CompileProcessedMatrices", "#FAFillTreeBlock", "#CopyTreesToNexusBlock", "#CopyTreesToSimpleFile"};
+ }
+ public String getDutyName() {
return "File Processor";
}
@@ -41,11 +44,21 @@ public boolean pleaseLeaveMeOn(){
return false;
}
/*.................................................................................................................*/
+ /** Called before processing a series of files.*/
+ public boolean beforeProcessingSeriesOfFiles(){
+ return true;
+ }
+ /*.................................................................................................................*/
/** Called to process file. Override this or the next*/
public boolean processFile(MesquiteFile file){
return true;
}
+ /*.................................................................................................................*/
+ /** Called after processing a series of files.*/
+ public boolean afterProcessingSeriesOfFiles(){
+ return true;
+ }
/*.................................................................................................................*/
/** If a processor wants, it can request to have the file sequestered once all processing is done*/
public boolean pleaseSequester(){
diff --git a/Source/mesquite/lib/duties/NodeLocsVH.java b/Source/mesquite/lib/duties/NodeLocsVH.java
index e069a5186..c690773f2 100644
--- a/Source/mesquite/lib/duties/NodeLocsVH.java
+++ b/Source/mesquite/lib/duties/NodeLocsVH.java
@@ -23,7 +23,7 @@
Example Module: NodeLocsStandard*/
public abstract class NodeLocsVH extends NodeLocs {
- public static int defaultOrientation = TreeDisplay.UP;
+ public static int defaultOrientation = TreeDisplay.RIGHT;
public String getDutyName() {
return "Node Location (Vert/Horiz)";
}
@@ -32,7 +32,7 @@ public Class getDutyClass() {
}
/** gets the module's default tree display orientation.*/
public int getDefaultOrientation(){
- return TreeDisplay.UP;
+ return TreeDisplay.RIGHT;
}
}
diff --git a/Source/mesquite/lib/table/MesquiteTable.java b/Source/mesquite/lib/table/MesquiteTable.java
index b36d76823..0f440b342 100644
--- a/Source/mesquite/lib/table/MesquiteTable.java
+++ b/Source/mesquite/lib/table/MesquiteTable.java
@@ -4928,7 +4928,11 @@ public boolean isCellSelectedAnyWay(int column, int row) {
return isRowSelected(row) || isColumnSelected(column) || (cellsSelected[0].isBitOn(row * numColumnsTotal + column)) ;
return false;
}
-
+ public void synchronizeRowSelection(){
+ if (rowAssociable != null){
+ synchronizeRowSelection(rowAssociable);
+ }
+ }
public void synchronizeRowSelection(Associable a) {
if (a == null)
return;
@@ -4944,6 +4948,11 @@ public void synchronizeRowSelection(Associable a) {
}
}
+ public void synchronizeColumnSelection(){
+ if (columnAssociable != null){
+ synchronizeColumnSelection(columnAssociable);
+ }
+ }
public void synchronizeColumnSelection(Associable a) {
if (a == null)
return;
diff --git a/Source/mesquite/lib/table/RowNamesPanel.java b/Source/mesquite/lib/table/RowNamesPanel.java
index c49cd4908..8c58d29ce 100644
--- a/Source/mesquite/lib/table/RowNamesPanel.java
+++ b/Source/mesquite/lib/table/RowNamesPanel.java
@@ -209,7 +209,7 @@ public void paint(Graphics g) {
height = resetHeight;
Shape clip = g.getClip();
- for (int r=table.firstRowVisible; (r= groups.size())
+ if (row<0 || row >= groups.size())
return null;
- return ((Listable)groups.elementAt(row)).getName();
+ Listable g = (Listable)groups.elementAt(row);
+ return g.getName();
}
else
return null;
diff --git a/Source/mesquite/lists/CharListPartition/CharListPartition.java b/Source/mesquite/lists/CharListPartition/CharListPartition.java
index c1ce5a868..aa087f5b4 100644
--- a/Source/mesquite/lists/CharListPartition/CharListPartition.java
+++ b/Source/mesquite/lists/CharListPartition/CharListPartition.java
@@ -19,6 +19,7 @@
import java.util.*;
import java.awt.*;
+import mesquite.categ.lib.DNAData;
import mesquite.lib.*;
import mesquite.lib.characters.*;
import mesquite.lib.duties.*;
@@ -37,7 +38,7 @@ public String getExplanation() {
CharacterData data=null;
MesquiteTable table=null;
MesquiteSubmenuSpec mss, mEGC, mDGC, mEGN;
- MesquiteMenuItemSpec mScs, mStc, mRssc, mLine, nNG, mLine2, mss2;
+ MesquiteMenuItemSpec mScs, mStc, mRssc, mLine, nNG, mLine2, mss2, msRCP;
CharactersGroupVector groups;
/*.................................................................................................................*/
public boolean startJob(String arguments, Object condition, boolean hiredByName) {
@@ -92,6 +93,45 @@ private void setPartition(CharactersGroup group, String arguments){
}
}
}
+ private void refineByCodonPosition(){
+ if (table !=null && data!=null) {
+ boolean changed=false;
+ CodonPositionsSet codons = (CodonPositionsSet) data.getCurrentSpecsSet(CodonPositionsSet.class);
+ CharacterPartition partition = (CharacterPartition) data.getCurrentSpecsSet(CharacterPartition.class);
+ if (codons == null || partition == null)
+ return;
+ if (employer!=null && employer instanceof ListModule) {
+ int c = ((ListModule)employer).getMyColumn(this);
+ for (int i=0; i0 && codons.getInt(i)<=3 ){
+ CharactersGroup currentGroup = (CharactersGroup)partition.getProperty(i);
+ String newName = currentGroup.getName() + "_" + codons.toString(i);
+ CharactersGroup newGroup = (CharactersGroup)groups.elementWithName(newName);
+ if (newGroup == null){
+ newGroup = new CharactersGroup();
+ newGroup.setName(newName);
+ newGroup.setColor(currentGroup.getColor());
+ newGroup.setSymbol(currentGroup.getSymbol());
+ groups.addElement(newGroup, true);
+ }
+ partition.setProperty(newGroup, i);
+ if (!changed)
+ outputInvalid();
+ changed = true;
+ }
+ }
+ }
+ }
+
+ if (changed)
+ data.notifyListeners(this, new Notification(MesquiteListener.NAMES_CHANGED)); //TODO: bogus! should notify via specs not data???
+ outputInvalid();
+ parametersChanged();
+
+
+ }
+ }
private void removePartition(){
if (table !=null && data!=null) {
boolean changed=false;
@@ -209,6 +249,9 @@ else if (checker.compare(this.getClass(), "Loads the stored character partition
else if (checker.compare(this.getClass(), "Removes the group designation from the selected characters", null, commandName, "removeGroup")) {
removePartition();
}
+ else if (checker.compare(this.getClass(), "Refines current groups by intersecting them with codon positions", null, commandName, "refineByCodonPosition")) {
+ refineByCodonPosition();
+ }
else
return super.doCommand(commandName, arguments, checker);
return null;
@@ -233,6 +276,10 @@ public void setTableAndData(MesquiteTable table, CharacterData data){
deleteMenuItem(nNG);
mss = addSubmenu(null, "Set Group", makeCommand("setPartition", this));
mss.setList((StringLister)getProject().getFileElement(CharactersGroupVector.class, 0));
+ if (data != null && data instanceof DNAData)
+ msRCP = addMenuItem("Refine Groups by Codon Position", makeCommand("refineByCodonPosition", this));
+
+
mss2 = addMenuItem("Remove Group Designation", makeCommand("removeGroup", this));
mLine2 = addMenuSeparator();
nNG = addMenuItem("New Group...", makeCommand("newGroup", this));
diff --git a/Source/mesquite/lists/DatasetList/DatasetList.java b/Source/mesquite/lists/DatasetList/DatasetList.java
index 8cabaee46..06e489ec5 100644
--- a/Source/mesquite/lists/DatasetList/DatasetList.java
+++ b/Source/mesquite/lists/DatasetList/DatasetList.java
@@ -50,6 +50,14 @@ public boolean showing(Object obj){
public boolean resetMenusOnNameChange(){
return true;
}
+ public boolean rowsShowable(){
+ return true;
+ }
+ public void showItemAtRow(int row){
+ CharacterData data = (CharacterData)datas.elementAt(row);
+ data.showMe();
+
+ }
public void showListWindow(Object obj){
CharMatricesListWindow charMatricesListWindow = new CharMatricesListWindow(this);
charMatricesListWindow.setDatas(datas);
@@ -124,7 +132,6 @@ public boolean deleteRow(int row, boolean notify){
if (row<0 || row>= getNumberOfRows())
return false;
CharacterData data = getProject().getCharacterMatrixDoomedOrNot(row);
- getProject().removeFileElement(data);//must remove first, before disposing
data.dispose();
return true;
}
diff --git a/Source/mesquite/lists/DatasetsListConcatenate/DatasetsListConcatenate.java b/Source/mesquite/lists/DatasetsListConcatenate/DatasetsListConcatenate.java
index 07a5533b2..2ec9690cc 100644
--- a/Source/mesquite/lists/DatasetsListConcatenate/DatasetsListConcatenate.java
+++ b/Source/mesquite/lists/DatasetsListConcatenate/DatasetsListConcatenate.java
@@ -133,20 +133,19 @@ public boolean operateOnDatas(ListableVector datas, MesquiteTable table){
starter.addToFile(getProject().getHomeFile(), getProject(), findElementManager(CharacterData.class));
}
-
boolean success = starter.concatenate(data, false, concatExcludedCharacters, true, prefixGroupLabelNames, false, false);
if (success){
count++;
if (count > 1)
name = name + "+";
name = name + "(" + data.getName() + ")";
- if (removeConcatenated)
+ if (removeConcatenated){
data.deleteMe(false);
+ }
}
else
countFailed++;
-
}
if (starter != null)
starter.setName(name);
diff --git a/Source/mesquite/lists/ModelsList/ModelsList.java b/Source/mesquite/lists/ModelsList/ModelsList.java
index 275dc7c26..edfc46d18 100644
--- a/Source/mesquite/lists/ModelsList/ModelsList.java
+++ b/Source/mesquite/lists/ModelsList/ModelsList.java
@@ -112,7 +112,7 @@ public boolean deleteRow(int row, boolean notify){
return false;
}
else {
- getProject().removeFileElement(model);//must remove first, before disposing
+ getProject().removeFileElement(model, notify);//must remove first, before disposing
model.dispose();
return true;
}
@@ -238,7 +238,7 @@ public void setRowName(int row, String name){
}
public String getRowName(int row){
if (models!=null){
- if (row<0 && row >= models.size())
+ if (row<0 || row >= models.size())
return null;
return ((Listable)models.elementAt(row)).getName();
}
diff --git a/Source/mesquite/lists/NumForCharMatrixList/NumForCharMatrixList.java b/Source/mesquite/lists/NumForCharMatrixList/NumForCharMatrixList.java
index f6e5d738f..cd90181a5 100644
--- a/Source/mesquite/lists/NumForCharMatrixList/NumForCharMatrixList.java
+++ b/Source/mesquite/lists/NumForCharMatrixList/NumForCharMatrixList.java
@@ -23,7 +23,7 @@
import mesquite.lib.table.*;
/* ======================================================================== */
-public class NumForCharMatrixList extends DataSetsListAssistant {
+public class NumForCharMatrixList extends DataSetsListAssistant implements MesquiteListener {
/*.................................................................................................................*/
public String getName() {
return "Number for Matrix (in List of Character Matrices window)";
@@ -39,6 +39,8 @@ public String getExplanation() {
"You can select a value to show in the Number For Character Matrices submenu of the Columns menu of the List of Character Matrices Window. ");
}
NumberForMatrix numberTask;
+ MesquiteBoolean shadeCells = new MesquiteBoolean(false);
+ MesquiteTable table;
/*.................................................................................................................*/
public boolean startJob(String arguments, Object condition, boolean hiredByName) {
if (arguments !=null) {
@@ -52,6 +54,9 @@ public boolean startJob(String arguments, Object condition, boolean hiredByName)
if (numberTask==null) {
return sorry("Number for character matrix (for list) can't start because the no calculating module was successfully hired");
}
+ shadeCells.setValue(false);
+ addCheckMenuItem(null, "Color Cells", makeCommand("toggleShadeCells", this), shadeCells);
+ addMenuItem(null, "Select based on value...", makeCommand("selectBasedOnValue", this));
return true;
}
/** Returns whether or not it's appropriate for an employer to hire more than one instance of this module.
@@ -69,12 +74,14 @@ public void setTableAndObject(MesquiteTable table, Object obj){
if (obj instanceof ListableVector)
this.datas = (ListableVector)obj;
datas.addListener(this);
+ this.table = table;
doCalcs();
}
/*.................................................................................................................*/
/** passes which object is being disposed (from MesquiteListener interface)*/
public void disposing(Object obj){
- //TODO: respond
+ if (obj == datas)
+ datas=null;
}
/*.................................................................................................................*/
/** passes which object is being disposed (from MesquiteListener interface)*/
@@ -82,7 +89,8 @@ public boolean okToDispose(Object obj, int queryUser){
return true; //TODO: respond
}
public void changed(Object caller, Object obj, Notification notification){
- if (Notification.appearsCosmetic(notification))
+ // below should be appearsCosmeticOrSelection if matrix initiating
+ if (Notification.appearsCosmeticOrSelection(notification))
return;
if (notification.getCode()!=MesquiteListener.LOCK_CHANGED)
doCalcs();
@@ -96,17 +104,96 @@ public Class getHireSubchoice(){
public Snapshot getSnapshot(MesquiteFile file) {
Snapshot temp = new Snapshot();
temp.addLine("setValueTask ", numberTask);
+ temp.addLine("toggleShadeCells " + shadeCells.toOffOnString());
return temp;
}
/*.................................................................................................................*/
+ public boolean querySelectBounds(MesquiteNumber lessThan, MesquiteNumber moreThan) {
+ if (lessThan==null || moreThan==null || numberTask==null)
+ return false;
+ MesquiteInteger buttonPressed = new MesquiteInteger(1);
+ ExtensibleDialog dialog = new ExtensibleDialog(containerOfModule(), "Select based upon value",buttonPressed);
+
+ dialog.addLargeOrSmallTextLabel("Select based upon value of " + numberTask.getNameOfValueCalculated());
+
+ SingleLineTextField moreThanField = dialog.addTextField("Select values greater than or equal to ","",20);
+ SingleLineTextField lessThanField = dialog.addTextField("Select values less than or equal to ","",20);
+
+
+ dialog.completeAndShowDialog(true);
+
+ if (buttonPressed.getValue()==0) {
+ String s = moreThanField.getText();
+ moreThan.setValue(s);
+ s = lessThanField.getText();
+ lessThan.setValue(s);
+ }
+ dialog.dispose();
+ return (buttonPressed.getValue()==0);
+ }
+ /*.................................................................................................................*/
+ void selectBasedOnValue() {
+ if (MesquiteThread.isScripting())
+ return;
+ if (table==null || datas==null || na==null)
+ return;
+ MesquiteNumber lessThan = new MesquiteNumber();
+ MesquiteNumber moreThan = new MesquiteNumber();
+ if (!querySelectBounds(lessThan, moreThan))
+ return;
+ if (!lessThan.isCombinable() && ! moreThan.isCombinable())
+ return;
+ MesquiteNumber value = new MesquiteNumber();
+ for (int i=0; i= getNumberOfRows())
return false;
Taxa taxa = getProject().getTaxa(row);
- getProject().removeFileElement(taxa);//must remove first, before disposing
+ getProject().removeFileElement(taxa, notify);//must remove first, before disposing
taxa.dispose();
return true;
}
diff --git a/Source/mesquite/lists/TaxonGroupList/TaxonGroupList.java b/Source/mesquite/lists/TaxonGroupList/TaxonGroupList.java
index e4af00f73..f81da50fd 100644
--- a/Source/mesquite/lists/TaxonGroupList/TaxonGroupList.java
+++ b/Source/mesquite/lists/TaxonGroupList/TaxonGroupList.java
@@ -284,7 +284,7 @@ public void setRowName(int row, String name){
}
public String getRowName(int row){
if (groups!=null){
- if (row<0 && row >= groups.size())
+ if (row<0 || row >= groups.size())
return null;
return ((Listable)groups.elementAt(row)).getName();
}
diff --git a/Source/mesquite/lists/TreeblockList/TreeblockList.java b/Source/mesquite/lists/TreeblockList/TreeblockList.java
index abdaf2c38..0e4b2e9ce 100644
--- a/Source/mesquite/lists/TreeblockList/TreeblockList.java
+++ b/Source/mesquite/lists/TreeblockList/TreeblockList.java
@@ -19,6 +19,7 @@
import java.util.*;
import java.awt.*;
import mesquite.lib.*;
+import mesquite.lib.characters.CharacterData;
import mesquite.lib.duties.*;
import mesquite.lib.table.*;
@@ -50,6 +51,14 @@ public boolean showing(Object obj){
return (getModuleWindow()!=null && obj == treeBlocks);
}
+ public boolean rowsShowable(){
+ return true;
+ }
+ public void showItemAtRow(int row){
+ TreeVector trees = (TreeVector)treeBlocks.elementAt(row);
+ trees.showMe();
+
+ }
public boolean rowsDeletable(){
return true;
}
@@ -67,7 +76,7 @@ public boolean deleteRow(int row, boolean notify){
if (row<0 || row>= getNumberOfRows())
return false;
TreeVector trees = (TreeVector)treeBlocks.elementAt(row);
- getProject().removeFileElement(trees);//must remove first, before disposing
+ getProject().removeFileElement(trees, notify);//must remove first, before disposing
trees.dispose();
return true;
}
diff --git a/Source/mesquite/lists/lib/CharMatricesListWindow.java b/Source/mesquite/lists/lib/CharMatricesListWindow.java
index 1a73387c2..67a491b83 100644
--- a/Source/mesquite/lists/lib/CharMatricesListWindow.java
+++ b/Source/mesquite/lists/lib/CharMatricesListWindow.java
@@ -4,6 +4,9 @@
import java.awt.Graphics;
import mesquite.lib.ListableVector;
+import mesquite.lib.Listenable;
+import mesquite.lib.MesquiteListener;
+import mesquite.lib.Notification;
import mesquite.lib.characters.CharacterData;
public class CharMatricesListWindow extends ListableVectorWindow {
@@ -21,6 +24,8 @@ public ListableVector getDatas() {
public void setDatas(ListableVector datas) {
this.datas = datas;
}
+ public void notifyRowDeletion(Object obj){ // row deletion notification happens through remove file element of project
+ }
/*...............................................................................................................*/
public void setRowNameColor(Graphics g, int row){
diff --git a/Source/mesquite/lists/lib/ListModule.java b/Source/mesquite/lists/lib/ListModule.java
index d866cb3d9..f50b130ca 100644
--- a/Source/mesquite/lists/lib/ListModule.java
+++ b/Source/mesquite/lists/lib/ListModule.java
@@ -134,6 +134,11 @@ public String getColumnExplanation(int column){
public boolean rowsDeletable(){
return false;
}
+ public boolean rowsShowable(){
+ return false;
+ }
+ public void showItemAtRow(int row){
+ }
public boolean rowsAddable(){
return false;
}
diff --git a/Source/mesquite/lists/lib/ListWindow.java b/Source/mesquite/lists/lib/ListWindow.java
index d279b89ba..4b4e4ceca 100644
--- a/Source/mesquite/lists/lib/ListWindow.java
+++ b/Source/mesquite/lists/lib/ListWindow.java
@@ -14,6 +14,9 @@
package mesquite.lists.lib;
import java.awt.*;
+import java.awt.datatransfer.Clipboard;
+import java.awt.datatransfer.DataFlavor;
+import java.awt.datatransfer.Transferable;
import java.awt.event.*;
import java.util.*;
@@ -116,6 +119,9 @@ public ListWindow (ListModule ownerModule) {
//ownerModule.addMenuSeparator();
if (owner.rowsAddable())
ownerModule.addMenuItem( "Add " + owner.getItemTypeNamePlural() + "...", ownerModule.makeCommand("addRows", this));
+ if (owner.rowsShowable())
+ ownerModule.addMenuItem( "Show Selected " + owner.getItemTypeNamePlural(), showCommand = ownerModule.makeCommand("showSelectedRows", this));
+
if (owner.rowsDeletable()) {
ownerModule.addMenuItem( "Delete Selected " + owner.getItemTypeNamePlural(), deleteCommand = ownerModule.makeCommand("deleteSelectedRows", this));
MesquiteWindow.addKeyListener(this, this);
@@ -124,6 +130,10 @@ public ListWindow (ListModule ownerModule) {
MesquiteMenuItemSpec mm = ownerModule.addMenuItem( "Move Selected " + owner.getItemTypeNamePlural() + " To...", ownerModule.makeCommand("moveSelectedTo", this));
mm.setShortcut(KeyEvent.VK_M);
}
+ MesquiteSubmenuSpec mss2 = ownerModule.addSubmenu(null,"Select");
+ ownerModule.addItemToSubmenu(null, mss2, ownerModule.addMenuItem( "Invert Selection", ownerModule.makeCommand("invertSelection", this)));
+ ownerModule.addItemToSubmenu(null, mss2, ownerModule.addMenuItem( "Select by List in Clipboard", ownerModule.makeCommand("selectByClipboard", this)));
+
setShowExplanation(true);
setShowAnnotation(true);
table.requestFocusInWindow();
@@ -284,6 +294,7 @@ private void doWandTouch(String arguments){
if (arguments.indexOf("shift")<0 && !withinSelection && !deselects)
assoc.deselectAll();
table.offAllEdits();
+ int count = 0;
for (int i=0; i=0 && row >=0) {
long[] fullChecksumBefore=null;
if (assoc instanceof CharacterData) {
@@ -462,7 +481,12 @@ else if (checker.compare(this.getClass(), "Sorts rows", "[column touched] [row t
swapParts(assoc, j, j+1, text);
}
}
-
+ if (assoc instanceof ListableVector && ((ListableVector)assoc).size()>0){
+ Listable obj = ((ListableVector)assoc).elementAt(0);
+ mesquite.lib.duties.ElementManager m = ownerModule.findElementManager(obj.getClass());
+ if (m != null)
+ m.elementsReordered((ListableVector)assoc);
+ }
processPostSwap(assoc);
assoc.notifyListeners(this, new Notification(MesquiteListener.PARTS_MOVED, undoReference));
if (assoc instanceof CharacterData){
@@ -471,6 +495,7 @@ else if (checker.compare(this.getClass(), "Sorts rows", "[column touched] [row t
}
}
else if (column == -1 && row >=0) { //row names selected; sort by name
+
long[] fullChecksumBefore=null;
if (assoc instanceof CharacterData) {
fullChecksumBefore = ((CharacterData)assoc).getIDOrderedFullChecksum();
@@ -487,6 +512,12 @@ else if (checker.compare(this.getClass(), "Sorts rows", "[column touched] [row t
swapParts(assoc, j, j+1, text);
}
}
+ if (assoc instanceof ListableVector && ((ListableVector)assoc).size()>0){
+ Listable obj = ((ListableVector)assoc).elementAt(0);
+ mesquite.lib.duties.ElementManager m = ownerModule.findElementManager(obj.getClass());
+ if (m != null)
+ m.elementsReordered((ListableVector)assoc);
+ }
assoc.notifyListeners(this, new Notification(MesquiteListener.PARTS_MOVED, undoReference));
if (assoc instanceof CharacterData){
long[] fullChecksumAfter = ((CharacterData)assoc).getIDOrderedFullChecksum();
@@ -494,8 +525,50 @@ else if (checker.compare(this.getClass(), "Sorts rows", "[column touched] [row t
}
}
}
+ else if (checker.compare(this.getClass(), "Shows the selected rows", null, commandName, "showSelectedRows")) {
+ showSelectedRows();
+ return null;
+ }
else if (checker.compare(this.getClass(), "Deletes the selected rows", null, commandName, "deleteSelectedRows")) {
deleteSelectedRows(true);
+ return null;
+ }
+ else if (checker.compare(this.getClass(), "Inverts which rows are selected", null, commandName, "invertSelection")) {
+ for (int im = 0; im < table.getNumRows(); im++){
+ if (table.isRowSelected(im)){
+ table.deselectRow(im); //2019: why this doesn't handle associable deselection, don't remember!
+ if (table.getRowAssociable() != null){
+ table.getRowAssociable().setSelected(im, false);
+ }
+ }
+ else
+ table.selectRow(im);
+ }
+ table.repaintAll();
+ }
+ else if (checker.compare(this.getClass(), "Select by List in Clipboard", null, commandName, "selectByClipboard")) {
+ String[] clipboard = null; //{"uce-101", "uce-1084"};
+ clipboard = null;
+ Clipboard clip = Toolkit.getDefaultToolkit().getSystemClipboard();
+ Transferable t = clip.getContents(this);
+ try {
+
+ String s = (String) t.getTransferData(DataFlavor.stringFlavor);
+ if (s != null) {
+ clipboard = StringUtil.getLines(s);
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ for (int im = 0; im < table.getNumRows(); im++){
+ if (StringArray.indexOf(clipboard, table.getRowNameTextForDisplay(im))>=0){
+ table.selectRow(im);
+ if (table.getRowAssociable() != null)
+ table.getRowAssociable().setSelected(im, true);
+ }
+ }
+ table.repaintAll();
+
}
else if (checker.compare(this.getClass(), "Moves the selected rows ", "[row to move after; -1 if at start]", commandName, "moveSelectedTo")) {
if (!owner.rowsMovable())
@@ -574,7 +647,7 @@ void swapParts(Associable assoc, int first, int second, String[] text){
String temp = text[first];
text[first] = text[second];
text[second] = temp;
- assoc.swapParts(first, second);
+ assoc.swapParts(first, second, false);
}
public void processPostSwap(Associable assoc){
}
@@ -876,6 +949,14 @@ public void addRows(int num) {
MenuOwner.decrementMenuResetSuppression();
}
+ public void showSelectedRows() {
+ int numSelected = 0;
+ for (int ic = table.getNumRows()-1; ic>=0; ic--){
+ if (table.isRowSelected(ic)) {
+ owner.showItemAtRow(ic);
+ }
+ }
+ }
public void deleteSelectedRows(boolean byCommand) {
int numSelected = 0;
for (int ic = table.getNumRows()-1; ic>=0; ic--){
@@ -896,28 +977,13 @@ public void deleteSelectedRows(boolean byCommand) {
MenuOwner.incrementMenuResetSuppression();
if (ownerModule != null && ownerModule.getProject() != null)
ownerModule.getProject().incrementProjectWindowSuppression();
- /*int[] which = new int[numSelected];
- int howMany = 0;
- for (int ic = table.getNumRows()-1; ic>=0; ic--){
- if (table.isRowSelected(ic)) {
- if (!owner.rowDeletable(ic)){
- if (!MesquiteThread.isScripting())
- owner.alert("Sorry, you can't delete that");
- }
- else {
- which[howMany]=ic;
- howMany++;
- }
- }
- }
- */
+
int count =0;
int currentNumRows = owner.getNumberOfRows();
Object obj = getCurrentObject();
//NOTE: this code allows reporting of what contiguous blocks were deleted, but causes full recalculations for each discontiguity
-
int row = currentNumRows-1;
int firstInBlockDeleted = -1;
int lastInBlockDeleted = -1;
@@ -951,51 +1017,8 @@ public void deleteSelectedRows(boolean byCommand) {
}
row--;
}
-
-
- /* int firstInBlockDeleted = -1;
- int lastInBlockDeleted = -1;
- for (int ic = 0; ic=0){
- owner.deleteRows(firstInBlockDeleted, lastInBlockDeleted, false);
- count += lastInBlockDeleted-firstInBlockDeleted+1;
- }
- */
-
- /* old code pre-2. 02
- int firstInBlockDeleted = -1;
- for (int ic = 0; ic= howMany || which[ic+1] != which[ic]-1)){ //next one is not adjacent; notify listeners
- ((Listenable)obj).notifyListeners(this, new Notification(MesquiteListener.PARTS_DELETED, new int[] {which[ic], firstInBlockDeleted - which[ic]+1}));
- ((Listenable)obj).decrementNotifySuppress();
- ((Listenable)obj).incrementNotifySuppress();
- firstInBlockDeleted = -1;
- }
- }
- */
-
table.setNumRows(currentNumRows-count);
+
//NOTE: this code allows reporting of what contiguous blocks were deleted, but causes full recalculations for each discontiguity
notifyRowDeletion(obj);
table.repaintAll();
diff --git a/Source/mesquite/meristic/lib/MeristicData.java b/Source/mesquite/meristic/lib/MeristicData.java
index 676003952..3a7cdef29 100644
--- a/Source/mesquite/meristic/lib/MeristicData.java
+++ b/Source/mesquite/meristic/lib/MeristicData.java
@@ -420,7 +420,7 @@ else if (starting>numChars)
}
/*..........................................MeristicData................*/
/**swaps characters first and second.*/
- public boolean swapParts(int first, int second){
+ public boolean swapParts(int first, int second, boolean notify){
if (first<0 || first >= numChars)
return false;
if (second<0 || second >= numChars)
@@ -429,7 +429,7 @@ public boolean swapParts(int first, int second){
Integer2DArray oldMatrix = ((Integer2DArray)matrices.elementAt(item));
Integer2DArray.swapColumns(oldMatrix.getMatrix(), first, second);
}
- return super.swapParts(first, second);
+ return super.swapParts(first, second, notify);
}
/*..........................................MeristicData................*/
/**moves num characters from position "first" to just after position "justAfter"; returns true iff successful.*/
diff --git a/Source/mesquite/minimal/BasicFileCoordinator/ProjectWindow.java b/Source/mesquite/minimal/BasicFileCoordinator/ProjectWindow.java
index ad7076754..c7799feba 100644
--- a/Source/mesquite/minimal/BasicFileCoordinator/ProjectWindow.java
+++ b/Source/mesquite/minimal/BasicFileCoordinator/ProjectWindow.java
@@ -459,31 +459,35 @@ int sequenceUpToDate(){
panel.repaint();
e++;
if (proj.getNumberCharMatricesVisible(t)>0){
- for (int k = 0; k= elements.size())
+ return 5;
+ panel = ((ProjPanelPanel)elements.elementAt(e));
+ if (!(panel instanceof ElementPanel) || ((ElementPanel)panel).element != data || !panel.upToDate())
+ return 6;
+ panel.resetTitle();
+ panel.repaint();
+ e++;
+ }
+ }
+ }
+ if (proj.getNumberOfFileElements(TreeVector.class)>0){
+ e++; //for the title "Tree Blocks"
+ if (proj.getTreeVectors().size()<=FileCoordinator.maxLinesOfMatricesTreeBlocksSeparateInPanel)
+ for (int k = 0; k= elements.size())
- return 5;
+ return 7;
panel = ((ProjPanelPanel)elements.elementAt(e));
- if (!(panel instanceof ElementPanel) || ((ElementPanel)panel).element != data || !panel.upToDate())
- return 6;
+ if (!(panel instanceof ElementPanel) || ((ElementPanel)panel).element != trees || !panel.upToDate())
+ return 8;
panel.resetTitle();
panel.repaint();
e++;
- }
- }
- }
- if (proj.getNumberOfFileElements(TreeVector.class)>0){
- for (int k = 0; k= elements.size())
- return 7;
- panel = ((ProjPanelPanel)elements.elementAt(e));
- if (!(panel instanceof ElementPanel) || ((ElementPanel)panel).element != trees || !panel.upToDate())
- return 8;
- panel.resetTitle();
- panel.repaint();
- e++;
}
}
@@ -637,23 +641,27 @@ public void refresh(){
addExtraPanel(panel = new TaxaPanel(bfc, this, w, t));
panel.setLocation(0,0);
if (proj.getNumberCharMatricesVisible(t)>0){
- for (int k = 0; k0){
- for (int k = 0; k0){
+ addExtraPanel(panel = new AbundanceTPanel(bfc, this, w, proj, t));
+ if (proj.getTreeVectors().size()<=FileCoordinator.maxLinesOfMatricesTreeBlocksSeparateInPanel)
+ for (int k = 0; k1)
+ return Integer.toString(n) + " Character Matrices";
+ return "Character Matrix";
+
+ }
+}
+/*======================================================================== */
+class AbundanceTPanel extends ElementPanel {
+ MesquiteProject project = null;
+ Taxa taxa = null;
+ public AbundanceTPanel(BasicFileCoordinator bfc, ClosablePanelContainer container,MesquiteWindow w, MesquiteProject project, Taxa taxa){
+ super(bfc, container, w,project.getTreeVectors());
+ addCommand(true, null, "View List", "View List", new MesquiteCommand("showMe", project.getTreeVectors()));
+ this.taxa = taxa;
+ this.project = project;
+ }
+ public String getTitle(){
+ int n = project.getNumberTreeVectors(taxa);
+ if (n>1)
+ return Integer.toString(n) + " Tree Blocks";
+ return "Tree Block";
+ }
+}
+/*======================================================================== */
class TreesRPanel extends ElementPanel {
public TreesRPanel(BasicFileCoordinator bfc, ClosablePanelContainer container, MesquiteWindow w, FileElement element){
diff --git a/Source/mesquite/minimal/Defaults/Defaults.java b/Source/mesquite/minimal/Defaults/Defaults.java
index 26919b323..ed2e5698f 100644
--- a/Source/mesquite/minimal/Defaults/Defaults.java
+++ b/Source/mesquite/minimal/Defaults/Defaults.java
@@ -108,7 +108,8 @@ public boolean startJob(String arguments, Object condition, boolean hiredByName)
sm.setFilterable(false);
MesquiteTrunk.mesquiteTrunk.addItemToSubmenu(MesquiteTrunk.fileMenu, MesquiteTrunk.defaultsSubmenu, "-", null);
- MesquiteTrunk.mesquiteTrunk.addMenuItem(MesquiteTrunk.defaultsSubmenu,"Maximum # Items in Project Panel...", makeCommand("setProjectPanelMaxItems", this));
+ MesquiteTrunk.mesquiteTrunk.addMenuItem(MesquiteTrunk.defaultsSubmenu, "Max # Matrices/Tree Blocks Listed in Project Panel...", makeCommand("setProjectPanelMaxItemsSeparate", this));
+ //MesquiteTrunk.mesquiteTrunk.addMenuItem(MesquiteTrunk.defaultsSubmenu,"Overall Max # Items in Project Panel...", makeCommand("setProjectPanelMaxItems", this));
sm = MesquiteTrunk.mesquiteTrunk.addSubmenu(MesquiteTrunk.defaultsSubmenu,"Project Panel Font Size", makeCommand("setProjectPanelFontSize", this), MesquiteSubmenu.getFontSizeList());
sm.setFilterable(false);
MesquiteTrunk.mesquiteTrunk.addCheckMenuItemToSubmenu(MesquiteTrunk.fileMenu, MesquiteTrunk.defaultsSubmenu,"Use File-Specific Project Panel Width", makeCommand("respectFileSpecificResourceWidth", this), respectFileSpecificResourceWidth);
@@ -232,6 +233,10 @@ else if ("maxLinesOfAnyElementInPanel".equalsIgnoreCase(tag)) {
int m = MesquiteInteger.fromString(content);
FileCoordinator.maxLinesOfAnyElementInPanel = m;
}
+ else if ("maxLinesOfMatricesTreeBlocksSeparateInPanel".equalsIgnoreCase(tag)) {
+ int m = MesquiteInteger.fromString(content);
+ FileCoordinator.maxLinesOfMatricesTreeBlocksSeparateInPanel = m;
+ }
/* else if ("tilePopouts".equalsIgnoreCase(tag)){
tilePopouts.setValue(content);
MesquiteFrame.popIsTile = tilePopouts.getValue();
@@ -314,6 +319,7 @@ public String preparePreferencesForXML () {
StringUtil.appendXMLTag(buffer, 2, "resourcesFontSize", MesquiteFrame.resourcesFontSize);
StringUtil.appendXMLTag(buffer, 2, "maxLinesOfAnyElementInPanel", FileCoordinator.maxLinesOfAnyElementInPanel);
StringUtil.appendXMLTag(buffer, 2, "maxLinesOfAnyElementInPanelQueried", FileCoordinator.maxLinesOfAnyElementInPanelQueried);
+ StringUtil.appendXMLTag(buffer, 2, "maxLinesOfMatricesTreeBlocksSeparateInPanel", FileCoordinator.maxLinesOfMatricesTreeBlocksSeparateInPanel);
StringUtil.appendXMLTag(buffer, 2, "useOtherChoicesInMenus", useOtherChoices);
StringUtil.appendXMLTag(buffer, 2, "suggestedDirectory", MesquiteTrunk.suggestedDirectory);
StringUtil.appendXMLTag(buffer, 2, "askSeed", askSeed);
@@ -444,6 +450,15 @@ else if (checker.compare(getClass(), "Sets the maximum number of items of a part
FileCoordinator.maxLinesOfAnyElementInPanelQueried = true;
storePreferences();
}
+ else if (checker.compare(getClass(), "Sets the maximum number of Matrices or Tree Blocks shown separately in Project Panel", "[number]", commandName, "setProjectPanelMaxItemsSeparate")) {
+ int num = MesquiteInteger.fromFirstToken(arguments, new MesquiteInteger(0));
+ if (!MesquiteInteger.isCombinable(num))
+ num= MesquiteInteger.queryInteger(containerOfModule(), "Maximum items of Matrices or Tree Blocks shown separately in project panel", null, FileCoordinator.maxLinesOfMatricesTreeBlocksSeparateInPanel);
+ if (!MesquiteInteger.isCombinable(num))
+ return null;
+ FileCoordinator.maxLinesOfMatricesTreeBlocksSeparateInPanel = num;
+ storePreferences();
+ }
else if (checker.compare(getClass(), "Sets the font size of project panel", "[font size]", commandName, "setProjectPanelFontSize")) {
int fontSize = MesquiteInteger.fromFirstToken(arguments, new MesquiteInteger(0));
if (!MesquiteInteger.isCombinable(fontSize))
diff --git a/Source/mesquite/minimal/ManageTaxa/ManageTaxa.java b/Source/mesquite/minimal/ManageTaxa/ManageTaxa.java
index 2d1dc39e6..cd5c7130c 100644
--- a/Source/mesquite/minimal/ManageTaxa/ManageTaxa.java
+++ b/Source/mesquite/minimal/ManageTaxa/ManageTaxa.java
@@ -1052,7 +1052,7 @@ void setOrder(Taxa taxa, Taxa oTaxa){ //sets order of taxa to be same as oTaxa
if (!StringUtil.blank(id)){
int whichTaxon = taxa.findByUniqueID(id);
if (whichTaxon >=0 && whichTaxon!= ic) {
- taxa.swapParts(ic, whichTaxon);
+ taxa.swapParts(ic, whichTaxon, true);
anyIDMoves = true;
//logln("Taxon " + (whichTaxon+1) + " moved into position " + (ic+1) + " (a)");
}
@@ -1062,7 +1062,7 @@ void setOrder(Taxa taxa, Taxa oTaxa){ //sets order of taxa to be same as oTaxa
for (int ic = 0; ic=0 && whichTaxon!= ic) {
- taxa.swapParts(ic, whichTaxon);
+ taxa.swapParts(ic, whichTaxon, true);
//logln("Taxon " + (whichTaxon+1) + " moved into position " + (ic+1) + " (b)");
}
}
@@ -1080,7 +1080,7 @@ void restoreOrderIfNeeded(Taxa taxa){ //sets order of taxa to be same as unique
if (!StringUtil.blank(id)){
int whichTaxon = taxa.findByUniqueID(id);
if (whichTaxon >=0 && whichTaxon!= ic) {
- taxa.swapParts(ic, whichTaxon);
+ taxa.swapParts(ic, whichTaxon, true);
anyIDMoves = true;
//logln("Taxon " + (whichTaxon+1) + " moved into position " + (ic+1) + " (a)");
}
@@ -1090,7 +1090,7 @@ void restoreOrderIfNeeded(Taxa taxa){ //sets order of taxa to be same as unique
for (int ic = 0; ic=0 && whichTaxon!= ic) {
- taxa.swapParts(ic, whichTaxon);
+ taxa.swapParts(ic, whichTaxon, true);
//logln("Taxon " + (whichTaxon+1) + " moved into position " + (ic+1) + " (b)");
}
}
diff --git a/Source/mesquite/molec/AvgSequenceLengthMatrix/AvgSequenceLengthMatrix.java b/Source/mesquite/molec/AvgSequenceLengthMatrix/AvgSequenceLengthMatrix.java
index 536c28eb7..5d4e9e350 100644
--- a/Source/mesquite/molec/AvgSequenceLengthMatrix/AvgSequenceLengthMatrix.java
+++ b/Source/mesquite/molec/AvgSequenceLengthMatrix/AvgSequenceLengthMatrix.java
@@ -22,7 +22,6 @@ public void calculateNumber(MCharactersDistribution data, MesquiteNumber result,
if (result == null || data == null)
return;
clearResultAndLastResult(result);
-
CharacterData parentData = data.getParentData();
if (parentData == null){
if (resultString != null)
diff --git a/Source/mesquite/molec/ColorByAA/ColorByAA.java b/Source/mesquite/molec/ColorByAA/ColorByAA.java
index c5526f4c2..186856e86 100644
--- a/Source/mesquite/molec/ColorByAA/ColorByAA.java
+++ b/Source/mesquite/molec/ColorByAA/ColorByAA.java
@@ -107,7 +107,7 @@ public String getCellExplanation(int ic, int it){
s= "Codon position: " + i;
long aa = data.getAminoAcid(ic,it,true);
if (aa!=CategoricalState.inapplicable)
- s += "Amino acid: " + ProteinState.toString(aa, false);
+ s += ", Amino acid: " + ProteinState.toString(aa, null, 0, false, false);
return s;
}
public String getCellString(int ic, int it){
diff --git a/Source/mesquite/molec/GapsToFromMissing/GapsToFromMissing.java b/Source/mesquite/molec/GapsToFromMissing/GapsToFromMissing.java
index a6e351f99..d62700d36 100644
--- a/Source/mesquite/molec/GapsToFromMissing/GapsToFromMissing.java
+++ b/Source/mesquite/molec/GapsToFromMissing/GapsToFromMissing.java
@@ -124,7 +124,7 @@ public synchronized boolean alterData(CharacterData dData, MesquiteTable table,
int startOfFirstDataRegion = -1;
int endOfLastDataRegion = -1;
for (int ic = 0; iclowestYes+1){ //a "yes" that is deeper than last
- taxa.swapParts(lowestYes+1, i);
+ taxa.swapParts(lowestYes+1, i, true);
lowestYes = lowestYes+1;
}
else
diff --git a/Source/mesquite/treefarm/CopyTreesToNexusBlock/CopyTreesToNexusBlock.java b/Source/mesquite/treefarm/CopyTreesToNexusBlock/CopyTreesToNexusBlock.java
new file mode 100644
index 000000000..542259ba9
--- /dev/null
+++ b/Source/mesquite/treefarm/CopyTreesToNexusBlock/CopyTreesToNexusBlock.java
@@ -0,0 +1,127 @@
+/* Mesquite source code. Copyright 1997 and onward, W. Maddison and D. Maddison.
+
+
+
+Disclaimer: The Mesquite source code is lengthy and we are few. There are no doubt inefficiencies and goofs in this code.
+The commenting leaves much to be desired. Please approach this source code with the spirit of helping out.
+Perhaps with your help we can be more than a few, and make Mesquite better.
+
+Mesquite is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY.
+Mesquite's web site is http://mesquiteproject.org
+
+This source code and its compiled class files are free and modifiable under the terms of
+GNU Lesser General Public License. (http://www.gnu.org/copyleft/lesser.html)
+ */
+package mesquite.treefarm.CopyTreesToNexusBlock;
+
+import java.awt.FileDialog;
+
+import mesquite.lib.*;
+import mesquite.lib.characters.CharacterData;
+import mesquite.lib.duties.*;
+
+/* ======================================================================== */
+public class CopyTreesToNexusBlock extends FileProcessor {
+ String saveFile = null;
+ /*.................................................................................................................*/
+ public boolean startJob(String arguments, Object condition, boolean hiredByName) {
+ return true;
+ }
+ /*.................................................................................................................*/
+ /** returns whether this module is requesting to appear as a primary choice */
+ public boolean requestPrimaryChoice(){
+ return false;
+ }
+ /*.................................................................................................................*/
+ public boolean isPrerelease(){
+ return false;
+ }
+ /*.................................................................................................................*/
+ public boolean isSubstantive(){
+ return false;
+ }
+
+ /** if returns true, then requests to remain on even after alterFile is called. Default is false*/
+ public boolean pleaseLeaveMeOn(){
+ return false;
+ }
+
+ boolean initFile(){
+ MesquiteFileDialog fdlg= new MesquiteFileDialog(containerOfModule(), "Output File for Tree(s)", FileDialog.SAVE);
+ fdlg.setBackground(ColorTheme.getInterfaceBackground());
+ fdlg.setVisible(true);
+ String fileName=fdlg.getFile();
+ String directory=fdlg.getDirectory();
+ if (StringUtil.blank(fileName) || StringUtil.blank(directory))
+ return false;
+ saveFile = MesquiteFile.composePath(directory, fileName);
+ MesquiteFile.putFileContents(saveFile, "#NEXUS" + StringUtil.lineEnding(), true);
+ MesquiteFile.appendFileContents(saveFile, "BEGIN TREES;" + StringUtil.lineEnding(), true);
+ return true;
+ }
+ /*.................................................................................................................*/
+ /** Called before processing a series of files.*/
+ public boolean beforeProcessingSeriesOfFiles(){
+ if (saveFile == null || okToInteractWithUser(CAN_PROCEED_ANYWAY, "Asking for file to save")){ //need to check if can proceed
+ return initFile();
+ }
+ return true;
+ }
+
+ /*.................................................................................................................*/
+ /** Called to alter file. */
+ public boolean processFile(MesquiteFile file){
+
+ if (saveFile == null || okToInteractWithUser(CAN_PROCEED_ANYWAY, "Asking for file to save")){ //need to check if can proceed
+ return initFile();
+ }
+ if (saveFile == null)
+ return false;
+ Listable[] treeVectors = proj.getFileElements(TreeVector.class);
+ if (treeVectors == null)
+ return false;
+ for (int im = 0; im < treeVectors.length; im++){
+ TreeVector trees = (TreeVector)treeVectors[im];
+ if (trees.getFile() == file){
+ for (int itree = 0; itree < trees.size(); itree++){
+ Tree t = trees.getTree(itree);
+ String description = t.writeTree(Tree.BY_NAMES);
+ MesquiteFile.appendFileContents(saveFile, "TREE 'tree " + (itree+1) + " from file " + file.getFileName() + "' = " , true);
+
+ MesquiteFile.appendFileContents(saveFile, description + StringUtil.lineEnding(), true);
+ }
+ }
+ }
+ return true;
+
+ }
+ /*.................................................................................................................*/
+ /** Called after processing a series of files.*/
+ public boolean afterProcessingSeriesOfFiles(){
+ if (saveFile == null)
+ return false;
+ MesquiteFile.appendFileContents(saveFile, StringUtil.lineEnding() + "END;" + StringUtil.lineEnding(), true);
+ return true;
+ }
+
+ /*.................................................................................................................*/
+ /** returns the version number at which this module was first released. If 0, then no version number is claimed. If a POSITIVE integer
+ * then the number refers to the Mesquite version. This should be used only by modules part of the core release of Mesquite.
+ * If a NEGATIVE integer, then the number refers to the local version of the package, e.g. a third party package*/
+ public int getVersionOfFirstRelease(){
+ return 361;
+ }
+
+ /*.................................................................................................................*/
+ public String getName() {
+ return "Compile Trees in Nexus Block in file";
+ }
+ /*.................................................................................................................*/
+ /** returns an explanation of what the module does.*/
+ public String getExplanation() {
+ return "Compiles trees from this file into a text file with a nexus tree block." ;
+ }
+
+}
+
+
diff --git a/Source/mesquite/treefarm/CopyTreesToSimpleFile/CopyTreesToSimpleFile.java b/Source/mesquite/treefarm/CopyTreesToSimpleFile/CopyTreesToSimpleFile.java
index 716db0f82..416aa26ae 100644
--- a/Source/mesquite/treefarm/CopyTreesToSimpleFile/CopyTreesToSimpleFile.java
+++ b/Source/mesquite/treefarm/CopyTreesToSimpleFile/CopyTreesToSimpleFile.java
@@ -65,6 +65,7 @@ public boolean processFile(MesquiteFile file){
Listable[] treeVectors = proj.getFileElements(TreeVector.class);
if (treeVectors == null)
return false;
+ MesquiteFile.putFileContents(saveFile, "[trees from Process Data Files] " , true);
for (int im = 0; im < treeVectors.length; im++){
TreeVector trees = (TreeVector)treeVectors[im];
if (trees.getFile() == file){
@@ -90,12 +91,12 @@ public int getVersionOfFirstRelease(){
/*.................................................................................................................*/
public String getName() {
- return "Put Trees into Simple File";
+ return "Compile Trees into Simple File";
}
/*.................................................................................................................*/
/** returns an explanation of what the module does.*/
public String getExplanation() {
- return "Puts trees from this file into a simple text file." ;
+ return "Compiles trees from this file into a simple text file." ;
}
}
diff --git a/Source/mesquite/treefarm/FAFillTreeBlock/FAFillTreeBlock.java b/Source/mesquite/treefarm/FAFillTreeBlock/FAFillTreeBlock.java
index 7aa7d46c8..2d84c7619 100644
--- a/Source/mesquite/treefarm/FAFillTreeBlock/FAFillTreeBlock.java
+++ b/Source/mesquite/treefarm/FAFillTreeBlock/FAFillTreeBlock.java
@@ -117,7 +117,7 @@ public boolean processFile(MesquiteFile file){
}
/*.................................................................................................................*/
public String getName() {
- return "Add and Fill Tree Block";
+ return "Make Trees and Add to File";
}
/*.................................................................................................................*/
/** returns an explanation of what the module does.*/
diff --git a/Source/mesquite/trees/BasicTreeWindowMaker/BasicTreeWindowMaker.java b/Source/mesquite/trees/BasicTreeWindowMaker/BasicTreeWindowMaker.java
index 3143e988d..b2cc4f991 100644
--- a/Source/mesquite/trees/BasicTreeWindowMaker/BasicTreeWindowMaker.java
+++ b/Source/mesquite/trees/BasicTreeWindowMaker/BasicTreeWindowMaker.java
@@ -4253,7 +4253,9 @@ public void notifyExtrasOfFieldTouch(Graphics g, int x, int y, int modifiers) {
private void treeChanged(boolean notifyContextListeners) {
if (tree == null || previousTree == null || undoTree == null)
return;
-
+ if (MesquiteTrunk.debugMode){
+ treeDisplay.restartChain("BTW-treeChanged " + StringUtil.getDateTimeWithSeconds());
+ }
if (tree.upToDateWithTaxa() && previousTree.upToDateWithTaxa()) {
canUndo = true;
}
diff --git a/Source/mesquite/trees/ManageTrees/ManageTrees.java b/Source/mesquite/trees/ManageTrees/ManageTrees.java
index 18c7d9781..03f397c99 100644
--- a/Source/mesquite/trees/ManageTrees/ManageTrees.java
+++ b/Source/mesquite/trees/ManageTrees/ManageTrees.java
@@ -173,6 +173,8 @@ public void removeBlockListener(MesquiteListener ml){
public MesquiteModule showElement(FileElement e){
if (e instanceof TreeVector)
return showTreesList((TreeVector)e);
+ if (e == getProject().getTreeVectors())
+ return showTreeBlocks(null);
return null;
}
public void deleteElement(FileElement e){
@@ -284,7 +286,8 @@ void reviseListeners(){
/** A method called immediately after the file has been read in.*/
public void projectEstablished() {
getFileCoordinator().addMenuItem(MesquiteTrunk.treesMenu, "-", null);
- MesquiteSubmenuSpec mmis = getFileCoordinator().addSubmenu(MesquiteTrunk.treesMenu, "List of Trees", makeCommand("showTrees", this), treesVector);
+ checkTreesVector();
+ MesquiteSubmenuSpec mmis = getFileCoordinator().addSubmenu(MesquiteTrunk.treesMenu, "List of Trees", makeCommand("showTrees", this), treesVector);
mmis.setBehaviorIfNoChoice(MesquiteSubmenuSpec.ONEMENUITEM_ZERODISABLE);
getFileCoordinator().addMenuItem(MesquiteTrunk.treesMenu, "List of Tree Blocks", makeCommand("showTreeBlocks", this));
getFileCoordinator().addMenuItem(MesquiteTrunk.treesMenu, "Delete Tree Blocks...", makeCommand("deleteTreeBlocks", this));
@@ -548,25 +551,7 @@ else if (checker.compare(this.getClass(), "Saves copies of a series of tree bloc
}
}
else if (checker.compare(this.getClass(), "Shows a list of the stored tree blocks", null, commandName, "showTreeBlocks")) {
- //Check to see if already has lister for this
- boolean found = false;
- for (int i = 0; i=0; iw--){
+ MesquiteWindow w = (MesquiteWindow)MesquiteWindow.delayedRepaintQueue.elementAt(iw);
+ if (System.currentTimeMillis()>w.drqTime){
+ if (!w.disposed() && !w.disposing)
+ w.repaintAll();
+ MesquiteWindow.delayedRepaintQueue.remove(w); //done! remove
+ }
+ }
+ }
+
public void run() {
long sleepCount = 0;
boolean reportThreads = false;
@@ -44,18 +58,28 @@ public void run() {
sleepCount = 0;
else
sleepCount++;
- try {
- Thread.sleep(sleepTime);
- }
- catch (InterruptedException e){
- Thread.currentThread().interrupt();
+
+ //sleep is down in a series of bouts. This is a kludge to let some functions happen at each bout (delayed repaint) but others be after each sleep
+ for (int iBout = 0; iBoutMesquite
Acknowledgements |
|
- Version 3.6
- 27 December 2018
|
+ Version 3.61
+ 26 December 2019
|
diff --git a/docs/Additional Mesquite Packages.html b/docs/Additional Mesquite Packages.html
index 2b0c0c073..498e60bad 100644
--- a/docs/Additional Mesquite Packages.html
+++ b/docs/Additional Mesquite Packages.html
@@ -41,8 +41,8 @@
Mesquite |
Additional Packages |
|
- Version 3.6
- 27 December 2018
|
+ Version 3.61
+ 26 December 2019
|
diff --git a/docs/Align.html b/docs/Align.html
index ddcf165ed..25688ea1d 100644
--- a/docs/Align.html
+++ b/docs/Align.html
@@ -41,8 +41,8 @@
Mesquite |
Sequence Alignment |
|
- Version 3.6
- 27 December 2018
|
+ Version 3.61
+ 26 December 2019
|
diff --git a/docs/Analyzing Continuous Characters.html b/docs/Analyzing Continuous Characters.html
index 37c94bfbc..5e5098ebe 100644
--- a/docs/Analyzing Continuous Characters.html
+++ b/docs/Analyzing Continuous Characters.html
@@ -41,8 +41,8 @@
Mesquite |
Continuous characters |
|
- Version 3.6
- 27 December 2018
|
+ Version 3.61
+ 26 December 2019
|
diff --git a/docs/Analyzing Molecular Data.html b/docs/Analyzing Molecular Data.html
index a55f21f3b..f7333722f 100644
--- a/docs/Analyzing Molecular Data.html
+++ b/docs/Analyzing Molecular Data.html
@@ -41,8 +41,8 @@
Mesquite |
Molecular Data |
|
- Version 3.6
- 27 December 2018
|
+ Version 3.61
+ 26 December 2019
|
diff --git a/docs/Ancestral States.html b/docs/Ancestral States.html
index eeefb38ca..db36c211f 100644
--- a/docs/Ancestral States.html
+++ b/docs/Ancestral States.html
@@ -41,8 +41,8 @@
Mesquite |
Ancestral States |
|
- Version 3.6
- 27 December 2018
|
+ Version 3.61
+ 26 December 2019
|
@@ -199,11 +199,13 @@
Studying the History of Character Evolution
- With a phylogenetic tree and a distribution of character states in the observed (terminal) taxa, Mesquite can attempt to reconstruct the character states at ancestral nodes. Two separate issues to consider are the method by which the reconstruction is done, and how its results are displayed to the user. Mesquite currently can use either parsimony, likelihood or Bayesian methods to reconstruct ancestral states, and has several display methods, including "Trace Character History" which paints the branches of the tree to show the reconstruction.
-We recommend highly that you examine the example files provided in the folder "Ancestral State Examples". The minimal configuration to use with these examples is "Ancestral States" (indicate this configuration under File>Activate/Deactivate Packages>Choose Configuration), but you can also leave Mesquite in its default All Installed Modules mode.
-
+ With a phylogenetic tree and a distribution of character states in the observed (terminal) taxa, Mesquite can attempt to reconstruct the character states at ancestral nodes. Two separate issues to consider are the method by which the reconstruction is done, and how its results are displayed to the user. Mesquite currently can use either parsimony, likelihood or Bayesian methods to reconstruct ancestral states, and has several methods to present the results. One of these display methods is "Trace Character History", which paints the branches of the tree to show the reconstruction; some other tools give lists of ancestral states or changes in text.
+ We recommend highly that you begin your exploration of Mesquite's character evolution tools by going through the example files provided in the folder "Ancestral State Examples" (this is provided in the "examples" folder within Mesquite_Folder. Begin with file "01-DataMatrix.nex, and then step through the examples.
+ These tools are enabled by default in Mesquite. If you do decide to alter Mesquite's configuration so that fewer modules are available, then the minimal configuration to use with these examples is "Ancestral States" (indicate this configuration under File>Activate/Deactivate Packages>Choose Configuration).
+
+
Trace Character History
- The Trace Character History facility graphically represents a history of character evolution on the tree. It is available under the Analysis:Tree menu of a tree window (e.g., the basic Tree Window, Dependent Tree Window, Mirror Tree Window, Multitree Window). If you select this you will probably be asked for a source of characters (e.g., stored characters) and areconstruction method (e.g., parsimony, likelihood, stochastic character mapping). (If you have "Use Stored Characters/Matrices by Default" turned on in the Defaults submenu if the File menu, Mesquite won't ask you and will simply use Stored Characters.) The tree will be painted to show ancestral states, and a trace legend will appear. The Trace Legend contains an important text area that gives details of the current ancestral state tracing. You can also see details of the reconstruction by switching the window to Text mode using the menu item Window>View Modes>Text.
+ The Trace Character History facility graphically represents a history of character evolution on the tree. It is available under the Analysis:Tree menu of a tree window (e.g., the basic Tree Window, Dependent Tree Window, Mirror Tree Window, Multitree Window). If you select this you will probably be asked for a source of characters (e.g., stored characters) and a reconstruction method (e.g., parsimony, likelihood, stochastic character mapping). (If you have "Use Stored Characters/Matrices by Default" turned on in the Defaults submenu if the File menu, Mesquite won't ask you and will simply use Stored Characters.) The tree will be painted to show ancestral states, and a trace legend will appear. The Trace Legend contains an important text area that gives details of the current ancestral state tracing. You can also see details of the reconstruction by switching the window to Text mode using the menu item Window>View Modes>Text.
For categorical and molecular data, you can change the colors used in Trace Character by double clicking on the color rectangle in the Trace Legend. Revert to Default Colors is available in the Trace menu.
diff --git a/docs/Are strepsipterans related to flies.html b/docs/Are strepsipterans related to flies.html
index 9aec5607c..0001f76a5 100644
--- a/docs/Are strepsipterans related to flies.html
+++ b/docs/Are strepsipterans related to flies.html
@@ -41,8 +41,8 @@
Mesquite |
Hypothesis testing |
|
- Version 3.6
- 27 December 2018
|
+ Version 3.61
+ 26 December 2019
|
diff --git a/docs/Beginning Mesquite.html b/docs/Beginning Mesquite.html
index 8b9f8fa62..8f9afa6e2 100644
--- a/docs/Beginning Mesquite.html
+++ b/docs/Beginning Mesquite.html
@@ -41,8 +41,8 @@
Mesquite |
Beginning Mesquite |
|
- Version 3.6
- 27 December 2018
|
+ Version 3.61
+ 26 December 2019
|
diff --git a/docs/Bugs and Troubleshooting.html b/docs/Bugs and Troubleshooting.html
index 0fe24d905..888118108 100644
--- a/docs/Bugs and Troubleshooting.html
+++ b/docs/Bugs and Troubleshooting.html
@@ -41,8 +41,8 @@
Mesquite |
Bugs and Troubleshooting |
|
- Version 3.6
- 27 December 2018
|
+ Version 3.61
+ 26 December 2019
|
diff --git a/docs/Character Evolution.html b/docs/Character Evolution.html
index fad422ca6..1ecf1abf9 100644
--- a/docs/Character Evolution.html
+++ b/docs/Character Evolution.html
@@ -41,8 +41,8 @@
Mesquite |
Character Evolution |
|
- Version 3.6
- 27 December 2018
|
+ Version 3.61
+ 26 December 2019
|
diff --git a/docs/Characters & Matrices.html b/docs/Characters & Matrices.html
index 21234c540..09acee7ed 100644
--- a/docs/Characters & Matrices.html
+++ b/docs/Characters & Matrices.html
@@ -41,8 +41,8 @@
Mesquite |
Characters & Matrices |
|
- Version 3.6
- 27 December 2018
|
+ Version 3.61
+ 26 December 2019
|
diff --git a/docs/Charts.html b/docs/Charts.html
index 48da9f023..d322b21fc 100644
--- a/docs/Charts.html
+++ b/docs/Charts.html
@@ -41,8 +41,8 @@
Mesquite |
Charts |
|
- Version 3.6
- 27 December 2018
|
+ Version 3.61
+ 26 December 2019
|
diff --git a/docs/Contact Us.html b/docs/Contact Us.html
index 81a081852..a80cd0478 100644
--- a/docs/Contact Us.html
+++ b/docs/Contact Us.html
@@ -41,8 +41,8 @@
Mesquite |
Contact Us |
|
- Version 3.6
- 27 December 2018
|
+ Version 3.61
+ 26 December 2019
|
diff --git a/docs/Developers Documentation.html b/docs/Developers Documentation.html
index a58016b70..2d3824c66 100644
--- a/docs/Developers Documentation.html
+++ b/docs/Developers Documentation.html
@@ -41,8 +41,8 @@
Mesquite |
Developer's Documentation |
|
- Version 3.6
- 27 December 2018
|
+ Version 3.61
+ 26 December 2019
|
diff --git a/docs/Developers Reference.html b/docs/Developers Reference.html
index fbfbe1cfc..049717230 100644
--- a/docs/Developers Reference.html
+++ b/docs/Developers Reference.html
@@ -41,8 +41,8 @@
Mesquite |
Developer's Reference |
|
- Version 3.6
- 27 December 2018
|
+ Version 3.61
+ 26 December 2019
|
diff --git a/docs/Development Team.html b/docs/Development Team.html
index ce66e3d12..d2b6e5c23 100644
--- a/docs/Development Team.html
+++ b/docs/Development Team.html
@@ -41,8 +41,8 @@
Mesquite |
Development Team |
|
- Version 3.6
- 27 December 2018
|
+ Version 3.61
+ 26 December 2019
|
diff --git a/docs/Diversification.html b/docs/Diversification.html
index a9d895e9e..44141c1e3 100644
--- a/docs/Diversification.html
+++ b/docs/Diversification.html
@@ -41,8 +41,8 @@
Mesquite |
Diversification |
|
- Version 3.6
- 27 December 2018
|
+ Version 3.61
+ 26 December 2019
|
diff --git a/docs/Documenting Your Work.html b/docs/Documenting Your Work.html
index 80fd64167..f77d92553 100644
--- a/docs/Documenting Your Work.html
+++ b/docs/Documenting Your Work.html
@@ -41,8 +41,8 @@
Mesquite |
Documenting Your Work |
|
- Version 3.6
- 27 December 2018
|
+ Version 3.61
+ 26 December 2019
|
diff --git a/docs/Example Files.html b/docs/Example Files.html
index 0b9c07332..6a2dd26ce 100644
--- a/docs/Example Files.html
+++ b/docs/Example Files.html
@@ -41,8 +41,8 @@
Mesquite |
Example Files |
|
- Version 3.6
- 27 December 2018
|
+ Version 3.61
+ 26 December 2019
|
diff --git a/docs/FAQ.html b/docs/FAQ.html
index af4ef6175..67bba4377 100644
--- a/docs/FAQ.html
+++ b/docs/FAQ.html
@@ -41,8 +41,8 @@
Mesquite |
FAQ |
|
- Version 3.6
- 27 December 2018
|
+ Version 3.61
+ 26 December 2019
|
diff --git a/docs/Files.html b/docs/Files.html
index 33149dc7c..77b27f631 100644
--- a/docs/Files.html
+++ b/docs/Files.html
@@ -41,8 +41,8 @@
Mesquite |
Files |
|
- Version 3.6
- 27 December 2018
|
+ Version 3.61
+ 26 December 2019
|
diff --git a/docs/Gene Trees.html b/docs/Gene Trees.html
index a052de5f2..c0c6fc913 100644
--- a/docs/Gene Trees.html
+++ b/docs/Gene Trees.html
@@ -41,8 +41,8 @@
Mesquite |
Gene Trees |
|
- Version 3.6
- 27 December 2018
|
+ Version 3.61
+ 26 December 2019
|
diff --git a/docs/Getting Help.html b/docs/Getting Help.html
index ddec24038..09f34d12d 100644
--- a/docs/Getting Help.html
+++ b/docs/Getting Help.html
@@ -41,8 +41,8 @@
Mesquite |
Getting Help |
|
- Version 3.6
- 27 December 2018
|
+ Version 3.61
+ 26 December 2019
|
diff --git a/docs/Glossary.html b/docs/Glossary.html
index e435f49ae..ceeb828f5 100644
--- a/docs/Glossary.html
+++ b/docs/Glossary.html
@@ -41,8 +41,8 @@
Mesquite |
Glossary |
|
- Version 3.6
- 27 December 2018
|
+ Version 3.61
+ 26 December 2019
|
diff --git a/docs/History of Mesquite.html b/docs/History of Mesquite.html
index 4777d4cee..09678edca 100644
--- a/docs/History of Mesquite.html
+++ b/docs/History of Mesquite.html
@@ -41,8 +41,8 @@
Mesquite |
History of Mesquite |
|
- Version 3.6
- 27 December 2018
|
+ Version 3.61
+ 26 December 2019
|
diff --git a/docs/History of New Features.html b/docs/History of New Features.html
index 8a65d6f08..f01d6b012 100644
--- a/docs/History of New Features.html
+++ b/docs/History of New Features.html
@@ -41,8 +41,8 @@
Mesquite |
History of New Features |
|
- Version 3.6
- 27 December 2018
|
+ Version 3.61
+ 26 December 2019
|
@@ -208,6 +208,40 @@ Features to come in the next release version of Mesquite are listed on this web page. These new features and bug fixes are already contained in latest source code in the development branch of the MesquiteProject/MesquiteCore repository on GitHub.
+ Next Version
+ New Features
+
+ Bug Fixes and Workarounds
+
+
+ Version 3.61
+ New Features
+
+ - Refine Groups by Codon Position added (in List of Characters window, drop-down menu by touching on the title of the Groups column). This will create a new character partition that takes the current character partition, and if any existing group has different codon positions in it, will assign each codon position within that group to a separate group. For example, if you have two protein coding genes in the matrix, say Gene1 and Gene2, and the first 900 characters are assigned to a character group called Gene1, and the last 600 characters to a group called Gene2, and within each gene codon positions are specified, then using this tool there will be six group created: Gene1_1, for all of the first positions in Gene1, Gene1_2, for all the second positions in Gene1, and then similarly Gene1_3, Gene2_1, Gene2_2, and Gene2_3.
+ - Added "Select by List in Clipboard" to List Windows. If you have a list of names in the Clipboard (as text, one name per line), and go to the list window, and use this, it will select all rows in the list window whose names match a name in that list of names in the Clipboard.
+ - Added ability to color cells and select rows based upon values in Character Matrix List Window
+ - As a minor change, tree windows now have a default orientation of "Right", i.e., with the root of the tree on the left and taxon names on the right.
+ - The Project Panel (on the left of a Mesquite window) has been improved. Among other things, it now lists matrices and tree blocks only if there are less than a specified number (by default 16).
+ - A few new calculators were added for taxa, matrices, and trees: Number of Matrices with Data for Taxon counts, for a taxon, in how many matrices the taxon has data. This can be used, e.g., to see how abundant is data for a taxon. Number of Selected Taxa with Data in Matrix counts, for a matrix, how many of the currently selected taxa have data in that matrix. This can be used, e.g. to filter matrices that are too sparsely represented by taxa. Ratio of Longest Branches calculates, for a tree, the ratio of the two longest branches in a tree. This can be used, e.g., to find trees suggesting paralogy.
+ - Some functions (modules) used in Process Data Files were renamed for clarity.
+ - Other minor improvements.
+
+
+ Bug Fixes and Workarounds
+
+
+ - The List of Trees menu item was accidentally removed in version 3.6. Now restored.
+ - Significantly increased the speed of matrix concatenation and general aspects of list windows, including sorting.
+ - Fixed amino acid output in Trace All Changes
+ - Corrected handling of terminal ? in Gaps to and from Missing alterer.
+ - Copy/paste now works as expected in the Notes window.
+ - Miscellaneous small bugs fixed.
+
+
Version 3.6
New Features
diff --git a/docs/How Mesquite Works.html b/docs/How Mesquite Works.html
index 313902458..3d4322623 100644
--- a/docs/How Mesquite Works.html
+++ b/docs/How Mesquite Works.html
@@ -41,8 +41,8 @@
Mesquite |
How Mesquite Works |
|
- Version 3.6
- 27 December 2018
|
+ Version 3.61
+ 26 December 2019
|
diff --git a/docs/How to Cite Mesquite.html b/docs/How to Cite Mesquite.html
index 5dac4e763..102633d9c 100644
--- a/docs/How to Cite Mesquite.html
+++ b/docs/How to Cite Mesquite.html
@@ -41,8 +41,8 @@
Mesquite |
How to Cite Mesquite |
|
- Version 3.6
- 27 December 2018
|
+ Version 3.61
+ 26 December 2019
|
@@ -213,8 +213,8 @@