Skip to content

Commit 216cfa1

Browse files
committed
UPD pre-release
1 parent 3b16ad3 commit 216cfa1

36 files changed

+792
-252
lines changed

Diff for: CHANGELOG.md

+17
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,23 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/), and this
55

66
## [Release candidate] - started 2024-09-25
77

8+
### Added
9+
10+
- bedRMod validation in Comparison (#92)
11+
- TypeScript
12+
13+
### Changed
14+
15+
- utils
16+
- Error handling
17+
- Documentation
18+
19+
### Fixed
20+
21+
- Gene cache management
22+
- EUF toggle in Comparison
23+
- SMID/EUFID length validation
24+
825
## [3.0.0] 2024-09-25
926

1027
### Added

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ For bugs, issues, or feature requests, use the [bug tracker](https://github.com/
3333

3434
## How to cite
3535

36-
Etienne Boileau, Haradl Wilhelmi, Anne Busch, Andrea Cappannini, Andreas Hildebrand, Janusz M. Bujnicki, Christoph Dieterich. [Sci-ModoM: a quantitative database of transcriptome-wide high-throughput RNA modification sites](none), _Nucleic Acids Research_, ...
36+
Etienne Boileau, Harald Wilhelmi, Anne Busch, Andrea Cappannini, Andreas Hildebrand, Janusz M. Bujnicki, Christoph Dieterich. [Sci-ModoM: a quantitative database of transcriptome-wide high-throughput RNA modification sites](https://academic.oup.com/nar/advance-article/doi/10.1093/nar/gkae972/7875981), _Nucleic Acids Research_, 2024;, gkae972, [https://doi.org/10.1093/nar/gkae972](https://doi.org/10.1093/nar/gkae972).
3737

3838
## License
3939

Diff for: TODO.org

+22-12
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,33 @@ Draft or long-running issues, WIP, triage, and additional references or context
99

1010
- [ ] ~pre-commit run --all-files~ under server (.pre-commit-config.yaml) runs for all files incl. client.
1111

12-
** TODO STYLE [2/22]
12+
** TODO STYLE [11/23]
1313

1414
- [ ] DEADLINE: <2024-09-30 Mon> To harmonize style across views, components, and presets (colours, behaviour, dark mode, /etc./).
1515

16-
- [ ] CascadeSelect /cf./ [[https://github.com/dieterich-lab/scimodom/issues/103][Cascade truncated.]]
17-
- [ ] CascadeSelect "No available options" is not defined, /cf./ TreeSelect or Dropdown. Styling is different.
18-
- [ ] In ~ProjectMetadata,vue~, some placeholders are grey, others are black/darker (resp. lighter in dark mode).
19-
- [ ] Dark mode (specific issues)
16+
- [X] CascadeSelect /cf./ [[https://github.com/dieterich-lab/scimodom/issues/103][Cascade truncated.]]
17+
- [X] CascadeSelect "No available options" is not defined, /cf./ TreeSelect or Dropdown. Styling is different.
18+
- [X] In ~ProjectMetadata,vue~, some placeholders are grey, others are black/darker (resp. lighter in dark mode).
19+
- [-] Dark mode (specific issues)
2020
- [ ] Logos are displayed in greyscale in dark mode, as invert also inverts the colors. Otherwise, we may have to use 2 logos,
2121
or create SVGs.
22-
- [ ] ~DataTable~: ~stripedRows~ for dark mode.
22+
- [X] ~DataTable~: ~stripedRows~ for dark mode.
2323
- [ ] ~VirtualScroll~ not working, see [[https://github.com/primefaces/primevue-tailwind/issues/108][Missing preset for VirtualScroller]] and [[https://github.com/primefaces/primevue-tailwind/issues/168][VirtualScroller not working with DataTabe.]]
24-
- [ ] Placeholder text color ~TreeSelect~ /vs./ ~MultiSelect~.
25-
- [ ] Default preset color is secondary for ~DataTable~, ~Paginator~, and ~tabView~. Why not use a local ~ptOptions~
24+
As of v4.1.1, the new Tailwind styles have been rewritten using the preprocessor approach with ~@apply~ instead of pass-through.
25+
As a result this issue is not relevant any more. We're using [email protected]~. Updating to latest version will most likely
26+
break. See also https://tailwind.primevue.org/vite/.
27+
- [ ] Unpredictable color for ring (dark mode). This is an example of a more general problem.
28+
UiStyle ~inputTextDefaultClasses~ redefines the ring color /e.g./ inside ~InputText~ in ~FormTextInput.vue~, but when
29+
~parent.instance.$name !== 'InputGroup'~ the default preset values somehow overwrite the style, even though the latter is
30+
applied afterwards. When need to use ~:ptOptions="{ mergeProps: true }"~, because we don't want to rewrite the style entirely.
31+
Modifying a value in ~ui_style.ts~ works only temporarily or unpredictably, and /e.g./ adding ~!~ does not work, as
32+
it overwrites the ~errorClasses~. See [[https://github.com/tailwindlabs/tailwindcss/discussions/12733][Which bg color should be apply, when multiply bg-color class was appled to the same element?]]
33+
for an explanation and possible ways to solve this.
34+
- [X] Placeholder text color ~TreeSelect~ /vs./ ~MultiSelect~.
35+
- [X] Default preset color is secondary for ~DataTable~, ~Paginator~, and ~tabView~. Why not use a local ~ptOptions~
2636
with ~mergeSections="false"~? Else this has to be documented.
2737
- [ ] Use fill and stroke for svg/icons, instead of text color, see also [[https://github.com/dieterich-lab/scimodom/issues/64][Add icon to InputText not working]].
28-
- [ ] Button presets adapted for /primary/ and /secondary/ by redefining the API for severity. Should we redefine the API
38+
- [X] Button presets adapted for /primary/ and /secondary/ by redefining the API for severity. Should we redefine the API
2939
or add another option, or just leave it as is?
3040
- [ ] ~DataTable~ filters /e.g./ ~filterMatchModeDropdown~ show a mix of primary and default green colors (where is this
3141
defined in presets? Can we use ~pt~?)
@@ -35,13 +45,13 @@ Draft or long-running issues, WIP, triage, and additional references or context
3545
- [ ] Why ~SectionLayout~ with ~secondary="true"~ in dark mode have a white border at the top?
3646
- [ ] ~TreeSelect~, ~MultiSelect~, and ~Dropdown~ root class shape commented out, using local ~pt~, as I couldn't get it to work,
3747
in particular in grid (Compare), but we should leave this untouched.
38-
- [ ] (Browse) ~InputText~ and ~Dialog~ local ~pt~ has no effect with alpha modifier for secondary color using **Wind** preset.
48+
- [X] (Browse) ~InputText~ and ~Dialog~ local ~pt~ has no effect with alpha modifier for secondary color using **Wind** preset.
3949
Temporarily removed ~/50~ for ~dialog~ and ~inputtext~ (focus). Local ~pt~ description currently follows the **Lara** preset.
40-
- [ ] To harmonize ~DataTable~ header across views.
50+
- [X] To harmonize ~DataTable~ header across views.
4151
- [ ] Add p-float-label?
4252
- [ ] ~Divider~ styling, thickness and color.
4353
- [X] Custom style ~FormTextInput~ (class/style binding), incl.secondary colour for sign up.
44-
- [ ] Form validation and warnings/messages styling/text for login/sign up/reset components.
54+
- [X] Form validation and warnings/messages styling/text for login/sign up/reset components.
4555
- [ ] Large numbers don't show nicely in the Search paginator.
4656
- [X] Outdated presets for Lara. Remove?
4757
- [ ] Add MeterGroup or ProgessBar for upload? See also [[https://github.com/dieterich-lab/scimodom/issues/94][Dataset upload progress]].

Diff for: client/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<!-- <link rel="preload" as="font" href="src/assets/fonts/ham.woff" type="font/woff" crossorigin="anonymous"> -->
66
<link rel="icon" href="/favicon.ico" />
77
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
8-
<title>SCI-MODOM</title>
8+
<title>Sci-ModoM</title>
99
</head>
1010
<body>
1111
<div id="app"></div>

Diff for: client/package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: client/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "client",
3-
"version": "0.0.0",
3+
"version": "3.0.0",
44
"private": true,
55
"scripts": {
66
"dev": "vite",

Diff for: client/src/components/browse/BrowseView.vue

+1
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ onMounted(async () => {
9898
:exportFilename="getFileName()"
9999
:paginator="true"
100100
:rows="5"
101+
stripedRows
101102
v-model:filters="filters"
102103
filterDisplay="menu"
103104
:globalFilterFields="[

Diff for: client/src/components/compare/CompareStepA.vue

+4-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { type ResultStepA } from '@/utils/comparison'
99
const model = defineModel<ResultStepA>()
1010
1111
const emit = defineEmits<{
12-
(e: 'change', datasets: ResultStepA): void
12+
(e: 'change', result: ResultStepA): void
1313
}>()
1414
1515
const selectedTaxa = ref<Taxa>()
@@ -26,8 +26,10 @@ const changeTaxa = (value: Taxa) => {
2626
2727
function changeDataset(datasets: Dataset[]) {
2828
const datasetIds = datasets.map((x) => x.dataset_id)
29+
const [taxaId] = datasets.map((x) => x.taxa_id)
2930
const result: ResultStepA = {
30-
datasets,
31+
taxaId: taxaId,
32+
datasets: datasets,
3133
remainingDatasets: availableDatasets.value.filter((x) => !datasetIds.includes(x.dataset_id))
3234
}
3335
model.value = result

Diff for: client/src/components/compare/CompareStepB.vue

+25-8
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,19 @@ function uploader(event: FileUploadUploaderEvent) {
5151
})
5252
}
5353
54+
function update() {
55+
if (model.value !== undefined) {
56+
if ('isEUF' in model.value) {
57+
const result: ResultStepB = {
58+
...model.value,
59+
isEUF: isEUF.value
60+
}
61+
model.value = result
62+
emit('change', result)
63+
}
64+
}
65+
}
66+
5467
function reset() {
5568
disableDatasetSelection.value = false
5669
uploadedFileName.value = ''
@@ -66,22 +79,20 @@ function changeDatasets(datasets: Dataset[]) {
6679
model.value = result
6780
emit('change', result)
6881
}
82+
6983
watch(
7084
() => props.resultStepA,
7185
() => {
72-
if (model.value) {
86+
if (model.value !== undefined) {
7387
reset()
7488
}
7589
}
7690
)
7791
</script>
92+
7893
<template>
7994
<div v-if="doneWithStepA">
80-
<div class="mb-4">
81-
At least one reference dataset must be selected. Upload your own data or select up to three
82-
dataset for comparison. For upload, pay attention to the organism and/or the assembly of your
83-
data to avoid spurious comparison results.
84-
</div>
95+
<div class="mb-4">Select up to three dataset for comparison or upload your own data.</div>
8596
<div class="grid grid-cols-3 gap-6">
8697
<InputText
8798
v-model="uploadedFileName"
@@ -102,7 +113,13 @@ watch(
102113
class="w-[8rem]"
103114
>
104115
</FileUpload>
105-
<ToggleButton v-model="isEUF" onLabel="bedRMod" offLabel="BED6" class="w-[8rem] ml-4" />
116+
<ToggleButton
117+
v-model="isEUF"
118+
onLabel="bedRMod"
119+
offLabel="BED6"
120+
@change="update"
121+
class="w-[8rem] ml-4"
122+
/>
106123
<Button
107124
label="Clear selection"
108125
@click="reset"
@@ -123,6 +140,6 @@ watch(
123140
</div>
124141
</div>
125142
<div v-else>
126-
<div class="mb-4">Please select at least one reference dataset first.</div>
143+
<div class="mb-4">Select reference dataset in step 1 to continue.</div>
127144
</div>
128145
</template>

Diff for: client/src/components/compare/CompareStepC.vue

+4-4
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,15 @@ function submit() {
4444
</script>
4545

4646
<template>
47-
<div v-if="!doneWithStepA">Please select at least one reference dataset first.</div>
48-
<div v-else-if="!doneWithStepB">Please select a dataset to compare to.</div>
47+
<div v-if="!doneWithStepA">Select reference dataset in step 1 to continue.</div>
48+
<div v-else-if="!doneWithStepB">Select dataset in step 2 to continue.</div>
4949
<div v-else>
5050
<div class="flex flex-col gap-4">
5151
<div class="flex flex-row">
5252
<div class="w-1/2" v-for="strandAware in [true, false]" :key="String(strandAware)">
5353
<OperationButton
5454
v-model="model"
55-
:value="{ operation: ComparisonOperation.intersect, strandAware }"
55+
:value="{ operation: ComparisonOperation.intersect, strandAware: strandAware }"
5656
>
5757
overlaps between <span class="font-semibold">1</span> and
5858
<span class="font-semibold">2</span>
@@ -64,7 +64,7 @@ function submit() {
6464
<div class="w-1/2" v-for="strandAware in [true, false]" :key="String(strandAware)">
6565
<OperationButton
6666
v-model="model"
67-
:value="{ operation: ComparisonOperation.closest, strandAware }"
67+
:value="{ operation: ComparisonOperation.closest, strandAware: strandAware }"
6868
>
6969
closest non-overlaps in <span class="font-semibold">2</span> (wrt.
7070
<span class="font-semibold">1</span>)

Diff for: client/src/components/documentation/DocCompare.vue

+9-5
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,16 @@ import img4 from '@/assets/images/docs/compare4.png'
3333
<img :src="img2" class="object-center mt-6 mb-6" alt="Compare: filter 2" />
3434
You can also use your own data (bedRMod or BED format), click on "Select a file". The format
3535
is automatically recognized, but can also be forced by using the toggle button. You data is
36-
securely handled and is automatically deleted. BED files with more than 6 columns are cut down
37-
to BED6.
36+
securely handled and is automatically deleted.
37+
<Message severity="info" :closable="false"
38+
>bedRmod is fully supported. The format specifications are enforced. Records from a
39+
different assembly are automatically lifted over for comparison.</Message
40+
>
3841
<Message severity="warn" :closable="false"
39-
>Data coming from a different assembly or an inconsistent choice of reference dataset will
40-
lead to spurious comparison results. Liftover is not yet available for data
41-
comparison!</Message
42+
>BED files with more than 6 columns are cut down to BED6. Header lines starting with # are
43+
ignored. There is no organism and/or assembly validation. Data coming from a different
44+
assembly or an inconsistent choice of reference dataset will lead to spurious comparison
45+
results.</Message
4246
>
4347
Finally, select the operation you want to perform on the datasets selected in previous steps:
4448
<img :src="img3" class="object-center mt-6 mb-6" alt="Compare: filter 3" />

Diff for: client/src/components/home/HomeIntro.vue

+25
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,30 @@ import SectionLayout from '@/components/layout/SectionLayout.vue'
2222
<Button icon="pi pi-arrow-right" label="Learn more" rounded />
2323
</a>
2424
</div>
25+
<div class="flex justify-center mt-4 py-4">
26+
<h1 class="font-ham text-xl font-semibold m-auto p-4 dark:text-white/80">
27+
<span>How to cite</span>
28+
</h1>
29+
</div>
30+
<div class="flex flex-col item-stretch text-700 line-height-3 -mt-4 dark:text-white/80">
31+
<div class="self-center">
32+
Etienne Boileau, Harald Wilhelmi, Anne Busch, Andrea Cappannini, Andreas Hildebrand, Janusz
33+
M. Bujnicki, Christoph Dieterich.
34+
</div>
35+
<div class="self-center">
36+
<a
37+
class="text-primary-500 hover:text-secondary-500"
38+
href="https://doi.org/10.1093/nar/gkae972"
39+
target="_blank"
40+
rel="noopener noreferrer"
41+
>
42+
Sci-ModoM: a quantitative database of transcriptome-wide high-throughput RNA modification
43+
sites
44+
</a>
45+
</div>
46+
<div class="self-center">
47+
<span class="italic">Nucleic Acids Research</span>, 2024, gkae972.
48+
</div>
49+
</div>
2550
</SectionLayout>
2651
</template>

Diff for: client/src/components/layout/HeaderLayout.vue

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import { useAccessToken } from '@/stores/AccessToken.js'
77
import { useRouter } from 'vue-router'
88
import ScimodomLogo from './ScimodomLogo.vue'
99
import NavigationBar from './NavigationBar.vue'
10-
import { getApiBaseUrl } from '@/services/API'
1110
1211
const router = useRouter()
1312
@@ -16,7 +15,7 @@ const accessToken = useAccessToken()
1615
1716
const isLoggedIn = computed(() => accessToken.token !== null)
1817
const userName = computed(getUserName)
19-
const isDev = computed(() => getApiBaseUrl() !== 'https://scimodom.dieterichlab.org/api/v0/')
18+
const isDev = computed(() => import.meta.env.DEV === true)
2019
2120
const menu = ref()
2221
const items = ref([

Diff for: client/src/main.ts

+9-12
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,26 @@
11
import { createApp } from 'vue'
22
import App from '@/App.vue'
33

4-
// global styles
5-
import '@/assets/style/index.css'
6-
// presets
4+
// PrimeVue
75
import PrimeVue from 'primevue/config'
8-
import WindScm from '@/presets/windscm'
9-
import { VueCookieNext } from 'vue-cookie-next'
10-
import { createPinia } from 'pinia'
11-
// UI components
12-
import 'primeicons/primeicons.css'
136
import ConfirmationService from 'primevue/confirmationservice'
147
import DialogService from 'primevue/dialogservice'
158
import Tooltip from 'primevue/tooltip'
16-
// layout components
17-
189
import ToastService from 'primevue/toastservice'
1910

11+
// global styles
12+
import '@/assets/style/index.css'
13+
import 'primeicons/primeicons.css'
14+
// presets
15+
import WindScm from '@/presets/windscm'
16+
17+
import { VueCookieNext } from 'vue-cookie-next'
18+
import { createPinia } from 'pinia'
2019
import router from '@/router'
2120

2221
const app = createApp(App)
2322

24-
// app.use(PrimeVue, { unstyled: true, pt: LaraScm, ripple: true })
2523
app.use(PrimeVue, { unstyled: true, pt: WindScm, ripple: true })
26-
2724
app.use(ToastService)
2825
app.use(ConfirmationService)
2926
app.use(DialogService)

Diff for: client/src/router/index.ts

-8
Original file line numberDiff line numberDiff line change
@@ -123,14 +123,6 @@ const router = createRouter({
123123
name: 'PageNotFound',
124124
component: PageNotFound
125125
}
126-
// {
127-
// path: '/about',
128-
// name: 'about',
129-
// // route level code-splitting
130-
// // this generates a separate chunk (About.[hash].js) for this route
131-
// // which is lazy-loaded when the route is visited.
132-
// component: () => import('../views/AboutView.vue'),
133-
// },
134126
],
135127
linkActiveClass: 'text-primary-500',
136128
// eslint-disable-next-line @typescript-eslint/no-unused-vars

Diff for: client/src/services/API.ts

+3-4
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ import axios, { type AxiosResponse, type InternalAxiosRequestConfig } from 'axio
22
import { type AccessTokenStore, useAccessToken } from '@/stores/AccessToken.js'
33
import { DIALOG, type DialogStateStore, useDialogState } from '@/stores/DialogState.js'
44

5-
// TODO: refactor HTTP as HTTPPublic either export service, or
6-
// rename exported functions
5+
const API_PREFIX = '/api/v0/'
76

87
interface ErrorResponse {
98
message: string
@@ -29,9 +28,9 @@ function isErrorResponse(x: unknown): x is ErrorResponse {
2928

3029
function getApiBaseUrl(): string {
3130
if (import.meta.env.PROD) {
32-
return '/api/v0/'
31+
return API_PREFIX
3332
} else {
34-
return import.meta.env?.VITE_API_BASE_URL ? import.meta.env.VITE_API_BASE_URL : '/api/v0/'
33+
return import.meta.env?.VITE_API_BASE_URL ? import.meta.env.VITE_API_BASE_URL : API_PREFIX
3534
}
3635
}
3736

0 commit comments

Comments
 (0)