Skip to content

Commit 2dafd6b

Browse files
committed
Format lol-score in result list
1 parent 47a0fa1 commit 2dafd6b

2 files changed

Lines changed: 18 additions & 3 deletions

File tree

frontend/ResultView.vue

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@
168168
<th v-if="entry.hasTaxonomy">Scientific Name</th>
169169
<th class="thin">Prob.</th>
170170
<th class="thin">Seq. Id.</th>
171-
<th class="thin">{{ $APP == 'foldseek' && mode == 'tmalign' ? 'TM-score' : 'E-Value' }}</th>
171+
<th class="thin">{{ scoreColumnName }}</th>
172172
<th class="thin" v-if="tableMode == 1">Score</th>
173173
<th v-if="tableMode == 1">Query Pos.</th>
174174
<th v-if="tableMode == 1">Target Pos.</th>
@@ -205,7 +205,7 @@
205205
<td class="long" v-if="entry.hasTaxonomy" data-label="Taxonomy"><a :href="'https://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?mode=Info&id=' + item.taxId" target="_blank" rel="noopener" :title="item.taxName">{{ item.taxName }}</a></td>
206206
<td class="thin" data-label="Probability">{{ item.prob }}</td>
207207
<td class="thin" data-label="Sequence Identity">{{ item.seqId }}</td>
208-
<td class="thin" :data-label="$APP == 'foldseek' && mode == 'tmalign' ? 'TM-score' : 'E-Value'">{{ item.eval }}</td>
208+
<td class="thin" :data-label="scoreColumnName">{{ item.eval }}</td>
209209
<td class="thin" v-if="tableMode == 1" data-label="Score">{{ item.score }}</td>
210210
<td v-if="tableMode == 1" data-label="Query Position">{{ item.qStartPos }}-{{ item.qEndPos }} ({{ item.qLen }})</td>
211211
<td v-if="tableMode == 1" data-label="Target Position">{{ item.dbStartPos }}-{{ item.dbEndPos }} ({{ item.dbLen }})</td>
@@ -341,7 +341,19 @@ export default {
341341
}
342342
343343
return "ERROR";
344-
}
344+
},
345+
scoreColumnName() {
346+
console.log(this.mode)
347+
if (__APP__ == 'foldseek') {
348+
switch (this.mode) {
349+
case 'tmalign':
350+
return 'TM-score';
351+
case 'lolalign':
352+
return 'LoL-score';
353+
}
354+
}
355+
return 'E-Value';
356+
},
345357
},
346358
methods: {
347359
log(args) {

frontend/Utilities.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,9 @@ export function parseResults(data) {
134134
item.prob = (typeof(item.prob) === "string") ? item.prob : item.prob.toFixed(2);
135135
if (data.mode == "tmalign") {
136136
item.eval = (typeof(item.eval) === "string") ? item.eval : item.eval.toFixed(3);
137+
} else if (data.mode == "lolalign") {
138+
item.eval = item.eval * 100;
139+
item.eval = parseFloat(item.eval.toFixed(2)).toString()
137140
}
138141
}
139142
if ("taxId" in item) {

0 commit comments

Comments
 (0)