Skip to content

Commit

Permalink
Merge pull request #137 from biocodellc/develop
Browse files Browse the repository at this point in the history
merging develop into master
  • Loading branch information
jdeck88 authored Dec 28, 2022
2 parents dfa3fca + de38ab1 commit 4843694
Show file tree
Hide file tree
Showing 34 changed files with 490 additions and 159 deletions.
8 changes: 8 additions & 0 deletions JBD_readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,12 @@ there is probably a more elegant way to proceed here but this is what i've found
# only run from the command line
```
./gradlew quickCreatePlugin
```

There may be errors related to running gradle from the command-line, in which case we want to invoke sdk-specific versions of gradle and/or java:

```
sdk use java 11.0.17-amzn
sdk use gradle 5.6.4
```

6 changes: 3 additions & 3 deletions PluginVersions.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<PluginVersions>
<LatestVersion>3.0.15</LatestVersion>
<LatestVersionURL>https://github.com/biocodellc/biocode-lims/releases/download/3.0.15/BiocodePlugin_3_0_15.gplugin</LatestVersionURL>
<ReleaseNotes>==Biocode Plugin 3.0.15 - -24 Feb 2021==
<LatestVersion>3.0.18</LatestVersion>
<LatestVersionURL>https://github.com/biocodellc/biocode-lims/releases/download/3.0.18/BiocodePlugin_3_0_18.gplugin</LatestVersionURL>
<ReleaseNotes>==Biocode Plugin 3.0.18 - -27 Dec 2022==
</ReleaseNotes>
<ExtraInformation/>
</PluginVersions>
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public String getErrors() {
if(errors != null) {
return "<p>The server configuration file is located at: " +
LIMSInitializationListener.getPropertiesFile().getAbsolutePath() + "</p>" +
"<p>Please report any errors to [email protected]</p>" +
"<p>Please report any errors to [email protected]</p>" +
"<p>" + errors + "</p>";
}
return "";
Expand Down
2 changes: 1 addition & 1 deletion biocode-server/web/partials/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
A user community, and technical support is available from <a href="http://connect.barcodeoflife.org/group/lims">http://connect.barcodeoflife.org/group/lims</a>
Here, you can engage with the wider community, get help from experienced users, and make suggestions about how to improve the software.
If you have and questions or suggestions that you don't want to post to the community, you can email
<a href="mailto:[email protected]">[email protected]</a>
<a href="mailto:[email protected]">[email protected]</a>
</p>
</div>
</div>
13 changes: 7 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,16 @@ plugins {
apply plugin: "java"
apply plugin: "idea"

version = '3.0.15'
version = '3.0.18'

defaultTasks 'createPlugin';

ext {
shortName = "BiocodePlugin"
pluginName = "com.biomatters.plugins.biocode." + shortName
//pluginName = shortName + version
geneiousPublicAPIVersion = "11.1.5"
geneiousPublicAPIVersion = "2022.2.2"
//geneiousPublicAPIVersion = "11.1.5"
//geneiousPublicAPIVersion = "2019.1.1"
//geneiousPublicAPIVersion = "9.0.5"
pluginDistFilename = "${shortName}_" + version.replaceAll("\\.", "_") + ".gplugin"
Expand All @@ -40,7 +41,7 @@ repositories {
ivy {
url "http://assets.geneious.com/developer/geneious/ivy"
layout "pattern", {
ivy "[organisation]/[module]/ivys/ivy-[revision].xml"
ivy "[organisation]/[module]/ivys/ivy-[revision].xml"
artifact "[organisation]/[module]/[type]s/[artifact]-[revision].[ext]"
}
}
Expand Down Expand Up @@ -72,7 +73,7 @@ dependencies {
compile group: "commons-dbcp", name:"commons-dbcp", version:"1.4"
compile group: "commons-pool", name:"commons-pool", version:"1.6"
compile group: "commons-beanutils", name:"commons-beanutils", version:"1.9.2"
compile group: "mysql", name:"mysql-connector-java", version:"5.1.6"
compile group: "mysql", name:"mysql-connector-java", version:"8.0.22"

compile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.8'
compile group: 'commons-httpclient', name: 'commons-httpclient', version: '3.1'
Expand Down Expand Up @@ -150,8 +151,8 @@ jar {
}

compileJava {
sourceCompatibility "1.8"
targetCompatibility "1.8"
sourceCompatibility "11"
targetCompatibility "11"
}

sourceSets {
Expand Down
2 changes: 1 addition & 1 deletion development.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ depends on some Geneious core classes and this is not reflected in the Ivy confi
In the gradle build, the complete Geneious runtime is downloaded and the required libraries are extracted from it.

## Contributing
Please contact [email protected]
Please contact [email protected]

## Biocode LIMS Server
The Biocode LIMS server is an extension to the original LIMS that adds security, user management, access control and
Expand Down
2 changes: 1 addition & 1 deletion doc/readme.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ <h2>Getting Help</h2>
<p>
A great source of help can be found on the discussion forum at
<a href="http://connect.barcodeoflife.net/group/lims">http://connect.barcodeoflife.net/group/lims</a> or you can email
<a href="mailto:[email protected]">[email protected]</a>.</p>
<a href="mailto:[email protected]">[email protected]</a>.</p>
</body>
</html>
18 changes: 17 additions & 1 deletion doc/release_notes.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
==Biocode Plugin 3.0.18 - 27 December 2022 ==
* Improves performance in browsing plates by limiting the set of metadata fields

==Biocode Plugin 3.0.17 - 21 November 2022 ==
* updated ordering of search options to put search options that are faster at the top of the list. Helps user select options for faster searches
* adding descriptive text to plugin dropdown menu
* implemented well sorting for sorting A01, B01, C01, etc...
* updated list of working FIMS connections
* upgraded development environnment to synchronize with geneious prime and java 11
* fixed issue where BOLD export crashed when forward/reverse primer names were null. New behaviour asks user to name them prior to submission.
* fixed error messaging to be more descriptive if FIMS or LIMS connections do not work

==Biocode Plugin 3.0.16 - 24 August 2022 ==
* Update contact email for asking for help
* Adding "tentative", in addition to "passed" or "failed". Tentative to be used in cases where we may still need to check taxonomy but sequence is OK. Note that you should not be able to submit as "passed" while in "tentative".

==Biocode Plugin 3.0.15 - 24 February 2021 ==
* Fixes issues with large tissue queries against GEOME failing

Expand Down Expand Up @@ -174,7 +190,7 @@ Beta release of 2.8.11.
'''Additional Notes'''
This version will apply a schema fix to MySQL LIMS databases which may take anywhere between a minute and an hour to perform.
The amount of time depends on the number of traces stored in the database. If your database has over 30,000 traces
then it is recommended that an administrator perform it beforehand. Contact [email protected] for instructions.
then it is recommended that an administrator perform it beforehand. Contact [email protected] for instructions.

==Biocode Plugin 2.7.1 - 18 July 2014==
* Fixed a problem where seqeunces could be downloaded without annotated FIMS data.
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The Biocode LIMS is a Geneious plugin that comprises everything you need to mana
* Official releases are available from our [releases page](https://github.com/biocodellc/biocode-lims/releases)
* Official [Wiki Page](https://github.com/biocodellc/biocode-lims/wiki) for more information
including the user guide.
* Support email [email protected]
* Support email [email protected]
* Information for developers on contributing to the Biocode LIMS plugin is on our [development page](https://github.com/biocodellc/biocode-lims/blob/develop/development.md)


Expand Down
9 changes: 5 additions & 4 deletions src/com/biomatters/plugins/biocode/BiocodePlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ public class BiocodePlugin extends GeneiousPlugin {
}

private static GeneiousActionOptions superBiocodeAction;
public static final String PLUGIN_VERSION = "3.0.15";
public static final String SUPPORT_EMAIL = "[email protected]";
public static final String PLUGIN_VERSION = "3.0.18";
public static final String SUPPORT_EMAIL = "[email protected]";

public static GeneiousActionOptions getSuperBiocodeAction() {
if (superBiocodeAction == null) {
Expand Down Expand Up @@ -375,8 +375,9 @@ public DocumentOperation[] getDocumentOperations() {
new VerifyTaxonomyOperation(),
new AnnotateLimsDataOperation(),
new AnnotateFimsDataOperation(),
new AddAssemblyResultsToLimsOperation(true, false),
new AddAssemblyResultsToLimsOperation(false, false),
new AddAssemblyResultsToLimsOperation("passed", false),
new AddAssemblyResultsToLimsOperation("failed", false),
new AddAssemblyResultsToLimsOperation("tentative", false),
new MarkSequencesAsSubmittedInLimsOperation(),
new GenerateBOLDTraceSubmissionOperation(),
new ReverseAssemblySequencesOperation()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,28 +32,48 @@
*/
public class AddAssemblyResultsToLimsOperation extends DocumentOperation {

private final boolean isPass;
private final String passedString;
private final boolean isAutomated;

public AddAssemblyResultsToLimsOperation(boolean isPass, boolean isAutomated) {
this.isPass = isPass;
public AddAssemblyResultsToLimsOperation(String passedString, boolean isAutomated) {
this.passedString = passedString;
this.isAutomated = isAutomated;
}

public GeneiousActionOptions getActionOptions() {
GeneiousActionOptions geneiousActionOptions = new GeneiousActionOptions(isPass ? "Mark as Pass in LIMS..." : "Mark as Fail in LIMS...")
.setInPopupMenu(true, isPass ? 0.65 : 0.66).setProOnly(true);
double thisPassDouble = 0.65;
String thisPassDescription = "Sequence has been checked for both quality and taxonomic accuracy and is ready for submission to public databases such as GenBank";
String thisPassHeading = "" +
"Mark as Pass in LIMS....";
if (passedString == "tentative") {
thisPassHeading = "Mark as Tentative in LIMS....";
thisPassDescription = "Sequence has been checked only for quality - taxonomy is still under scrutiny.";
thisPassDouble = 0.66;
} else if (passedString == "failed") {
thisPassHeading = "Mark as Fail in LIMS....";
thisPassDescription = "Sequence has been checked for either quality and failed to meet barcode data standards, or for taxonomic accuracy and is a contaminent. It will not be pushed to public databases.";
thisPassDouble = 0.67;
}

GeneiousActionOptions geneiousActionOptions = new GeneiousActionOptions(thisPassHeading,thisPassDescription)
.setInPopupMenu(true, thisPassDouble).setProOnly(true);
return GeneiousActionOptions.createSubmenuActionOptions(BiocodePlugin.getSuperBiocodeAction(), geneiousActionOptions);
}

public String getHelp() {
return "Select one or more sequences, contigs or alignments of contigs to mark them as " + (isPass ? "passed" : "failed") + " on the relevant workflows in " +
return "Select one or more sequences, contigs or alignments of contigs to mark them as " + passedString + " on the relevant workflows in " +
"the LIMS (labratory information management system).";
}

@Override
public String getUniqueId() {
return isPass ? "MarkAssemblyAsPassInLims" : "MarkAssemblyAsFailInLims";
if (passedString == "passed") {
return "MarkAssemblyAsPassInLims";
} else if (passedString == "failed") {
return "MarkAssemblyAsFailInLims";
} else {
return "MarkAssemblyAsTentativeInLims";
}
}

public DocumentSelectionSignature[] getSelectionSignatures() {
Expand All @@ -79,7 +99,7 @@ public Options getOptions(AnnotatedPluginDocument... documents) throws DocumentO
throw new DocumentOperationException(BiocodeUtilities.NOT_CONNECTED_ERROR_MESSAGE);
}
try {
return new AddAssemblyResultsToLimsOptions(documents, isPass);
return new AddAssemblyResultsToLimsOptions(documents, passedString);
} catch (DatabaseServiceException e) {
throw new DocumentOperationException(e.getMessage(), e);
}
Expand All @@ -102,7 +122,7 @@ public Map<URN, AssemblyResult> getAssemblyResults(AnnotatedPluginDocument[] ann
break;
}

markDocumentPassedOrFailed(isPass, annotatedDocument);
markDocumentPassedOrFailed(passedString, annotatedDocument);

AssemblyResult assemblyResult = new AssemblyResult();

Expand Down Expand Up @@ -131,7 +151,7 @@ public Map<URN, AssemblyResult> getAssemblyResults(AnnotatedPluginDocument[] ann
if (consensus == null && SequenceAlignmentDocument.class.isAssignableFrom(annotatedDocument.getDocumentClass())) {
consensus = (SequenceDocument) BiocodeUtilities.getConsensusSequence(annotatedDocument, options.getConsensusOptions()).getDocument();
}
if (isPass && consensus == null) {
if (passedString == "passed" && consensus == null) {
assert false: "there should be a consensus here!";
}
int[] qualities = null;
Expand Down Expand Up @@ -164,11 +184,11 @@ else if(consensus != null) {
* Saves the reaction status to a field on the document. This should handle consensus alignments, contigs, and
* individual sequences (marking only the traces)
*
* @param isPass pass or fail
* @param passedString pass or fail
* @param document the document to mark
* @throws DocumentOperationException
*/
private void markDocumentPassedOrFailed(boolean isPass, AnnotatedPluginDocument document) throws DocumentOperationException{
private void markDocumentPassedOrFailed(String passedString, AnnotatedPluginDocument document) throws DocumentOperationException{
if(SequenceAlignmentDocument.class.isAssignableFrom(document.getDocumentClass())) {
SequenceAlignmentDocument alignment = (SequenceAlignmentDocument)document.getDocument();
for(int i=0; i < alignment.getNumberOfSequences(); i++) {
Expand All @@ -177,20 +197,20 @@ private void markDocumentPassedOrFailed(boolean isPass, AnnotatedPluginDocument
}
AnnotatedPluginDocument reference = alignment.getReferencedDocument(i);
if(reference != null) {
markDocumentPassedOrFailed(isPass, reference);
markDocumentPassedOrFailed(passedString, reference);
}
}
if (alignment.isContig()) {
updateReactionStatusField(isPass, document);
updateReactionStatusField(passedString, document);
}
}
else {
updateReactionStatusField(isPass, document);
updateReactionStatusField(passedString, document);
}
}

private void updateReactionStatusField(boolean isPass, AnnotatedPluginDocument document) {
document.setFieldValue(BiocodeUtilities.REACTION_STATUS_FIELD, isPass ? "passed" : "failed");
private void updateReactionStatusField(String passField, AnnotatedPluginDocument document) {
document.setFieldValue(BiocodeUtilities.REACTION_STATUS_FIELD, passField);
document.save();
}

Expand Down Expand Up @@ -537,7 +557,7 @@ public List<AnnotatedPluginDocument> performOperation(AnnotatedPluginDocument[]
seq.numberOfAmbiguities = assemblyResult.ambiguities;
seq.editRecord = assemblyResult.editRecord;

int seqId = limsConnection.addAssembly(isPass, options.getNotes(), options.getTechnician(),
int seqId = limsConnection.addAssembly(passedString, options.getNotes(), options.getTechnician(),
options.getFailureReason(), options.getFailureNotes(), options.isAddChromatograms(), seq, reactionIds, progress);
if(progress.isCanceled()) {
return null;
Expand All @@ -551,7 +571,7 @@ public List<AnnotatedPluginDocument> performOperation(AnnotatedPluginDocument[]
}
}

attachChromats(limsConnection, isPass, options.isAddChromatograms(), assemblyResult, chromatogramExportOperation);
attachChromats(limsConnection, passedString, options.isAddChromatograms(), assemblyResult, chromatogramExportOperation);
}
} catch (DatabaseServiceException e) {
throw new DocumentOperationException("Failed to mark as pass/fail in LIMS: " + e.getMessage(), e);
Expand All @@ -574,7 +594,7 @@ public List<AnnotatedPluginDocument> performOperation(AnnotatedPluginDocument[]
}

private static void attachChromats(LIMSConnection limsConnection,
boolean isPass,
String passedString,
boolean addChromatograms,
AddAssemblyResultsToLimsOperation.AssemblyResult result,
BatchChromatogramExportOperation chromatogramExportOperation)
Expand Down Expand Up @@ -605,7 +625,7 @@ private static void attachChromats(LIMSConnection limsConnection,
}
entry.getKey().addSequences(traces);
}
entry.getKey().getOptions().setValue(ReactionOptions.RUN_STATUS, isPass ? ReactionOptions.PASSED_VALUE : ReactionOptions.FAILED_VALUE);
entry.getKey().getOptions().setValue(ReactionOptions.RUN_STATUS, passedString);
}
} catch (IOException e) {
throw new DatabaseServiceException(e, "Failed to create temporary files and directories to export traces: " + e.getMessage(), false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class AddAssemblyResultsToLimsOptions extends Options {

private InputType inputType;

public AddAssemblyResultsToLimsOptions(AnnotatedPluginDocument[] documents, boolean passed) throws DocumentOperationException, DatabaseServiceException {
public AddAssemblyResultsToLimsOptions(AnnotatedPluginDocument[] documents, String passedString) throws DocumentOperationException, DatabaseServiceException {
inputType = InputType.determineInputType(documents);
if(inputType == InputType.MIXED) {
throw new DocumentOperationException("This operation only works on documents of the same type. " +
Expand All @@ -40,7 +40,7 @@ public AddAssemblyResultsToLimsOptions(AnnotatedPluginDocument[] documents, bool
}
}

if(passed) {
if(passedString == "passed") {
String sequenceOrSequences = documents.length > 1 ||
inputType == InputType.ALIGNMENT_OF_CONSENSUS ? "sequences" : "sequence";
StringBuilder message = new StringBuilder("The ");
Expand All @@ -63,7 +63,7 @@ public AddAssemblyResultsToLimsOptions(AnnotatedPluginDocument[] documents, bool

Options details = new Options(AddAssemblyResultsToLimsOptions.class);
details.addStringOption("technician", "Your name", "");
if(!passed) {
if(passedString == "failed") {
reasonOption = FailureReason.addToOptions(details);
details.addMultipleLineStringOption("reasonDetails", "Reason Details", "", 4, true);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,12 +302,12 @@ public static Map<String, Object> getSearchDownloadOptions(boolean tissues, bool
public static FIMSConnection[] getFimsConnections() {
return new FIMSConnection[] {
new ExcelFimsConnection(),
new geomeFIMSConnection(),
//new FusionTablesFimsConnection(),
new MySQLFimsConnection(),
new MooreaFimsConnection(),
new MooreaFimsConnection()
//new TAPIRFimsConnection(),
new BiocodeFIMSConnection(),
new geomeFIMSConnection()
//new BiocodeFIMSConnection(),
};
}

Expand Down
Loading

0 comments on commit 4843694

Please sign in to comment.