Skip to content

Commit

Permalink
Merge pull request #26 from wmaddisn/master
Browse files Browse the repository at this point in the history
Pender Harbour Hackathon Friday
  • Loading branch information
DMaddison committed Aug 22, 2014
2 parents 176d983 + cdc8d77 commit 8b37c8d
Show file tree
Hide file tree
Showing 93 changed files with 897 additions and 807 deletions.
2 changes: 2 additions & 0 deletions Additional Files/menuSquares.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
◼ ◻ ❑ ⬒ ▣
◀ ▶ ◢ ◣ ◥ ◤ ◇ ◆ ◈ ◊
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file added Resources/images/miniScroll.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Resources/images/miniscrollHoriz.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Resources/images/miniscrollVert.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Resources/images/small.top.arrow.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 5 additions & 17 deletions Source/mesquite/Mesquite.java
Original file line number Diff line number Diff line change
Expand Up @@ -1188,11 +1188,8 @@ private void searchWeb(String queryTerm, MesquiteBoolean addMesquiteToSearch, Me
/*New code added April.02.07 oliver*/ //TODO: delete new code comments
/*.................................................................................................................*/
private void openMesquiteFAQ(){
String manualPath = mesquiteDirectoryPath + "docs/mesquite" + MesquiteFile.fileSeparator + "Help/MesquiteFAQ.html" ;
File testing = new File(manualPath);
if (testing.exists()) {
String manualPath = mesquiteWebSite + "/FAQ" ;
showWebPage(manualPath, false);
}
}
/*End new code added April.02.07 oliver*/

Expand Down Expand Up @@ -2013,27 +2010,18 @@ else if (checker.compare(this.getClass(), "Shows web page of available commands
else if (checker.compare(this.getClass(), "Shows home page of Mesquite", null, commandName, "showHomePage")) {
if (MesquiteTrunk.isApplet())
return null;
if (!CommandChecker.documentationComposed) {
CommandChecker cchecker = new CommandChecker();
cchecker.composeDocumentation();
}
String manualPath = "http://mesquiteproject.wikispaces.com" ;

String manualPath = mesquiteWebSite;
//File testing = new File(manualPath);
showWebPage(manualPath, false);

}
else if (checker.compare(this.getClass(), "Shows Support page of Mesquite manual", null, commandName, "showSupport")) {
if (MesquiteTrunk.isApplet())
return null;
if (!CommandChecker.documentationComposed) {
CommandChecker cchecker = new CommandChecker();
cchecker.composeDocumentation();
}
String manualPath = mesquiteDirectoryPath + "docs/mesquite" + MesquiteFile.fileSeparator + "support.html" ;
File testing = new File(manualPath);
if (testing.exists()) {

String manualPath = mesquiteWebSite + "/Getting+Help" ;
showWebPage(manualPath, false);
}
}
else if (checker.compare(this.getClass(), "Sets whether the Mesquite window appears automatically when no windows are showing", "[on or off]", commandName, "windowAutoShow")){
MesquiteWindow.autoShow = MesquiteBoolean.fromOffOnString(ParseUtil.getFirstToken(arguments, stringPos));
Expand Down
12 changes: 0 additions & 12 deletions Source/mesquite/align/AlignToDropped/AlignToDropped.java
Original file line number Diff line number Diff line change
Expand Up @@ -142,18 +142,6 @@ private boolean alignTouchedToDropped(int rowToAlign, int recipientRow){
long[] newAlignment = Long2DArray.extractRow(aligned,1);

int[] newGaps = aligner.getGapInsertionArray();
/* if (newGaps!=null) {
int total = 0;
for (int i=0; i<newGaps.length; i++) {
if (newGaps[i]!=0)
Debugg.println(" " + i + " " + newGaps[i]);
// if (newGaps[i]<0)
// newGaps[i]=0;
total += newGaps[i];
}
//Debugg.println("total newGaps: " + total);
}
*/
if (newGaps!=null)
alignUtil.insertNewGaps((MolecularData)data, newGaps, aligner.getPreSequenceTerminalFlaggedGap(), aligner.getPostSequenceTerminalFlaggedGap());
Rectangle problem = alignUtil.forceAlignment((MolecularData)data, 0, data.getNumChars()-1, rowToAlign, rowToAlign, 1, aligned);
Expand Down
4 changes: 2 additions & 2 deletions Source/mesquite/align/MAFFTAlign/MAFFTAlign.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public boolean isSubstantive(){
}
/*.................................................................................................................*/
public boolean isPrerelease(){
return true; //put release version
return false;
}
/*.................................................................................................................*/
public String getName() {
Expand Down Expand Up @@ -262,7 +262,7 @@ public String getImportExtension() {
* 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;
return 300;
}

}
10 changes: 0 additions & 10 deletions Source/mesquite/align/lib/AlignmentHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,6 @@ long[][] ReInsertGaps (int k, int[] followsGapSize, int totalGapChars, boolean s
gappedSeq2return[i+usedGaps][1] = inputSequence[i][1] ;
}

/* if (gapInsertionArray!=null) {
int total = 0;
for (int m=0; m<gapInsertionArray.length; m++) {
if (gapInsertionArray[m]!=0)
Debugg.println("||| " + m + " " + gapInsertionArray[m]);
}
Debugg.println("||| total newGaps: " + total);
}
*/

return gappedSeq2return;
}

Expand Down
3 changes: 0 additions & 3 deletions Source/mesquite/align/lib/PairwiseAligner.java
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,6 @@ public long[][] getAlignment(MolecularData data1, int it1, MolecularData data2,
/** This method returns a 2d-long array ([site][taxon]) representing the alignment of the sequences identified by the "taxon" and "site" arguments.
* If object has been told to retain gaps, gaps in taxon1 will remain intact (new ones may be added)*/
public long[][] alignSequences(MCategoricalDistribution data, int taxon1, int taxon2, int firstSite, int lastSite, boolean returnAlignment, MesquiteNumber score) {
// Debugg.println("\n\n****** alignSequences, taxon1: "+ taxon1 + ", taxon2: "+ taxon2 + ", lastSite: "+ lastSite + ", returnAlignment: "+ returnAlignment);
if (lastSite - firstSite+1 <0 || !MesquiteInteger.isCombinable(firstSite) || !MesquiteInteger.isCombinable(lastSite)){
firstSite = 0;
lastSite = data.getNumChars()-1;
Expand All @@ -492,8 +491,6 @@ public long[][] alignSequences(MCategoricalDistribution data, int taxon1, int ta
}
CategoricalState state=(CategoricalState)(data.getParentData().makeCharacterState());

// Debugg.println(" firstSite: "+ firstSite + ", lastSite: "+ lastSite);

long[][] aligned = alignSequences(extracted1, extracted2, returnAlignment, score);

return aligned;
Expand Down
10 changes: 10 additions & 0 deletions Source/mesquite/basic/BasicStringMatcher/BasicStringMatcher.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,15 @@ public String getExplanation() {
public boolean useDefaultMatching() {
return true;
}
public boolean isPrerelease() {
return false;
}
/*.................................................................................................................*/
/** 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 300;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ else if (checker.compare(this.getClass(), "Jumps to next project recorded", null
while (getProject().developing)
;
String openCommand = "openFile ";
if (StringUtil.startsWithIgnoreCase(nextProjectName,"http:") || !getProject().getHomeFile().isLocal())
if (StringUtil.startsWithIgnoreCase(nextProjectName,"http") || !getProject().getHomeFile().isLocal())
openCommand = "openURL ";
String commands = "newThread; getProjectID; Integer.id *It; tell Mesquite; getWindowAutoShow; String.was *It; windowAutoShow off; closeProjectByID *Integer.id; " + openCommand;
commands += StringUtil.tokenize(MesquiteFile.composePath(getProject().getHomeDirectoryName(), nextProjectName)) + "; ifNotExists It; showAbout; endIf; windowAutoShow *String.was; endTell;";
Expand All @@ -150,7 +150,7 @@ else if (checker.compare(this.getClass(), "Jumps to previous project recorded",


String openCommand = "openFile ";
if (StringUtil.startsWithIgnoreCase(prevProjectName,"http:") || !getProject().getHomeFile().isLocal())
if (StringUtil.startsWithIgnoreCase(prevProjectName,"http") || !getProject().getHomeFile().isLocal())
openCommand = "openURL ";

String commands = "newThread; getProjectID; Integer.id *It; tell Mesquite; getWindowAutoShow; String.was *It; windowAutoShow off; closeProjectByID *Integer.id; " + openCommand;
Expand All @@ -169,7 +169,7 @@ else if (checker.compare(this.getClass(), "Jumps to project", null, commandName,
while (getProject().developing)
;
String openCommand = "openFile ";
if (StringUtil.startsWithIgnoreCase(path,"http:") || !getProject().getHomeFile().isLocal())
if (StringUtil.startsWithIgnoreCase(path,"http") || !getProject().getHomeFile().isLocal())
openCommand = "openURL ";
String commands = "newThread; getProjectID; Integer.id *It; tell Mesquite; getWindowAutoShow; String.was *It; windowAutoShow off; closeProjectByID *Integer.id; " + openCommand;
commands += StringUtil.tokenize(MesquiteFile.composePath(getProject().getHomeDirectoryName(), path)) + "; ifNotExists It; showAbout; endIf; windowAutoShow *String.was; endTell;";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public class ManageTaxaPartitions extends SpecsSetManager {
/*.................................................................................................................*/
public boolean startJob(String arguments, Object condition, boolean hiredByName) {
groups = new TaxaGroupVector();
getProject().addFileElement(groups);
return true;
}

Expand Down Expand Up @@ -99,8 +100,10 @@ public void notifyOfGroupChange(TaxaGroup e){
}
public NexusBlock elementAdded(FileElement e){
if (e instanceof TaxaGroup){

if (groups.indexOf(e)<0) {
groups.addElement(e, false);
groups.addElement(e, true);
e.addListener(groups);
}
e.setManager(this);
return null;
Expand All @@ -112,7 +115,7 @@ else if (e!=null && e instanceof Taxa){
}
public void elementDisposed(FileElement e){
if (groups !=null)
groups.removeElement(e, false);
groups.removeElement(e, true);
}
public void deleteElement(FileElement e){
if (e instanceof TaxaGroup){
Expand Down Expand Up @@ -141,7 +144,9 @@ public void deleteElement(FileElement e){
if (changed)
taxa.notifyListeners(this, new Notification(MesquiteListener.PARTS_CHANGED));
}
getProject().removeFileElement(e);//must remove first, before disposing
groups.removeElement(e, true);
e.dispose();
}
}
public Class getElementClass(){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,10 @@ public boolean alterName(Taxa taxa, int it){

if (taxa!=currentTaxa){
currentTaxa=taxa;
if (currentPartition==null)
currentPartition = (TaxaPartition)taxa.getCurrentSpecsSet(TaxaPartition.class);
currentPartition=null;
}
if (currentPartition==null)
currentPartition = (TaxaPartition)taxa.getCurrentSpecsSet(TaxaPartition.class);
if (currentPartition!=null){
tg = currentPartition.getTaxaGroup(it);
}
Expand Down Expand Up @@ -84,14 +85,14 @@ public String getExplanation() {
}
/*.................................................................................................................*/
public boolean isPrerelease(){
return true;
return false;
}
/*.................................................................................................................*/
/** 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;
return 300;
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
/* Mesquite source code. Copyright 2005 and onward, David Maddison and Wayne 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.orgThis 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.basic.VoucherInfoCoordinator; import mesquite.lib.*;public class VoucherInfoCoordinator extends VoucherInfoCoord { public void getEmployeeNeeds(){ //This gets called on startup to harvest information; override this and inside, call registerEmployeeNeed EmployeeNeed e = registerEmployeeNeed(VoucherInfoSource.class, "Voucher information is obtained from a source.", "This is activated automatically."); } /*.................................................................................................................*/ public boolean startJob(String arguments, Object condition, boolean hiredByName) { hireAllEmployees(VoucherInfoSource.class); return true; } public VoucherInfo getVoucherInfo(String sourceID, String id){ if (sourceID == null || id == null) return null; EmployeeVector v = getEmployeeVector(); for (int i = 0; i<v.size(); i++){ if (v.elementAt(i) instanceof VoucherInfoSource){ VoucherInfoSource vis = (VoucherInfoSource)v.elementAt(i); if (vis.handlesDatabase(sourceID)){ return vis.getVoucherInfo(sourceID, id); } } } return null; } /*.................................................................................................................*/ public String getName() { return "Coordinator of voucher information"; } /*.................................................................................................................*/ public boolean isPrerelease(){ return false; } /*.................................................................................................................*/ /** 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 -1; } /*.................................................................................................................*/ /** returns whether this module is requesting to appear as a primary choice */ public boolean requestPrimaryChoice(){ return true; } /*.................................................................................................................*/ /** returns an explanation of what the module does.*/ public String getExplanation() { return "Finds suppliers of voucher information." ; }}
/* Mesquite source code. Copyright 2005 and onward, David Maddison and Wayne 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.orgThis 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.basic.VoucherInfoCoordinator; import mesquite.lib.*;public class VoucherInfoCoordinator extends OTUIDCodeInfoCoord { public void getEmployeeNeeds(){ //This gets called on startup to harvest information; override this and inside, call registerEmployeeNeed EmployeeNeed e = registerEmployeeNeed(OTUIDCodeInfoSource.class, "Voucher information is obtained from a source.", "This is activated automatically."); } /*.................................................................................................................*/ public boolean startJob(String arguments, Object condition, boolean hiredByName) { hireAllEmployees(OTUIDCodeInfoSource.class); return true; } public VoucherInfoFromOTUIDDB getVoucherInfo(String sourceID, String id){ if (sourceID == null || id == null) return null; EmployeeVector v = getEmployeeVector(); for (int i = 0; i<v.size(); i++){ if (v.elementAt(i) instanceof OTUIDCodeInfoSource){ OTUIDCodeInfoSource vis = (OTUIDCodeInfoSource)v.elementAt(i); if (vis.handlesDatabase(sourceID)){ return vis.getVoucherInfo(sourceID, id); } } } return null; } /*.................................................................................................................*/ public String getName() { return "Coordinator of voucher information"; } /*.................................................................................................................*/ public boolean isPrerelease(){ return false; } /*.................................................................................................................*/ /** 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 -1; } /*.................................................................................................................*/ /** returns whether this module is requesting to appear as a primary choice */ public boolean requestPrimaryChoice(){ return true; } /*.................................................................................................................*/ /** returns an explanation of what the module does.*/ public String getExplanation() { return "Finds suppliers of voucher information." ; }}
Expand Down
Loading

0 comments on commit 8b37c8d

Please sign in to comment.