Skip to content

Commit

Permalink
Merge pull request #78 from MesquiteProject/development
Browse files Browse the repository at this point in the history
Release version 3.40 Build 877
  • Loading branch information
wmaddisn authored Jan 27, 2018
2 parents 8a39ed3 + b24def8 commit fd8085f
Show file tree
Hide file tree
Showing 54 changed files with 1,546 additions and 736 deletions.
12 changes: 10 additions & 2 deletions .classpath
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,22 @@
<classpathentry exported="true" kind="lib" path="jars/MRJToolkitStubs.zip"/>
<classpathentry exported="true" kind="lib" path="jars/pal.zip"/>
<classpathentry exported="true" kind="lib" path="jars/commons-httpclient-3.1.jar"/>
<classpathentry exported="true" kind="lib" path="jars/dom4j-1.6.1.jar"/>
<classpathentry exported="true" kind="lib" path="jars/commons-lang-2.3.jar"/>
<classpathentry excluding="docs/mesquite/BeanTree/" kind="src" path="Resources"/>
<classpathentry kind="src" path="Source"/>
<classpathentry exported="true" kind="lib" path="jars/commons-codec-1.6.jar"/>
<classpathentry exported="true" kind="lib" path="jars/gson-2.6.2.jar"/>
<classpathentry exported="true" kind="lib" path="jars/httpclient-4.3.6.jar"/>
<classpathentry exported="true" kind="lib" path="jars/commons-io-2.5.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry exported="true" kind="lib" path="jars/commons-lang3-3.5.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry exported="true" kind="lib" path="jars/commons-logging-1.1.3.jar"/>
<classpathentry exported="true" kind="lib" path="jars/commons-math3-3.6.1.jar"/>
<classpathentry kind="lib" path="jars/byte-buddy-agent-1.7.8.jar"/>
<classpathentry exported="true" kind="lib" path="jars/dom4j-2.0.2.jar"/>
<classpathentry kind="output" path="Mesquite_Folder"/>
</classpath>
9 changes: 7 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
Mesquite_Folder/
# Workspace files #
###################
*.iml
.project
.settings/

# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so

Expand All @@ -18,7 +23,6 @@ Mesquite_Folder/
*.iso
*.rar
*.tar
*.zip

# Logs and databases #
######################
Expand All @@ -39,3 +43,4 @@ Thumbs.db
.gitignore
/.classpath
/.gitignore
/target/
1 change: 1 addition & 0 deletions Additional Files/classpaths.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
../../Cartographer/Mesquite_Folder
4 changes: 0 additions & 4 deletions Additional Files/classpaths.xml

This file was deleted.

Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
java -Xmx1000M -Xss4m -Djava.library.path=lib -Djri.ignore.ule="yes" -jar Mesquite.jar
Binary file removed Mesquite_Folder/jars/dom4j-1.6.1.jar
Binary file not shown.
478 changes: 294 additions & 184 deletions Source/mesquite/Mesquite.java

Large diffs are not rendered by default.

14 changes: 8 additions & 6 deletions Source/mesquite/align/ClustalAlign/ClustalAlign.java
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,11 @@ public String getExplanation() {
public String getProgramName(){
return "ClustalW";
}

/*.................................................................................................................*/
public boolean useDefaultStdOutFileName() {
return true;
}

/*.................................................................................................................*/
public String getProgramCommand(){
if (MesquiteTrunk.isWindows())
Expand All @@ -90,13 +94,11 @@ public String getDefaultProgramOptions(){
}

public void appendDefaultOptions(StringBuffer shellScript, String inFilePath, String outFilePath, MolecularData data) {
shellScript.append(" -infile=" + StringUtil.protectFilePathForUnix(inFilePath) + " -align -output=pir ");
shellScript.append(" -infile=" + StringUtil.protectFilePathForUnix(inFilePath) + " -align -output=pir -outfile="+ StringUtil.protectFilePathForUnix(outFilePath) );
if (data instanceof ProteinData)
shellScript.append("-type=protein ");
shellScript.append(" -type=protein ");
else
shellScript.append("-type=dna ");
if (scriptBased)
shellScript.append("-outfile="+StringUtil.protectFilePathForUnix(outFilePath));
shellScript.append(" -type=dna ");

}

Expand Down
26 changes: 15 additions & 11 deletions Source/mesquite/align/ShiftOtherToMatch/ShiftOtherToMatch.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,27 +73,31 @@ public boolean queryOptions(int it, int max) {
MesquiteInteger buttonPressed = new MesquiteInteger(1);
ExtensibleDialog queryFilesDialog = new ExtensibleDialog(containerOfModule(), "Shift Other To Match",buttonPressed); //MesquiteTrunk.mesquiteTrunk.containerOfModule()
queryFilesDialog.addLabel("Shift Other To Match");

if (!MesquiteInteger.isCombinable(it1) || !MesquiteInteger.isCombinable(it2) || it1>max || it2>max){
if (it>=max) {
it1=1;
} else
it1 = it+2; // it+1 to bump it over one, +2 because of the translation to 1-based numbering
it2=max;
if (it>=max) { // then it1 has to go back to first taxon
it1=0;
it2=it-1;
} else {
it1 = it+1; // it+1 to bump it over selected one
it2=max; //
}
// if (it2==it)
// it2--;
}
IntegerField it1Field = queryFilesDialog.addIntegerField ("First Sequence", it1, 4, 1, max);
IntegerField it2Field = queryFilesDialog.addIntegerField ("Last Sequence", it2, 4, 1, max);
if (it2<it1)
it2=it1;
IntegerField it1Field = queryFilesDialog.addIntegerField ("First Sequence",(it1+1), 4, 1, max+1);
IntegerField it2Field = queryFilesDialog.addIntegerField ("Last Sequence", (it2+1), 4, 1, max+1);
DoubleField matchFractionField = queryFilesDialog.addDoubleField ("Fraction of Match", matchFraction, 6, 0.00001, 1.0);

Checkbox reverseSequencesCheckBox = queryFilesDialog.addCheckBox("Reverse complement sequences if necessary", reverseComplementIfNecessary);

queryFilesDialog.completeAndShowDialog(true);
if (buttonPressed.getValue()==0) {
matchFraction = matchFractionField.getValue();
it1 = it1Field.getValue();
it2 = it2Field.getValue();
it1 = it1Field.getValue()-1;
it2 = it2Field.getValue()-1;
reverseComplementIfNecessary = reverseSequencesCheckBox.getState();
storePreferences();
}
Expand Down Expand Up @@ -143,7 +147,7 @@ public boolean alterData(CharacterData data, MesquiteTable table, UndoReference
boolean match=false;
int totalAddedToStart = 0;
boolean someAdded = false;
for (int it = it1-1; it<=it2-1; it++) { // must subtract 1 off of it1 and it2 as these are 1-based numbers
for (int it = it1; it<=it2; it++) {
if (row.getValue()!=it) {
match = findMatch(data,table, row.getValue(), firstColumn.getValue(), lastColumn.getValue(), it,matchStart,matchEnd);
if (reverseComplementIfNecessary && !match && data instanceof DNAData) {
Expand Down
9 changes: 8 additions & 1 deletion Source/mesquite/align/lib/ExternalSequenceAligner.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ else if (externalRunner!=null)
return "";
}
/*.................................................................................................................*/
public boolean useDefaultStdOutFileName() {
return false;
}
/*.................................................................................................................*/
public String getStdOut() {
if (scriptBased){
if (scriptRunner!=null)
Expand Down Expand Up @@ -384,7 +388,10 @@ else if (!(firstTaxon==0 && lastTaxon==matrix.getNumTaxa())) { // we are doing
arguments=StringUtil.stripBoundingWhitespace(arguments);
externalRunner = new ExternalProcessManager(this, rootDir, getProgramPath(), arguments,getName(), outputFilePaths, this, this, true);
//ShellScriptUtil.changeDirectory(rootDir, rootDir);
externalRunner.setStdOutFileName(outFileName);
if (useDefaultStdOutFileName())
externalRunner.setStdOutFileName(ShellScriptRunner.stOutFileName);
else
externalRunner.setStdOutFileName(outFileName);
success = externalRunner.executeInShell();
if (success)
success = externalRunner.monitorAndCleanUpShell(progressIndicator);
Expand Down
18 changes: 11 additions & 7 deletions Source/mesquite/categ/lib/CategoricalData.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

import mesquite.lib.*;
import mesquite.lib.characters.*;
import mesquite.lib.characters.CharacterData;
import mesquite.lib.duties.*;

/* ======================================================================== */
Expand Down Expand Up @@ -322,6 +323,7 @@ public CategoricalData getDataCopy(){
data.resetCellMetadata();
return data;
}

/*.......................................... CategoricalData ..................................................*/
/**clone this CharacterData and return new copy. Does not clone the associated specs sets etc.*/ //TODO: here should use super.setToClone(data) to handle specssets etc.???
public CharacterData cloneData(){
Expand Down Expand Up @@ -1957,15 +1959,17 @@ public void equalizeCharacter(CharacterData oData, int oic, int ic){
//state names
if (oData instanceof CategoricalData){
CategoricalData cData = (CategoricalData)oData;
if (cData.stateNames == null)
stateNames = null;
if (cData.stateNames == null) { // incoming stateNames is null
if (stateNames!=null) // this state names is not null, so lets set the values to null
for (int is = 0; is<= CategoricalState.maxCategoricalState; is++)
setStateName(ic, is, null);
}
else {
for (int is = 0; is<= CategoricalState.maxCategoricalState; is++) {
if (cData.hasStateName(oic, is)){
String s = cData.getStateName(oic, is);
if (!StringUtil.blank(s))
setStateName(ic, is, s);
}
if (cData.hasStateName(oic, is))
setStateName(ic, is, cData.getStateName(oic, is));
else
setStateName(ic, is, null);
}
}
for (int is = 0; is<= CategoricalState.maxCategoricalState; is++) {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit fd8085f

Please sign in to comment.