diff --git a/package-lock.json b/package-lock.json index dc29cc82..77618988 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17243,12 +17243,12 @@ "integrity": "sha512-g9AM+44twT+qQpg4kHhupamMoBr4QscjqjQY8Pdk7cdWHvZs5HuIVTNtH44IbAtN08x9+U3BTT+lp+ZEJpaoFw==" }, "unipept-web-components": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/unipept-web-components/-/unipept-web-components-1.3.0.tgz", - "integrity": "sha512-i5Q5/8M/Keh+lqB1F0LFwLmf9eb9/T43SbCSyXxEg7iWQ3o8BWkroRUnRaVQDJHS1ldLP9aaQqFepy+xd+niYw==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/unipept-web-components/-/unipept-web-components-1.3.1.tgz", + "integrity": "sha512-EhZIeWD5N8mInvyUxGkH35tGxMb1UjLNaTCVnSA3rg5o83loLP/xwJb3HvhnvfBZiXG+bh1W7sVS/1GxtZ3nAA==", "requires": { "async": "^3.2.0", - "axios": "^0.19.0", + "axios": "^0.21.1", "canvg": "^3.0.5", "clipboard-polyfill": "^2.8.6", "convert-svg-to-png": "^0.5.0", @@ -17272,35 +17272,6 @@ "whatwg-fetch": "^3.0.0" }, "dependencies": { - "axios": { - "version": "0.19.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.2.tgz", - "integrity": "sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==", - "requires": { - "follow-redirects": "1.5.10" - } - }, - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "requires": { - "ms": "2.0.0" - } - }, - "follow-redirects": { - "version": "1.5.10", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz", - "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==", - "requires": { - "debug": "=3.1.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, "shared-memory-datastructures": { "version": "0.1.9", "resolved": "https://registry.npmjs.org/shared-memory-datastructures/-/shared-memory-datastructures-0.1.9.tgz", diff --git a/package.json b/package.json index 546d7785..e49c2765 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ "node-abi": "^2.19.3", "regenerator-runtime": "^0.13.3", "shared-memory-datastructures": "0.1.8", - "unipept-web-components": "1.3.0", + "unipept-web-components": "^1.3.1", "uuid": "^7.0.3", "vue": "^2.6.12", "vue-class-component": "^7.1.0", diff --git a/src/components/analysis/AnalysisSummary.vue b/src/components/analysis/AnalysisSummary.vue index ca382f8b..0eca6349 100644 --- a/src/components/analysis/AnalysisSummary.vue +++ b/src/components/analysis/AnalysisSummary.vue @@ -186,8 +186,7 @@ export default class AnalysisSummary extends Vue { private update() { const config = new SearchConfiguration(this.equateIl, this.filterDuplicates, this.missedCleavage); - this.assay.setSearchConfiguration(config); - this.$store.dispatch("processAssay", [this.assay, true]); + this.$store.dispatch("processAssay", [this.assay, true, config]); } private getHumanReadableAssayDate(): string { diff --git a/src/components/navigation-drawers/AssayItem.vue b/src/components/navigation-drawers/AssayItem.vue index d070c4e6..9a383882 100644 --- a/src/components/navigation-drawers/AssayItem.vue +++ b/src/components/navigation-drawers/AssayItem.vue @@ -322,7 +322,7 @@ export default class AssayItem extends Vue { } private reanalyse() { - this.$store.dispatch("processAssay", [this.assay, true]); + this.$store.dispatch("processAssay", [this.assay, true, this.assay.getSearchConfiguration()]); } private selectAssay() { diff --git a/src/components/pages/analysis/AnalysisPage.vue b/src/components/pages/analysis/AnalysisPage.vue index 0a80771c..b886e9a0 100644 --- a/src/components/pages/analysis/AnalysisPage.vue +++ b/src/components/pages/analysis/AnalysisPage.vue @@ -142,7 +142,11 @@ export default class AnalysisPage extends Vue { private reanalyse() { if (this.activeAssay) { - this.$store.dispatch("processAssay", [this.activeAssay, true]); + this.$store.dispatch("processAssay", [ + this.activeAssay, + true, + this.activeAssay.getSearchConfiguration() + ]); } } diff --git a/src/logic/communication/DesktopAssayProcessor.ts b/src/logic/communication/DesktopAssayProcessor.ts index 6097a575..150938bb 100644 --- a/src/logic/communication/DesktopAssayProcessor.ts +++ b/src/logic/communication/DesktopAssayProcessor.ts @@ -9,6 +9,7 @@ import { AssayProcessor, PeptideData, NetworkConfiguration, + SearchConfiguration } from "unipept-web-components"; import CachedCommunicationSource from "@/logic/communication/source/CachedCommunicationSource"; @@ -29,9 +30,14 @@ export default class DesktopAssayProcessor implements AssayProcessor { public async processAssay( countTable: CountTable, - forceUpdate: boolean = false + forceUpdate: boolean = false, + searchSettings: SearchConfiguration ): Promise { - const [pept2DataResponses, peptideTrust] = await this.getPept2Data(countTable, forceUpdate); + const [pept2DataResponses, peptideTrust] = await this.getPept2Data( + countTable, + forceUpdate, + searchSettings + ); this.setProgress(1); if (this.isCancelled()) { @@ -58,7 +64,8 @@ export default class DesktopAssayProcessor implements AssayProcessor { private async getPept2Data( peptideCountTable: CountTable, - forceUpdate: boolean + forceUpdate: boolean, + searchSettings: SearchConfiguration ): Promise<[ShareableMap, PeptideTrust]> { const processedAssayManager = new ProcessedAssayManager(this.dbManager); const processingResult = await processedAssayManager.readProcessingResults(this.assay); @@ -81,26 +88,27 @@ export default class DesktopAssayProcessor implements AssayProcessor { await this.pept2DataCommunicator.process( peptideCountTable, - this.assay.getSearchConfiguration(), + searchSettings, pept2DataProgressNotifier ); if (!this.cancelled) { // @ts-ignore const pept2ResponseMap: ShareableMap = this.pept2DataCommunicator.getPeptideResponseMap( - this.assay.getSearchConfiguration() + searchSettings ); const trust = await this.pept2DataCommunicator.getPeptideTrust( peptideCountTable, - this.assay.getSearchConfiguration() + searchSettings ); this.assay.setEndpoint(currentEndpoint); this.assay.setDatabaseVersion(currentDbVersion); this.assay.setDate(new Date()); + this.assay.setSearchConfiguration(searchSettings); // Store results and update metadata... - await processedAssayManager.storeProcessingResults(this.assay, pept2ResponseMap, trust); + await processedAssayManager.storeProcessingResults(this.assay, pept2ResponseMap, trust, searchSettings); return [ pept2ResponseMap, diff --git a/src/logic/filesystem/assay/FileSystemAssayChangeListener.ts b/src/logic/filesystem/assay/FileSystemAssayChangeListener.ts index fe262df2..d3b8bd9f 100644 --- a/src/logic/filesystem/assay/FileSystemAssayChangeListener.ts +++ b/src/logic/filesystem/assay/FileSystemAssayChangeListener.ts @@ -64,7 +64,7 @@ export default class FileSystemAssayChangeListener implements ChangeListener, - trust: PeptideTrust + trust: PeptideTrust, + searchSettings: SearchConfiguration ) { // Delete the metadata that's associated with this assay await this.dbManager.performQuery((db: Database) => { @@ -127,7 +128,7 @@ export default class ProcessedAssayManager { }); // Now write the metadata to the database again. - const existingConfig = assay.getSearchConfiguration(); + const existingConfig = searchSettings; const searchConfiguration = new SearchConfiguration( existingConfig.equateIl, existingConfig.filterDuplicates, diff --git a/src/logic/filesystem/project/FileSystemWatcher.ts b/src/logic/filesystem/project/FileSystemWatcher.ts index 78867031..808fa716 100644 --- a/src/logic/filesystem/project/FileSystemWatcher.ts +++ b/src/logic/filesystem/project/FileSystemWatcher.ts @@ -114,7 +114,7 @@ export default class FileSystemWatcher { // it is added to the study. study.addAssay(assay); await store.dispatch("addAssay", assay); - store.dispatch("processAssay", [assay, false]); + store.dispatch("processAssay", [assay, false, assay.getSearchConfiguration()]); } } catch (err) { this.reportError(err); @@ -153,7 +153,10 @@ export default class FileSystemWatcher { for (const assay of study.getAssays()) { await store.dispatch("addAssay", assay); // noinspection ES6MissingAwait - store.dispatch("processAssay", [assay, false]); + store.dispatch( + "processAssay", + [assay, false, (assay as ProteomicsAssay).getSearchConfiguration()] + ); } study.addChangeListener(new FileSystemStudyChangeListener()); diff --git a/src/state/ProjectStore.ts b/src/state/ProjectStore.ts index 9f4dc59a..68d1815f 100644 --- a/src/state/ProjectStore.ts +++ b/src/state/ProjectStore.ts @@ -1,4 +1,4 @@ -import { Study } from "unipept-web-components"; +import { ProteomicsAssay, Study } from "unipept-web-components"; import { ActionContext, ActionTree, GetterTree, MutationTree } from "vuex"; import FileSystemWatcher from "@/logic/filesystem/project/FileSystemWatcher"; import path from "path"; @@ -102,7 +102,9 @@ const projectActions: ActionTree = { for (const study of studies) { for (const assay of study.getAssays()) { await store.dispatch("addAssay", assay); - store.dispatch("processAssay", [assay, false]); + store.dispatch( + "processAssay", + [assay, false, (assay as ProteomicsAssay).getSearchConfiguration()]); } }