Skip to content

Commit a9e4d94

Browse files
authored
Merge pull request #350 from VariantEffect/release-2025.1.0
Release 2025.1.0
2 parents 55b52de + 06b98ef commit a9e4d94

26 files changed

+2794
-242
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mavedb-ui",
3-
"version": "2025.0.0",
3+
"version": "2025.1.0",
44
"private": true,
55
"scripts": {
66
"build": "vite build --mode=${MODE=live}",

src/assets/layout.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
}
1616

1717
.mave-screen-title-bar {
18+
align-items: center;
1819
display: flex;
1920
flex-direction: row;
2021
justify-content: space-between;
@@ -24,6 +25,10 @@
2425
margin: 10px 0;
2526
}
2627

28+
.mave-screen-title {
29+
flex: 0 0 auto;
30+
}
31+
2732
.mave-screen-title-controls {
2833
flex: 0 0 auto;
2934
}
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
<template>
2+
<table v-if="evidenceStrengthsForDisplay" class="mave-calibrations-table">
3+
<tr>
4+
<td colspan="100" class="dropdown" >
5+
<Dropdown v-model="activeCalibrationKey" :options="Object.keys(calibrations)" :optionLabel="titleCase" style="width: 100%;" :disabled="Object.keys(calibrations).length < 2" />
6+
</td>
7+
</tr>
8+
<tr>
9+
<th>Evidence Strength</th>
10+
<th v-for="evidenceStrength of evidenceStrengthsForDisplay" :key="evidenceStrength"><b>{{ evidenceStrength }}</b></th>
11+
</tr>
12+
<tr>
13+
<td>Likelihood Ratio+</td>
14+
<td v-for="likelihoodRatio of positiveLikelihoodRatiosForDisplay" :key="likelihoodRatio">{{ likelihoodRatio }}</td>
15+
</tr>
16+
<tr>
17+
<td>Score Threshold</td>
18+
<td v-for="threshold of thresholdsForDisplay" :key="threshold">{{ threshold }}</td>
19+
</tr>
20+
</table>
21+
</template>
22+
23+
<script lang="ts">
24+
import {defineComponent} from 'vue'
25+
import { Calibrations } from '@/lib/calibrations';
26+
import Dropdown from 'primevue/dropdown';
27+
28+
export default defineComponent({
29+
name: 'CalibrationTable',
30+
components: { Dropdown },
31+
32+
data: function() {
33+
const defaultCalibration = Object.keys(this.calibrations)[0]
34+
this.$emit('calibrationSelected', defaultCalibration)
35+
36+
return {
37+
activeCalibrationKey: defaultCalibration
38+
}
39+
},
40+
41+
emits: ['calibrationSelected'],
42+
43+
props: {
44+
calibrations: {
45+
type: Object as () => {[key: string]: Calibrations},
46+
required: true
47+
},
48+
},
49+
50+
computed: {
51+
selectedCalibrations: function () {
52+
return this.calibrations[this.activeCalibrationKey]
53+
},
54+
55+
evidenceStrengthsForDisplay: function() {
56+
return this.selectedCalibrations.evidenceStrengths
57+
},
58+
59+
positiveLikelihoodRatiosForDisplay: function() {
60+
return this.selectedCalibrations.positiveLikelihoodRatios
61+
},
62+
63+
thresholdsForDisplay: function() {
64+
return this.selectedCalibrations.thresholds
65+
},
66+
},
67+
68+
methods: {
69+
titleCase(s: string) {
70+
return s.replace (/^[-_]*(.)/, (_, c) => c.toUpperCase()) // Initial char (after -/_)
71+
.replace (/[-_]+(.)/g, (_, c) => ' ' + c.toUpperCase()) // First char after each -/_
72+
}
73+
},
74+
75+
watch: {
76+
activeCalibrationKey: {
77+
handler: function() {
78+
this.$emit('calibrationSelected', this.activeCalibrationKey)
79+
}
80+
}
81+
}
82+
})
83+
</script>
84+
85+
<style>
86+
table.mave-calibrations-table {
87+
border-collapse: collapse;
88+
margin: 1em auto 0.5em auto;
89+
}
90+
91+
table.mave-calibrations-table .dropdown {
92+
border-top-style: hidden;
93+
border-left-style: hidden;
94+
border-right-style: hidden;
95+
}
96+
97+
table.mave-calibrations-table td,
98+
table.mave-calibrations-table th {
99+
border: 1px solid gray;
100+
padding: 0.5em 1em;
101+
text-align: center;
102+
}
103+
</style>

0 commit comments

Comments
 (0)