From 6551c7f46dba18426bd3bca8b7430469d9ee44e0 Mon Sep 17 00:00:00 2001 From: Pieter Verschaffelt Date: Wed, 5 Oct 2022 15:59:38 +0200 Subject: [PATCH 1/6] Update and change the way that the taxa filter works --- .../custom-database/CreateCustomDatabase.vue | 75 +++++++++- src/components/proteome/ProteomeBrowser.vue | 17 +++ src/components/taxon/TaxaBrowser.vue | 138 +++++++++++------- .../metadata/MetadataCommunicator.ts | 6 +- src/logic/communication/proteomes/Proteome.ts | 14 ++ .../proteomes/ProteomeCommunicator.ts | 38 +++++ 6 files changed, 224 insertions(+), 64 deletions(-) create mode 100644 src/components/proteome/ProteomeBrowser.vue create mode 100644 src/logic/communication/proteomes/Proteome.ts create mode 100644 src/logic/communication/proteomes/ProteomeCommunicator.ts diff --git a/src/components/custom-database/CreateCustomDatabase.vue b/src/components/custom-database/CreateCustomDatabase.vue index 90c1c2e..b832495 100644 --- a/src/components/custom-database/CreateCustomDatabase.vue +++ b/src/components/custom-database/CreateCustomDatabase.vue @@ -33,7 +33,7 @@ - + @@ -51,6 +51,52 @@ v-model="databaseName"> + + + + + Please choose how you want to construct your custom protein reference database. + + + + + Manually select which UniProt sources (e.g. TrEMBL and SwissProt) should be + used for the database construction and which proteins should be included based + on a given set of taxa. + + + + + Provide a list of UniProt reference proteomes that should be used as the basis + for a custom protein reference database. All available UniProt sources (both + TrEMBL and SwissProt) will be consulted in this case. + + + + + + + Manually filter database + + + + + Construct from reference proteomes + + + + + + + + + Database details + + + + + + - Continue + Continue - + Filter Select which organisms will be present in the output database - + @@ -136,6 +182,7 @@ import { Prop, Watch } from "vue-property-decorator"; import CachedNcbiResponseCommunicator from "@/logic/communication/taxonomic/ncbi/CachedNcbiResponseCommunicator"; import ConfigurationManager from "@/logic/configuration/ConfigurationManager"; import CustomDatabase from "@/logic/custom_database/CustomDatabase"; +import ProteomeCommunicator from "@/logic/communication/proteomes/ProteomeCommunicator"; @Component({ components: { TaxaBrowser } @@ -226,6 +273,10 @@ export default class CreateCustomDatabase extends Vue { .replace("_", ".") this.selectedVersion = lastVersion; + + const results = await ProteomeCommunicator.getProteomeById("UP000464341"); + console.log(results); + this.loading = false; } catch (e) { console.error(e); @@ -233,13 +284,25 @@ export default class CreateCustomDatabase extends Vue { } } - private validateAndContinue(): void { + private manuallyFilterDatabase(): void { // @ts-ignore - if (this.$refs.databaseForm.validate()) { + if (this.$refs.databaseDetailsForm.validate()) { + // this.selectProteomes = false; this.currentStep = 2; } } + private filterByProteomes(): void { + + } + + private selectDatabaseSources(): void { + // @ts-ignore + if (this.$refs.databaseSourcesForm.validate()) { + this.currentStep = 3; + } + } + private async buildDatabase(): Promise { // No filtering should be applied in this case (which means we pass only the root to the construction step of // the database). diff --git a/src/components/proteome/ProteomeBrowser.vue b/src/components/proteome/ProteomeBrowser.vue new file mode 100644 index 0000000..524f73e --- /dev/null +++ b/src/components/proteome/ProteomeBrowser.vue @@ -0,0 +1,17 @@ + + + + + diff --git a/src/components/taxon/TaxaBrowser.vue b/src/components/taxon/TaxaBrowser.vue index f457b50..c59d06d 100644 --- a/src/components/taxon/TaxaBrowser.vue +++ b/src/components/taxon/TaxaBrowser.vue @@ -25,66 +25,79 @@ {{ failedImports.join(", ") }}. -
-
No taxa selected yet. No filtering will be applied.
-
- Use the search bar below to find taxa that can be used for filtering. -
-
- - - {{ taxon.name }} - - -
- - - Import a selection of taxa for filtering from a file. - - - - Clear selection - -
-
- Computing database size... - Resulting database will contain {{ formattedUniprotRecords }} UniProtKB records. -
+ + + +
+
+
No taxa selected yet. No filtering will be applied.
+
+ Use the table and search bar below to find taxa that can be used for filtering. +
+
+ + + {{ taxon.name }} + + +
+
+ + + Import a selection of taxa for filtering from a file. + + + + Clear all selected taxa. + +
+
+ +
+ Computing database size... + + Resulting database will contain {{ formattedUniprotRecords }} UniProtKB records. + +
+
+
+
-
- - - -
+ + + + + + + + + + + +