Skip to content

Commit c653901

Browse files
committed
Specified interface search on result table
1 parent bac6795 commit c653901

5 files changed

Lines changed: 34 additions & 19 deletions

File tree

frontend/ResultFoldseekDB.vue

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,15 @@
7070
:value="sortMenuValue"
7171
>
7272
<v-list-item v-if="isComplex" @click.stop="changeSortMode('qtm')">
73-
<v-list-item-title>Query TM-score</v-list-item-title>
73+
<v-list-item-title>{{ searchType === 'interfacesearch' ? 'Query Interface TM-score' : 'Query TM-score' }}</v-list-item-title>
7474
<v-list-item-icon>
7575
<v-icon :style="{'opacity' : sortKey == 'qtm' ? '1' : 0}">
7676
{{ sortOrder < 0 ? $MDI.ChevronDown : $MDI.ChevronUp}}
7777
</v-icon>
7878
</v-list-item-icon>
7979
</v-list-item>
8080
<v-list-item v-if="isComplex" @click.stop="changeSortMode('ttm')">
81-
<v-list-item-title>Target TM-score</v-list-item-title>
81+
<v-list-item-title>{{ searchType === 'interfacesearch' ? 'Target Interface TM-score' : 'Target TM-score' }}</v-list-item-title>
8282
<v-list-item-icon>
8383
<v-icon :style="{'opacity' : sortKey == 'ttm' ? '1' : 0}">
8484
{{ sortOrder < 0 ? $MDI.ChevronDown : $MDI.ChevronUp}}
@@ -179,7 +179,7 @@
179179
'background-color': $vuetify.theme.dark ? '#1e1e1e' : '#fff'}">
180180
<tr v-if="isComplex">
181181
<th colspan="1"></th>
182-
<th colspan="2" style="text-align:center; width:10%; border-right: 1px solid #333; border-bottom: 1px solid #333;">Complex</th>
182+
<th colspan="2" style="text-align:center; width:10%; border-right: 1px solid #333; border-bottom: 1px solid #333;">{{ searchType === 'interfacesearch' ? 'Interface' : 'Complex' }}</th>
183183
<th :colspan="6 + entry.hasDescription + entry.hasTaxonomy + ((tableMode == 1) ? 2 : 0)" style="text-align:center; border-bottom: 1px solid #333;">Chain</th>
184184
</tr>
185185
<tr>
@@ -200,9 +200,9 @@
200200
<template v-if="isComplex">
201201
<!-- <th class="thin">ID</th> -->
202202
<th class="thin sort-criterion default-down" :class="{'sort-selected':this.sortKey == 'qtm', 'sort-down': this.sortOrder < 0}"
203-
@click="changeSortMode('qtm')" title="Click to sort by Query TM-score">qTM</th>
203+
@click="changeSortMode('qtm')" :title="searchType === 'interfacesearch' ? 'Click to sort by Query Interface TM-score' : 'Click to sort by Query TM-score'">qTM</th>
204204
<th class="thin sort-criterion default-down" :class="{'sort-selected':this.sortKey == 'ttm', 'sort-down': this.sortOrder < 0}"
205-
@click="changeSortMode('ttm')" title="Click to sort by Target TM-score" style="border-right: 1px solid #333; ">tTM</th>
205+
@click="changeSortMode('ttm')" :title="searchType === 'interfacesearch' ? 'Click to sort by Target Interface TM-score' : 'Click to sort by Target TM-score'" style="border-right: 1px solid #333; ">tTM</th>
206206
</template>
207207
<th :class="[`wide-${3 - entry.hasDescription - entry.hasTaxonomy}`, {'sort-selected': this.sortKey == 'target', 'sort-down': this.sortOrder < 0}]"
208208
class="sort-criterion" title="Click to sort by target name" @click="changeSortMode('target')">
@@ -272,8 +272,8 @@
272272
</div>
273273
</td>
274274
<template v-if="index == 0 && isComplex">
275-
<td class="thin" data-label="Query TM-score" :rowspan="entry.alignments[groupidx].length">{{ entry.alignments[groupidx][0].complexqtm.toFixed(2) }}</td>
276-
<td class="thin" data-label="Target TM-score" :rowspan="entry.alignments[groupidx].length">{{ entry.alignments[groupidx][0].complexttm.toFixed(2) }}</td>
275+
<td class="thin" :data-label="searchType === 'interfacesearch' ? 'Query Interface TM-score' : 'Query TM-score'" :rowspan="entry.alignments[groupidx].length">{{ entry.alignments[groupidx][0].complexqtm.toFixed(2) }}</td>
276+
<td class="thin" :data-label="searchType === 'interfacesearch' ? 'Target Interface TM-score' : 'Target TM-score'" :rowspan="entry.alignments[groupidx].length">{{ entry.alignments[groupidx][0].complexttm.toFixed(2) }}</td>
277277
</template>
278278
<td class="db long" data-label="Target"
279279
:style="{ 'border-width' : isComplex ? '5px' : null,
@@ -409,7 +409,7 @@ export default {
409409
default: 1000
410410
},
411411
alignment: {
412-
type: Object,
412+
type: [Object, Array],
413413
default: null,
414414
},
415415
closeAlignment: {
@@ -424,6 +424,10 @@ export default {
424424
type: Boolean,
425425
default: false,
426426
},
427+
searchType: {
428+
type: String,
429+
default: "",
430+
},
427431
},
428432
watch: {
429433
filteredHitsTaxIds: {

frontend/ResultView.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,15 @@
9898
<TopHits
9999
v-if="hits && hits.results && hits.results.length > 1"
100100
v-show="selectedDatabases == 0"
101-
:hits="hits" :mode="isComplex ? 1 : 0" :alignMode="mode"
101+
:hits="hits" :mode="isComplex ? 1 : 0" :alignMode="mode" :searchType="searchType"
102102
@jumpTo="i => selectedDatabases = i+1"
103103
/>
104104
<keep-alive>
105105
<Top100Foldseek
106106
v-if="hits && hits.results && hits.results.length > 1 && selectedDatabases == 0" ref="top100"
107107
:hits="hits" :mode="mode" :isComplex="isComplex" :tableMode="tableMode" :alignment="alignment"
108108
:selectedStates="selectedStates" :selectedCounts="selectedCounts" :selectUpperbound="selectUpperbound"
109+
:searchType="searchType"
109110
@switchTableMode="(n) => switchTableMode(n)"
110111
@showAlignment="(o, db, e) => showAlignment(o, db, e)"
111112
@toggleSelection="(db, i, v) => handleToggleSelection(db, i, v, true)"
@@ -119,7 +120,7 @@
119120
:tableMode="tableMode" :entryidx="entryidx" :entry="entry" :toggleSourceDb="toggleSourceDb"
120121
:mode="mode" :selectedStates="selectedStates[entryidx]" :selectedCounts="selectedCountPerDb[entryidx]"
121122
:totalSelectedCounts="selectedCounts" :selectUpperbound="selectUpperbound" :alignment="alignment"
122-
:onlyOne="hits.results.length == 1" :isComplex="isComplex"
123+
:onlyOne="hits.results.length == 1" :isComplex="isComplex" :searchType="searchType"
123124
@switchTableMode="(n) => switchTableMode(n)"
124125
@forwardDropdown="(e, h) => forwardDropdown(e, h)"
125126
@showAlignment="(i, e) => showAlignment(i, entry.db, e)"

frontend/Top100Foldseek.vue

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,15 @@
5353
:value="sortMenuValue"
5454
>
5555
<v-list-item v-if="isComplex" @click.stop="changeSortMode('qtm')">
56-
<v-list-item-title>Query TM-score</v-list-item-title>
56+
<v-list-item-title>{{ searchType === 'interfacesearch' ? 'Query Interface TM-score' : 'Query TM-score' }}</v-list-item-title>
5757
<v-list-item-icon>
5858
<v-icon :style="{'opacity' : sortKey == 'qtm' ? '1' : 0}">
5959
{{$MDI.Check}}
6060
</v-icon>
6161
</v-list-item-icon>
6262
</v-list-item>
6363
<v-list-item v-if="isComplex" @click.stop="changeSortMode('ttm')">
64-
<v-list-item-title>Target TM-score</v-list-item-title>
64+
<v-list-item-title>{{ searchType === 'interfacesearch' ? 'Target Interface TM-score' : 'Target TM-score' }}</v-list-item-title>
6565
<v-list-item-icon>
6666
<v-icon :style="{'opacity' : sortKey == 'ttm' ? '1' : 0}">
6767
{{$MDI.Check}}
@@ -137,7 +137,7 @@
137137
'background-color': $vuetify.theme.dark ? '#1e1e1e' : '#fff'}">
138138
<tr v-if="isComplex">
139139
<th colspan="1"></th>
140-
<th colspan="2" style="text-align:center; width:10%; border-right: 1px solid #333; border-bottom: 1px solid #333;">Complex</th>
140+
<th colspan="2" style="text-align:center; width:10%; border-right: 1px solid #333; border-bottom: 1px solid #333;">{{ searchType === 'interfacesearch' ? 'Interface' : 'Complex' }}</th>
141141
<th :colspan="6 + hasDescription + hasTaxonomy + ((tableMode == 1) ? 2 : 0)" style="text-align:center; border-bottom: 1px solid #333;">Chain</th>
142142
</tr>
143143
<tr>
@@ -158,9 +158,9 @@
158158
<template v-if="isComplex">
159159
<!-- <th class="thin">ID</th> -->
160160
<th class="thin sort-criterion default-down" :class="{'sort-selected':this.sortKey == 'qtm', 'sort-down': this.sortOrder < 0}"
161-
@click="changeSortMode('qtm')" title="Click to sort by Query TM-score">qTM</th>
161+
@click="changeSortMode('qtm')" :title="searchType === 'interfacesearch' ? 'Click to sort by Query Interface TM-score' : 'Click to sort by Query TM-score'">qTM</th>
162162
<th class="thin sort-criterion default-down" :class="{'sort-selected':this.sortKey == 'ttm', 'sort-down': this.sortOrder < 0}"
163-
@click="changeSortMode('ttm')" title="Click to sort by Target TM-score" style="border-right: 1px solid #333; ">tTM</th>
163+
@click="changeSortMode('ttm')" :title="searchType === 'interfacesearch' ? 'Click to sort by Target Interface TM-score' : 'Click to sort by Target TM-score'" style="border-right: 1px solid #333; ">tTM</th>
164164
</template>
165165
<th :class="[`wide-${3 - hasDescription - hasTaxonomy}`]">
166166
<template v-if="isComplex">
@@ -232,8 +232,8 @@
232232
></div>
233233
</td>
234234
<template v-if="index == 0 && isComplex">
235-
<td class="thin" data-label="Query TM-score" :rowspan="hits.results[dbIdx].alignments[groupidx].length">{{ item.complexqtm.toFixed(2) }}</td>
236-
<td class="thin" data-label="Target TM-score" :rowspan="hits.results[dbIdx].alignments[groupidx].length"
235+
<td class="thin" :data-label="searchType === 'interfacesearch' ? 'Query Interface TM-score' : 'Query TM-score'" :rowspan="hits.results[dbIdx].alignments[groupidx].length">{{ item.complexqtm.toFixed(2) }}</td>
236+
<td class="thin" :data-label="searchType === 'interfacesearch' ? 'Target Interface TM-score' : 'Target TM-score'" :rowspan="hits.results[dbIdx].alignments[groupidx].length"
237237
>
238238
{{ item.complexttm.toFixed(2) }}
239239
<div class="border-td" :data-text="idxToDb[dbIdx].toUpperCase()"
@@ -337,6 +337,7 @@ export default {
337337
selectedStates: {default: null},
338338
selectedCounts: {default: 0},
339339
selectUpperbound: {default: 1000},
340+
searchType: {type: String, default: ""},
340341
},
341342
methods: {
342343
changeSortMode(key) {

frontend/TopHitEntries.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@
4141
<canvas class="thumbnail-img" :id="`${entry.db}-thumbnail-canvas`" v-show="!isActive && thumbnailUrl"></canvas>
4242
</div>
4343
<v-card-text>
44-
<div class="card-content-entry" data-label="Query TM-score" v-if="entry.qTM">
44+
<div class="card-content-entry" :data-label="searchType === 'interfacesearch' ? 'Query Interface TM-score' : 'Query TM-score'" v-if="entry.qTM">
4545
<span>{{ entry.qTM }}</span>
4646
</div>
47-
<div class="card-content-entry" data-label="Target TM-score" v-if="entry.tTM">
47+
<div class="card-content-entry" :data-label="searchType === 'interfacesearch' ? 'Target Interface TM-score' : 'Target TM-score'" v-if="entry.tTM">
4848
<span>{{ entry.tTM }}</span>
4949
</div>
5050
<div class="card-content-entry" :data-label="mode == 1 ? 'Chain Pairing' : 'Target'">
@@ -155,6 +155,10 @@ export default {
155155
type: Boolean,
156156
default: false,
157157
},
158+
searchType: {
159+
type: String,
160+
default: "",
161+
},
158162
},
159163
beforeMount() {
160164
if (this.entry?.topHit) {

frontend/TopHits.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
:thumbnailUrl="thumbnailCache[hit.db]"
2828
:isActive="activeCardId === hit.db"
2929
:isSpinning="activeCardId === hit.db && viewerSpinning"
30+
:searchType="searchType"
3031
@activate="handleCardActivate(hit)"
3132
@resetView="handleToolbarResetView"
3233
@toggleSpin="handleToolbarToggleSpin"
@@ -75,6 +76,10 @@ export default {
7576
alignMode: {
7677
type: String,
7778
default: "",
79+
},
80+
searchType: {
81+
type: String,
82+
default: "",
7883
}
7984
},
8085
methods: {

0 commit comments

Comments
 (0)