* If a required setting is not given, the default value is used. */ - public boolean executeProteinOperations(JsonAnalysis json) { + public boolean executeProteinOperations(JsonAnalysis json, int threads) { boolean allOk = true; AbstractProteinInference proteinInference = ProteinInferenceFactory.createInstanceOf(json.getInferenceMethod()); - + if (proteinInference == null) { LOGGER.error("Could not create inference method '{}'", json.getInferenceMethod()); allOk = false; } else { LOGGER.info("selected inference method: {}", proteinInference.getName()); + proteinInference.setAllowedThreads(threads); + LOGGER.debug("Protein inference using {} threads (0=all available)", proteinInference.getAllowedThreads()); } if (allOk) { @@ -558,4 +560,14 @@ public boolean executeProteinOperations(JsonAnalysis json) { return allOk; } + + + /** + * Execute analysis on protein level, getting the settings from JSON, using all available CPUs + *
+ * If a required setting is not given, the default value is used. + */ + public boolean executeProteinOperations(JsonAnalysis json) { + return executeProteinOperations(json, 0); + } } \ No newline at end of file diff --git a/src/main/java/de/mpc/pia/tools/OntologyConstants.java b/src/main/java/de/mpc/pia/tools/OntologyConstants.java index be74ea8..49bcf99 100755 --- a/src/main/java/de/mpc/pia/tools/OntologyConstants.java +++ b/src/main/java/de/mpc/pia/tools/OntologyConstants.java @@ -27,6 +27,7 @@ public enum OntologyConstants { SEARCH_ENGINE_PSM_SCORE("search engine specific score for PSMs", "MS:1001143"), SPECTRUM_TITLE("spectrum title", "MS:1000796"), SCAN_START_TIME("scan start time", "MS:1000016"), + RETENTION_TIME("retention time", "MS:1000894"), SCAN_NUMBERS("scan number(s)", "MS:1001115"), DELTA_MZ("delta m/z", "MS:1001975"), CLEAVAGE_AGENT_NAME("cleavage agent name", "MS:1001045"),