Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update dev #79

Merged
merged 25 commits into from
Jul 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
01c320f
Merge pull request #69 from qbicsoftware/development
wow-such-code Aug 4, 2023
098b4df
Set version to 1.15.0
JohnnyQ5 Aug 7, 2023
a8d4ae1
revert changes to new omero version as other parts are not ready
wow-such-code Aug 7, 2023
d133e96
Merge pull request #70 from qbicsoftware/release/set-version-to-1.15.0
wow-such-code Aug 7, 2023
8e69c31
Merge branch 'main' into fix/revert-omero-update
wow-such-code Aug 7, 2023
cf1d40c
Merge pull request #71 from qbicsoftware/fix/revert-omero-update
wow-such-code Aug 7, 2023
7ad2e70
Set version to 1.15.1
JohnnyQ5 Aug 7, 2023
64109c1
Merge pull request #72 from qbicsoftware/release/set-version-to-1.15.1
wow-such-code Aug 8, 2023
8cf4799
Bump actions/checkout from 3 to 4
dependabot[bot] Sep 11, 2023
ac76071
Revert "revert changes to new omero version as other parts are not re…
wow-such-code Nov 13, 2023
59f3577
Merge pull request #74 from qbicsoftware/revert-71-fix/revert-omero-u…
wow-such-code Nov 13, 2023
783a775
Bump actions/github-script from 6 to 7
dependabot[bot] Nov 20, 2023
a698622
Bump actions/setup-java from 3 to 4
dependabot[bot] Dec 4, 2023
bb1286e
enable freetext for LCMS method in proteomics import
wow-such-code Jul 8, 2024
ec27e8e
Merge branch 'main' into feature/freetext-ms-method
wow-such-code Jul 8, 2024
4e1118f
Merge pull request #78 from qbicsoftware/feature/freetext-ms-method
wow-such-code Jul 8, 2024
3c79b76
Merge branch 'main' into dependabot/github_actions/actions/setup-java-4
wow-such-code Jul 8, 2024
5bcbeac
Merge branch 'main' into dependabot/github_actions/actions/github-scr…
wow-such-code Jul 8, 2024
7937e92
Merge branch 'main' into dependabot/github_actions/actions/checkout-4
wow-such-code Jul 8, 2024
5f526de
Merge pull request #77 from qbicsoftware/dependabot/github_actions/ac…
wow-such-code Jul 8, 2024
1b73d27
Merge branch 'main' into dependabot/github_actions/actions/checkout-4
wow-such-code Jul 8, 2024
0273ec2
Merge branch 'main' into dependabot/github_actions/actions/github-scr…
wow-such-code Jul 8, 2024
4d77956
Merge pull request #73 from qbicsoftware/dependabot/github_actions/ac…
wow-such-code Jul 8, 2024
c87b2d0
Merge branch 'main' into dependabot/github_actions/actions/github-scr…
wow-such-code Jul 8, 2024
72ad921
Merge pull request #76 from qbicsoftware/dependabot/github_actions/ac…
wow-such-code Jul 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up JDK 8
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '8'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up JDK 8
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '8'
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ 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
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '8'
Expand Down Expand Up @@ -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: |
Expand All @@ -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: |
Expand Down Expand Up @@ -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: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/nexus-publish-snapshots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up JDK 8
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '8'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up JDK 8
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '8'
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>projectwizard-portlet</artifactId>
<groupId>life.qbic</groupId>
<version>1.14.0</version>
<version>1.15.1</version>
<name>ProjectWizard Portlet</name>
<url>https://github.com/qbicsoftware/projectwizard-portlet</url>
<description>Creates hierarchical experiments using factorial design.</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -535,7 +538,7 @@ private Map<String, Map<String, Object>> fixSamplePrepProperties(

private Collection<? extends OpenbisExperiment> collectComplexExperiments(
Map<String, Map<String, Object>> propsMap, ExperimentType type) {
List<OpenbisExperiment> res = new ArrayList<OpenbisExperiment>();
List<OpenbisExperiment> res = new ArrayList<>();
if (propsMap != null) {
for (String code : propsMap.keySet()) {
res.add(new OpenbisExperiment(code, type, propsMap.get(code)));
Expand All @@ -547,6 +550,20 @@ private Collection<? extends OpenbisExperiment> collectComplexExperiments(
view.getRegisterButton().addClickListener(cl);
}

private void correctFreeTextLCMSMethods(List<OpenbisExperiment> complexExperiments, Set<String> lcmsMethods) {
String LCMS_KEY = "Q_MS_LCMS_METHOD";
for(OpenbisExperiment experiment : complexExperiments) {
if(experiment.getType().equals(ExperimentType.Q_MS_MEASUREMENT)) {
Map<String, Object> 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<String, String> metadataReplacements) {
logger.warn("Debug: String replacement");
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)) {
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -1252,8 +1270,8 @@ else if (b.getSampleType().contains("Sample Extract")) {
uniqueCodeToBarcode.put(uniqueID, code);
uniqueNumericIDToBarcode.put(numericID, code);
List<String> parents = t.getParentIDs();
t.setParents(new ArrayList<ISampleBean>());
List<String> newParents = new ArrayList<String>();
t.setParents(new ArrayList<>());
List<String> newParents = new ArrayList<>();
for (String parentID : parents) {
if (getImportType().equals(ExperimentalDesignType.Proteomics_MassSpectrometry)
|| getImportType().equals(ExperimentalDesignType.Metabolomics_LCMS)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,7 @@ public List<AOpenbisSample> createPoolingSamples(Map<String, List<AOpenbisSample
else
testPools = new ArrayList<AOpenbisSample>();
String exp = dummy.getValueMap().get("EXPERIMENT");
List<Property> factors = new ArrayList<Property>();
List<Property> factors = new ArrayList<>();
for (String secName : pools.keySet()) {
incrementOrCreateBarcode();
String parents = "";
Expand Down Expand Up @@ -778,9 +778,9 @@ public List<AOpenbisSample> createPoolingSamples(Map<String, List<AOpenbisSample
*/
private List<List<AOpenbisSample>> buildTestSamples(List<AOpenbisSample> extracts,
Map<String, Character> classChars) {
List<List<AOpenbisSample>> tests = new ArrayList<List<AOpenbisSample>>();
List<List<AOpenbisSample>> tests = new ArrayList<>();
for (int j = 0; j < techTypeInfo.size(); j++) {// different technologies
List<AOpenbisSample> techTests = new ArrayList<AOpenbisSample>();
List<AOpenbisSample> techTests = new ArrayList<>();
int techReps = techTypeInfo.get(j).getReplicates();
String sampleType = techTypeInfo.get(j).getTechnology();
int expNum = experiments.size() - techTypeInfo.size() + j;
Expand Down Expand Up @@ -847,7 +847,7 @@ public void setInheritExtracts(boolean inherit) {
private List<AOpenbisSample> parseEntities(List<Sample> entities, boolean copy)
throws JAXBException {
oldCodesToNewCodes = new HashMap<String, String>();
List<AOpenbisSample> res = new ArrayList<AOpenbisSample>();
List<AOpenbisSample> res = new ArrayList<>();
String expCode = "";
if (entities.get(0).getExperiment() != null) {
expCode = entities.get(0).getExperiment().getCode();
Expand Down Expand Up @@ -899,7 +899,7 @@ private List<AOpenbisSample> parseEntities(List<Sample> entities, boolean copy)
*/
private List<AOpenbisSample> parseExtracts(List<Sample> extracts,
Map<Sample, List<String>> childParentsMap) throws JAXBException {
List<AOpenbisSample> res = new ArrayList<AOpenbisSample>();
List<AOpenbisSample> res = new ArrayList<>();
String exp = "";
if (extracts.get(0).getExperiment() != null) {
exp = extracts.get(0).getExperiment().getCode();
Expand Down
Loading