Skip to content

Commit 655a8dc

Browse files
authored
Merge pull request #472 from VariantEffect/release-2025.4.1
Release 2025.4.1
2 parents 5ccea1f + cd4f87e commit 655a8dc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+1980
-1229
lines changed

index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
<link rel="icon" href="/mavedb-icon.png" type="image/png" />
88
<link rel="icon" href="/mavedb-icon.ico" sizes="32x32" />
99
<link rel="alternate icon" href="/favicon.png" />
10-
<title>%VITE_SITE_TITLE%</title>
1110
</head>
1211
<body>
1312
<noscript>

package-lock.json

Lines changed: 37 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: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mavedb-ui",
3-
"version": "2025.3.0",
3+
"version": "2025.4.1",
44
"private": true,
55
"type": "module",
66
"scripts": {
@@ -15,6 +15,7 @@
1515
"@fortawesome/free-regular-svg-icons": "^7.0.0",
1616
"@fortawesome/free-solid-svg-icons": "^7.0.0",
1717
"@fortawesome/vue-fontawesome": "^3.1.1",
18+
"@unhead/vue": "^2.0.17",
1819
"axios": "^1.11.0",
1920
"chart.js": "^4.4.1",
2021
"d3": "^7.9.0",

src/App.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ import {mapActions, mapState} from 'vuex'
1212
1313
export default {
1414
components: {ConfirmDialog, Toast},
15+
1516
computed: mapState('toast', ['toasts']),
17+
1618
watch: {
1719
toasts: {
1820
deep: true,
@@ -24,6 +26,7 @@ export default {
2426
}
2527
}
2628
},
29+
2730
methods: mapActions('toast', ['removeDequeuedToasts'])
2831
}
2932
</script>

src/components/AssayFactSheet.vue

Lines changed: 51 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
11
<template>
22
<div class="mavedb-assay-facts-card">
33
<div class="mavedb-assay-facts-card-header">
4-
<span class="mavedb-assay-facts-author">{{ authorLine }}</span>
4+
<span class="mavedb-assay-facts-heading">
5+
<template v-if="firstAuthor">{{ firstAuthor }}</template>
6+
<span v-if="firstAuthor && numAuthors > 1" class="mavedb-assay-facts-heading-et-al">&nbsp;et al.</span>
7+
<template v-if="geneAndYear"><template v-if="firstAuthor">&nbsp;</template>{{ geneAndYear }}</template>
8+
<span v-if="(firstAuthor || geneAndYear) && journal" class="mavedb-assay-facts-heading-journal"
9+
>&nbsp;{{ journal }}</span
10+
>
11+
<template v-if="missingAuthorGeneAndYear">Score set</template>
12+
</span>
513
</div>
614
<div class="mavedb-assay-facts-section mavedb-assay-facts-bottom-separator">
715
<div class="mavedb-assay-facts-row">
@@ -19,6 +27,17 @@
1927
<div v-else>Not specified</div>
2028
</div>
2129
</div>
30+
<div class="mavedb-assay-facts-row">
31+
<div class="mavedb-assay-facts-label">Molecular Mechanism Assessed</div>
32+
<div class="mavedb-assay-facts-value">
33+
<div v-if="scoreSet.experiment.keywords?.some((k) => k.keyword.key === 'Molecular Mechanism Assessed')">
34+
{{
35+
scoreSet.experiment.keywords.find((k) => k.keyword.key === 'Molecular Mechanism Assessed').keyword.label
36+
}}
37+
</div>
38+
<div v-else>Not specified</div>
39+
</div>
40+
</div>
2241
<div class="mavedb-assay-facts-row">
2342
<div class="mavedb-assay-facts-label">Variant Consequences Detected</div>
2443
<div class="mavedb-assay-facts-value">
@@ -108,8 +127,10 @@
108127
</template>
109128

110129
<script lang="ts">
130+
import _ from 'lodash'
111131
import {defineComponent, PropType} from 'vue'
112132
133+
import {getScoreSetFirstAuthor} from '@/lib/score-sets'
113134
import type {components} from '@/schema/openapi'
114135
115136
export default defineComponent({
@@ -123,15 +144,29 @@ export default defineComponent({
123144
},
124145
125146
computed: {
126-
authorLine: function () {
127-
const author = this.scoreSet.primaryPublicationIdentifiers[0]?.authors[0].name
128-
const gene = this.scoreSet.targetGenes?.[0]?.name || ''
129-
const year = this.scoreSet.primaryPublicationIdentifiers[0]?.publicationYear || ''
147+
firstAuthor: function () {
148+
const firstAuthor = getScoreSetFirstAuthor(this.scoreSet)
149+
return !firstAuthor || _.isEmpty(firstAuthor?.name) ? undefined : firstAuthor.name.split(',')[0]
150+
},
130151
131-
if (author && author.length > 0) {
132-
return `${author} et al. ${gene} ${year}`
133-
}
134-
return `${gene} ${year}`
152+
numAuthors: function () {
153+
return this.scoreSet.primaryPublicationIdentifiers[0]?.authors.length ?? 0
154+
},
155+
156+
geneAndYear: function () {
157+
// TODO VariantEffect/mavedb-api#450
158+
const gene = this.scoreSet.targetGenes?.[0]?.name
159+
const year = this.scoreSet.primaryPublicationIdentifiers[0]?.publicationYear
160+
const parts = [gene, year?.toString()].filter((x) => x != null)
161+
return parts.length > 0 ? parts.join(' ') : undefined
162+
},
163+
164+
missingAuthorGeneAndYear: function () {
165+
return !this.firstAuthor && !this.geneAndYear
166+
},
167+
168+
journal: function () {
169+
return this.scoreSet.primaryPublicationIdentifiers[0]?.publicationJournal
135170
},
136171
137172
detectsNmd: function () {
@@ -241,12 +276,17 @@ export default defineComponent({
241276
border-radius: 4px;
242277
}
243278
244-
/* Specific fields */
279+
/* Heading */
245280
246-
.mavedb-assay-facts-author {
281+
.mavedb-assay-facts-heading {
247282
font-size: 21px;
248283
}
249284
285+
.mavedb-assay-facts-heading-et-al,
286+
.mavedb-assay-facts-heading-journal {
287+
font-style: italic;
288+
}
289+
250290
/* Variant classification */
251291
252292
.mavedb-classification-badge {

src/components/RangeTable.vue

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
</span>
2121
</div>
2222
<div class="mavedb-score-ranges-grid">
23-
<div v-for="range in sortedRanges" :key="range.label" class="mavedb-score-ranges-row" style="">
23+
<div v-if="sortedRanges.length > 0" v-for="range in sortedRanges" :key="range.label" class="mavedb-score-ranges-row" style="">
2424
<div>
2525
<span>{{ range.label }}</span>
2626
<span v-if="range.description">
@@ -53,6 +53,11 @@
5353
</span>
5454
</div>
5555
</div>
56+
<div v-else class="mave-classification-not_provided">
57+
<span style="text-align: center; font-style: italic">
58+
Ranges have not been provided.
59+
</span>
60+
</div>
5661
<div v-if="sortedRanges.some((range: ScoreRange) => 'positiveLikelihoodRatio' in range)">
5762
<span v-if="'positiveLikelihoodRatio' in range">{{ range.positiveLikelihoodRatio }}</span>
5863
<span v-else>Not Provided</span>
@@ -318,6 +323,11 @@ table.mavedb-odds-path-table th {
318323
font-weight: bold;
319324
}
320325
326+
.mave-classification-not_provided {
327+
background-color: #ffffff;
328+
font-style: italic;
329+
}
330+
321331
/* Evidence strengths */
322332
323333
.mave-evidence-code-PS3_VERY_STRONG {

0 commit comments

Comments
 (0)