diff --git a/src/main/java/net/sf/mzmine/modules/peaklistmethods/io/spectraldbsubmit/LibrarySubmitTask.java b/src/main/java/net/sf/mzmine/modules/peaklistmethods/io/spectraldbsubmit/LibrarySubmitTask.java index 8a3580c26..3c184cefd 100644 --- a/src/main/java/net/sf/mzmine/modules/peaklistmethods/io/spectraldbsubmit/LibrarySubmitTask.java +++ b/src/main/java/net/sf/mzmine/modules/peaklistmethods/io/spectraldbsubmit/LibrarySubmitTask.java @@ -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 map; private int done = 0; @@ -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); diff --git a/src/main/java/net/sf/mzmine/modules/peaklistmethods/io/spectraldbsubmit/view/MSMSLibrarySubmissionWindow.java b/src/main/java/net/sf/mzmine/modules/peaklistmethods/io/spectraldbsubmit/view/MSMSLibrarySubmissionWindow.java index e5d93aacd..e289373fb 100644 --- a/src/main/java/net/sf/mzmine/modules/peaklistmethods/io/spectraldbsubmit/view/MSMSLibrarySubmissionWindow.java +++ b/src/main/java/net/sf/mzmine/modules/peaklistmethods/io/spectraldbsubmit/view/MSMSLibrarySubmissionWindow.java @@ -466,8 +466,8 @@ protected boolean checkParameters() { // check ArrayList 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) {