From 098b4df001ee7f60a0e14f6fc5df573ce079ef69 Mon Sep 17 00:00:00 2001 From: JohnnyQ5 Date: Mon, 7 Aug 2023 13:36:03 +0000 Subject: [PATCH 1/8] Set version to 1.15.0 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1ea9e0fd..02765078 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ 4.0.0 projectwizard-portlet life.qbic - 1.14.0 + 1.15.0 ProjectWizard Portlet https://github.com/qbicsoftware/projectwizard-portlet Creates hierarchical experiments using factorial design. From a8d4ae11bc87adda93bc07cd50e6ea56a8f2e630 Mon Sep 17 00:00:00 2001 From: wow-such-code Date: Mon, 7 Aug 2023 17:21:48 +0200 Subject: [PATCH 2/8] revert changes to new omero version as other parts are not ready --- pom.xml | 2 +- src/main/java/life/qbic/portal/portlet/ProjectWizardUI.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 1ea9e0fd..3911dde8 100644 --- a/pom.xml +++ b/pom.xml @@ -193,7 +193,7 @@ life.qbic omero-client-lib - 1.3.1 + 1.2.0 diff --git a/src/main/java/life/qbic/portal/portlet/ProjectWizardUI.java b/src/main/java/life/qbic/portal/portlet/ProjectWizardUI.java index 4d044121..755bc54c 100644 --- a/src/main/java/life/qbic/portal/portlet/ProjectWizardUI.java +++ b/src/main/java/life/qbic/portal/portlet/ProjectWizardUI.java @@ -200,7 +200,7 @@ private void initView(final DBManager dbm, final Vocabularies vocabularies, fina try { int omeroPort = Integer.parseInt(config.getOmeroPort()); omero = new BasicOMEROClient(config.getOmeroUser(), config.getOmeroPassword(), - config.getOmeroHostname(), omeroPort, "default"); + config.getOmeroHostname(), omeroPort); } catch (NumberFormatException | NullPointerException e) { logger.warn("Omero port could not be parsed form the configuration file."); } From 7ad2e708237912371da174b8d81f13d12bed6a2d Mon Sep 17 00:00:00 2001 From: JohnnyQ5 Date: Mon, 7 Aug 2023 15:31:38 +0000 Subject: [PATCH 3/8] Set version to 1.15.1 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c6f61672..873f1bd4 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ 4.0.0 projectwizard-portlet life.qbic - 1.15.0 + 1.15.1 ProjectWizard Portlet https://github.com/qbicsoftware/projectwizard-portlet Creates hierarchical experiments using factorial design. From 8cf479915bf3ef48643234a40e29104030b1f77c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Sep 2023 05:17:56 +0000 Subject: [PATCH 4/8] Bump actions/checkout from 3 to 4 Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/build_package.yml | 2 +- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/create-release.yml | 2 +- .github/workflows/nexus-publish-snapshots.yml | 2 +- .github/workflows/run_tests.yml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build_package.yml b/.github/workflows/build_package.yml index 77c5fe5c..a94b4feb 100644 --- a/.github/workflows/build_package.yml +++ b/.github/workflows/build_package.yml @@ -14,7 +14,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up JDK 8 uses: actions/setup-java@v3 with: diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 1b1841d8..33f97b03 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -37,7 +37,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up JDK 8 uses: actions/setup-java@v3 with: diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index ed38abf1..006cd1ce 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up JDK 8 uses: actions/setup-java@v3 with: diff --git a/.github/workflows/nexus-publish-snapshots.yml b/.github/workflows/nexus-publish-snapshots.yml index 9d98c352..7eb96929 100644 --- a/.github/workflows/nexus-publish-snapshots.yml +++ b/.github/workflows/nexus-publish-snapshots.yml @@ -16,7 +16,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up JDK 8 uses: actions/setup-java@v3 with: diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index a5e32810..d7e27303 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -14,7 +14,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up JDK 8 uses: actions/setup-java@v3 with: From ac76071bfdade4bb4551a74c2505c78d03f4c528 Mon Sep 17 00:00:00 2001 From: wow-such-code Date: Mon, 13 Nov 2023 11:15:44 +0100 Subject: [PATCH 5/8] Revert "revert changes to new omero version as other parts are not ready" --- pom.xml | 2 +- src/main/java/life/qbic/portal/portlet/ProjectWizardUI.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 873f1bd4..45cfe76d 100644 --- a/pom.xml +++ b/pom.xml @@ -193,7 +193,7 @@ life.qbic omero-client-lib - 1.2.0 + 1.3.1 diff --git a/src/main/java/life/qbic/portal/portlet/ProjectWizardUI.java b/src/main/java/life/qbic/portal/portlet/ProjectWizardUI.java index 755bc54c..4d044121 100644 --- a/src/main/java/life/qbic/portal/portlet/ProjectWizardUI.java +++ b/src/main/java/life/qbic/portal/portlet/ProjectWizardUI.java @@ -200,7 +200,7 @@ private void initView(final DBManager dbm, final Vocabularies vocabularies, fina try { int omeroPort = Integer.parseInt(config.getOmeroPort()); omero = new BasicOMEROClient(config.getOmeroUser(), config.getOmeroPassword(), - config.getOmeroHostname(), omeroPort); + config.getOmeroHostname(), omeroPort, "default"); } catch (NumberFormatException | NullPointerException e) { logger.warn("Omero port could not be parsed form the configuration file."); } From 783a775422f5948b64c4c879484143c26b15a5b7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Nov 2023 05:52:09 +0000 Subject: [PATCH 6/8] Bump actions/github-script from 6 to 7 Bumps [actions/github-script](https://github.com/actions/github-script) from 6 to 7. - [Release notes](https://github.com/actions/github-script/releases) - [Commits](https://github.com/actions/github-script/compare/v6...v7) --- updated-dependencies: - dependency-name: actions/github-script dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/create-release.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index ed38abf1..ae36374c 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -44,7 +44,7 @@ jobs: && !( contains(github.event.inputs.versionTag, 'alpha') || contains(github.event.inputs.versionTag, 'beta') || contains(github.event.inputs.versionTag, 'rc')) }} - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: github-token: ${{secrets.JOHNNY_Q5_REPORTS_TOKEN}} script: | @@ -58,7 +58,7 @@ jobs: && ( contains(github.event.inputs.versionTag, 'alpha') || contains(github.event.inputs.versionTag, 'beta') || contains(github.event.inputs.versionTag, 'rc')) }} - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: github-token: ${{secrets.JOHNNY_Q5_REPORTS_TOKEN}} script: | @@ -87,7 +87,7 @@ jobs: run: git push - name: Open PR with version bump - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: github-token: ${{secrets.JOHNNY_Q5_REPORTS_TOKEN}} script: | From a6986229b5173e78aaf8de8bf49d9adb7a039186 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Dec 2023 05:36:15 +0000 Subject: [PATCH 7/8] Bump actions/setup-java from 3 to 4 Bumps [actions/setup-java](https://github.com/actions/setup-java) from 3 to 4. - [Release notes](https://github.com/actions/setup-java/releases) - [Commits](https://github.com/actions/setup-java/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/setup-java dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/build_package.yml | 2 +- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/create-release.yml | 2 +- .github/workflows/nexus-publish-snapshots.yml | 2 +- .github/workflows/run_tests.yml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build_package.yml b/.github/workflows/build_package.yml index 77c5fe5c..ad636d66 100644 --- a/.github/workflows/build_package.yml +++ b/.github/workflows/build_package.yml @@ -16,7 +16,7 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 - name: Set up JDK 8 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: 'zulu' java-version: '8' diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 1b1841d8..5054aba9 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -39,7 +39,7 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 - name: Set up JDK 8 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: 'zulu' java-version: '8' diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index ed38abf1..757686b1 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -14,7 +14,7 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 - name: Set up JDK 8 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: 'zulu' java-version: '8' diff --git a/.github/workflows/nexus-publish-snapshots.yml b/.github/workflows/nexus-publish-snapshots.yml index 9d98c352..6f988594 100644 --- a/.github/workflows/nexus-publish-snapshots.yml +++ b/.github/workflows/nexus-publish-snapshots.yml @@ -18,7 +18,7 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 - name: Set up JDK 8 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: 'zulu' java-version: '8' diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index a5e32810..440f3b63 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -16,7 +16,7 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 - name: Set up JDK 8 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: 'zulu' java-version: '8' From bb1286e2d87d64f0bce6c240be329efe1d38e34a Mon Sep 17 00:00:00 2001 From: wow-such-code Date: Mon, 8 Jul 2024 16:50:45 +0200 Subject: [PATCH 8/8] enable freetext for LCMS method in proteomics import --- .../control/ExperimentImportController.java | 28 +++++++++++++++---- .../control/WizardDataAggregator.java | 10 +++---- 2 files changed, 28 insertions(+), 10 deletions(-) diff --git a/src/main/java/life/qbic/projectwizard/control/ExperimentImportController.java b/src/main/java/life/qbic/projectwizard/control/ExperimentImportController.java index c31e1e3c..3771366c 100644 --- a/src/main/java/life/qbic/projectwizard/control/ExperimentImportController.java +++ b/src/main/java/life/qbic/projectwizard/control/ExperimentImportController.java @@ -475,6 +475,9 @@ public void buttonClick(ClickEvent event) { } omero.registerSamples(project, description, imagableSamples); } + if(getImportType().equals(ExperimentalDesignType.Proteomics_MassSpectrometry)) { + correctFreeTextLCMSMethods(complexExperiments, new HashSet<>(vocabs.getLcmsMethods())); + } openbisCreator.registerProjectWithExperimentsAndSamplesBatchWise(samples, description, complexExperiments, view.getProgressBar(), view.getProgressLabel(), new RegisteredSamplesReadyRunnable(view, control), entitiesToUpdate, @@ -535,7 +538,7 @@ private Map> fixSamplePrepProperties( private Collection collectComplexExperiments( Map> propsMap, ExperimentType type) { - List res = new ArrayList(); + List res = new ArrayList<>(); if (propsMap != null) { for (String code : propsMap.keySet()) { res.add(new OpenbisExperiment(code, type, propsMap.get(code))); @@ -547,6 +550,20 @@ private Collection collectComplexExperiments( view.getRegisterButton().addClickListener(cl); } + private void correctFreeTextLCMSMethods(List complexExperiments, Set lcmsMethods) { + String LCMS_KEY = "Q_MS_LCMS_METHOD"; + for(OpenbisExperiment experiment : complexExperiments) { + if(experiment.getType().equals(ExperimentType.Q_MS_MEASUREMENT)) { + Map metadata = experiment.getMetadata(); + String lcmsInput = (String) metadata.get(LCMS_KEY); + if(!lcmsMethods.contains(lcmsInput)) { + metadata.put(LCMS_KEY, "SPECIAL_METHOD"); + metadata.put("Q_MS_LCMS_METHOD_INFO", lcmsInput); + } + } + } + } + private String replaceChangedMetadata(String tsvContent, Map metadataReplacements) { logger.warn("Debug: String replacement"); @@ -767,7 +784,7 @@ private void prepareCompletionDialog() { for (String method : vocabs.getLcmsMethods()) { lcmsMap.put(method, method); } - catToVocabulary.put("LCMS Method", lcmsMap); + //catToVocabulary.put("LCMS Method", lcmsMap); <- freetext now for Proteomics import //// MC Device : Q_MS_DEVICE : Q_MS_DEVICES catToVocabulary.put("MS Device", vocabs.getMSDeviceMap()); //// Sample Cleanup (peptide) : Q_PROTEIN_PURIFICATION_METHODS @@ -799,6 +816,7 @@ private void prepareCompletionDialog() { "MS Device", "Fractionation Type", "Enrichment Method", "Labeling Type", "LCMS Method", "Digestion Method", "Digestion Enzyme", "Sample Preparation", "Species", "Tissue", "Sample Cleanup (Protein)", "Sample Cleanup (Peptide)"))); + parsedCategoryToValues.remove("LCMS Method"); // logger.warn(parsedCategoryToValues); } if (!getImportType().equals(ExperimentalDesignType.Metabolomics_LCMS)) { @@ -974,7 +992,7 @@ else if (b.getSampleType().contains("Sample Extract")) { // ms experiments keyToFields.put("Q_MS_DEVICE", new HashSet<>(Arrays.asList("MS Device"))); keyToFields.put("Q_CHROMATOGRAPHY_TYPE", new HashSet<>(Arrays.asList("LC Column"))); - keyToFields.put("Q_MS_LCMS_METHOD", new HashSet<>(Arrays.asList("LCMS Method"))); + //keyToFields.put("Q_MS_LCMS_METHOD", new HashSet<>(Arrays.asList("LCMS Method"))); keyToFields.put("Q_MS_PURIFICATION_METHOD", new HashSet<>( Arrays.asList("Sample Cleanup (Protein)", "Sample Cleanup (Peptide)"))); // TODO collisions between cleanup @@ -1252,8 +1270,8 @@ else if (b.getSampleType().contains("Sample Extract")) { uniqueCodeToBarcode.put(uniqueID, code); uniqueNumericIDToBarcode.put(numericID, code); List parents = t.getParentIDs(); - t.setParents(new ArrayList()); - List newParents = new ArrayList(); + t.setParents(new ArrayList<>()); + List newParents = new ArrayList<>(); for (String parentID : parents) { if (getImportType().equals(ExperimentalDesignType.Proteomics_MassSpectrometry) || getImportType().equals(ExperimentalDesignType.Metabolomics_LCMS)) { diff --git a/src/main/java/life/qbic/projectwizard/control/WizardDataAggregator.java b/src/main/java/life/qbic/projectwizard/control/WizardDataAggregator.java index cf6b61b5..7650685d 100644 --- a/src/main/java/life/qbic/projectwizard/control/WizardDataAggregator.java +++ b/src/main/java/life/qbic/projectwizard/control/WizardDataAggregator.java @@ -742,7 +742,7 @@ public List createPoolingSamples(Map(); String exp = dummy.getValueMap().get("EXPERIMENT"); - List factors = new ArrayList(); + List factors = new ArrayList<>(); for (String secName : pools.keySet()) { incrementOrCreateBarcode(); String parents = ""; @@ -778,9 +778,9 @@ public List createPoolingSamples(Map> buildTestSamples(List extracts, Map classChars) { - List> tests = new ArrayList>(); + List> tests = new ArrayList<>(); for (int j = 0; j < techTypeInfo.size(); j++) {// different technologies - List techTests = new ArrayList(); + List techTests = new ArrayList<>(); int techReps = techTypeInfo.get(j).getReplicates(); String sampleType = techTypeInfo.get(j).getTechnology(); int expNum = experiments.size() - techTypeInfo.size() + j; @@ -847,7 +847,7 @@ public void setInheritExtracts(boolean inherit) { private List parseEntities(List entities, boolean copy) throws JAXBException { oldCodesToNewCodes = new HashMap(); - List res = new ArrayList(); + List res = new ArrayList<>(); String expCode = ""; if (entities.get(0).getExperiment() != null) { expCode = entities.get(0).getExperiment().getCode(); @@ -899,7 +899,7 @@ private List parseEntities(List entities, boolean copy) */ private List parseExtracts(List extracts, Map> childParentsMap) throws JAXBException { - List res = new ArrayList(); + List res = new ArrayList<>(); String exp = ""; if (extracts.get(0).getExperiment() != null) { exp = extracts.get(0).getExperiment().getCode();