Skip to content
This repository has been archived by the owner on May 5, 2024. It is now read-only.

Commit

Permalink
Merge pull request #609 from robinschmid/tomasmaster_library_submit_tag
Browse files Browse the repository at this point in the history
Small fix of parameter check of deselected/invalid library entries
  • Loading branch information
tomas-pluskal authored Jun 2, 2019
2 parents 30505d6 + 0721b2d commit 5acbc6e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ private enum Result {
public static final String GNPS_LIBRARY_SUBMIT_URL =
"http://dorresteinappshub.ucsd.edu:5050/depostsinglespectrum";

public static final String SOURCE_DESCRIPTION = "mzmine2 library entry submission";

private Logger log = Logger.getLogger(this.getClass().getName());
private Map<LibrarySubmitIonParameters, DataPoint[]> map;
private int done = 0;
Expand Down Expand Up @@ -261,9 +263,12 @@ private void submitGNPS(String json) {
// ######################################################
// NEEDED
// user pass and json entry
//
entity.addPart("username", new StringBody(USER));
entity.addPart("password", new StringBody(PASS));
entity.addPart("spectrum", new StringBody(json));
// job description is not entry description
entity.addPart("description", new StringBody(SOURCE_DESCRIPTION));

HttpPost httppost = new HttpPost(GNPS_LIBRARY_SUBMIT_URL);
httppost.setEntity(entity);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -466,8 +466,8 @@ protected boolean checkParameters() {
// check
ArrayList<String> messages = new ArrayList<>();

boolean checkIon =
streamSelection().filter(pn -> !pn.checkParameterValues(messages)).count() == 0;
boolean checkIon = streamSelection().filter(ScanSelectPanel::isValidAndSelected)
.filter(pn -> !pn.checkParameterValues(messages)).count() == 0;
boolean checkSubmit = paramSubmit.checkParameterValues(messages);
boolean checkMeta = paramMeta.checkParameterValues(messages);
if (checkMeta && checkSubmit && checkIon) {
Expand Down

0 comments on commit 5acbc6e

Please sign in to comment.