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

Commit 5acbc6e

Browse files
Merge pull request #609 from robinschmid/tomasmaster_library_submit_tag
Small fix of parameter check of deselected/invalid library entries
2 parents 30505d6 + 0721b2d commit 5acbc6e

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/main/java/net/sf/mzmine/modules/peaklistmethods/io/spectraldbsubmit/LibrarySubmitTask.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ private enum Result {
7878
public static final String GNPS_LIBRARY_SUBMIT_URL =
7979
"http://dorresteinappshub.ucsd.edu:5050/depostsinglespectrum";
8080

81+
public static final String SOURCE_DESCRIPTION = "mzmine2 library entry submission";
82+
8183
private Logger log = Logger.getLogger(this.getClass().getName());
8284
private Map<LibrarySubmitIonParameters, DataPoint[]> map;
8385
private int done = 0;
@@ -261,9 +263,12 @@ private void submitGNPS(String json) {
261263
// ######################################################
262264
// NEEDED
263265
// user pass and json entry
266+
//
264267
entity.addPart("username", new StringBody(USER));
265268
entity.addPart("password", new StringBody(PASS));
266269
entity.addPart("spectrum", new StringBody(json));
270+
// job description is not entry description
271+
entity.addPart("description", new StringBody(SOURCE_DESCRIPTION));
267272

268273
HttpPost httppost = new HttpPost(GNPS_LIBRARY_SUBMIT_URL);
269274
httppost.setEntity(entity);

src/main/java/net/sf/mzmine/modules/peaklistmethods/io/spectraldbsubmit/view/MSMSLibrarySubmissionWindow.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,8 +466,8 @@ protected boolean checkParameters() {
466466
// check
467467
ArrayList<String> messages = new ArrayList<>();
468468

469-
boolean checkIon =
470-
streamSelection().filter(pn -> !pn.checkParameterValues(messages)).count() == 0;
469+
boolean checkIon = streamSelection().filter(ScanSelectPanel::isValidAndSelected)
470+
.filter(pn -> !pn.checkParameterValues(messages)).count() == 0;
471471
boolean checkSubmit = paramSubmit.checkParameterValues(messages);
472472
boolean checkMeta = paramMeta.checkParameterValues(messages);
473473
if (checkMeta && checkSubmit && checkIon) {

0 commit comments

Comments
 (0)