diff --git a/configs/dmmm.yaml b/configs/dmmm.yaml index 86a1e2f..a2caddd 100644 --- a/configs/dmmm.yaml +++ b/configs/dmmm.yaml @@ -42,12 +42,12 @@ algorithms: datasets: # TODO: use old paramaters for datasets # HIV: https://github.com/Reed-CompBio/spras-benchmarking/blob/0293ae4dc0be59502fac06b42cfd9796a4b4413e/hiv-benchmarking/spras-config/config.yaml - - label: dmmmhiv060 + - label: dmmmhiv_060 node_files: ["processed_prize_060.txt"] edge_files: ["../../../databases/irefindex/phosphosite-irefindex13.0-uniprot.txt"] other_files: [] data_dir: "datasets/hiv/processed" - - label: dmmmhiv05 + - label: dmmmhiv_05 node_files: ["processed_prize_05.txt"] edge_files: ["../../../databases/irefindex/phosphosite-irefindex13.0-uniprot.txt"] other_files: [] @@ -58,21 +58,21 @@ datasets: edge_files: ["network1.txt"] other_files: [] data_dir: "datasets/yeast-osmotic-stress/processed" - - label: dmmmalopecia_areata + - label: dmmmdiseases_alopecia_areata data_dir: datasets/diseases edge_files: - raw/string_interactome.txt node_files: - prize_files/alopecia_areata_prizes.txt other_files: [] - - label: dmmmdiabetes_mellitus + - label: dmmmdiseases_diabetes_mellitus data_dir: datasets/diseases edge_files: - raw/string_interactome.txt node_files: - prize_files/diabetes_mellitus_prizes.txt other_files: [] - - label: dmmmcellline_fadu + - label: dmmmdepmap_cellline_fadu data_dir: datasets/depmap edge_files: ["../../databases/irefindex/phosphosite-irefindex13.0-uniprot.txt"] node_files: ["processed/FADU_cell_line_prizes_input_nonzero.txt"] @@ -81,12 +81,12 @@ gold_standards: - label: gs0 node_files: ['GS_files/Alopecia_areata_GS.txt'] data_dir: "datasets/diseases" - dataset_labels: ["dmmmalopecia_areata"] + dataset_labels: ["dmmmdiseases_alopecia_areata"] - label: gs1 node_files: ['GS_files/Diabetes_mellitus_GS.txt'] data_dir: "datasets/diseases" - dataset_labels: ["dmmmdiabetes_mellitus"] + dataset_labels: ["dmmmdiseases_diabetes_mellitus"] - label: gs_fadu node_files: ["processed/FADU_gold_standard.txt"] data_dir: datasets/depmap - dataset_labels: ["dmmmcellline_fadu"] + dataset_labels: ["dmmmdepmap_cellline_fadu"] diff --git a/configs/pra.yaml b/configs/pra.yaml index 7051c10..76f14a3 100644 --- a/configs/pra.yaml +++ b/configs/pra.yaml @@ -49,7 +49,7 @@ algorithms: include: true datasets: - - label: pramuscleskeletal2018 + - label: prarn_muscleskeletal2018 node_files: ["sources.txt", "targets.txt"] # DataLoader.py can currently only load a single edge file, which is the primary network edge_files: ["interactome.tsv"] diff --git a/web/.prettierrc b/web/.prettierrc new file mode 100644 index 0000000..d4187da --- /dev/null +++ b/web/.prettierrc @@ -0,0 +1,12 @@ +{ + "printWidth": 120, + "plugins": ["prettier-plugin-astro"], + "overrides": [ + { + "files": "*.astro", + "options": { + "parser": "astro" + } + } + ] +} diff --git a/web/astro.config.mts b/web/astro.config.mts index f34facc..5c4792e 100644 --- a/web/astro.config.mts +++ b/web/astro.config.mts @@ -1,8 +1,8 @@ // @ts-check -import { defineConfig } from 'astro/config'; +import { defineConfig } from "astro/config"; // https://astro.build/config export default defineConfig({ - base: '/spras-benchmarking', - trailingSlash: 'always' + base: "/spras-benchmarking", + trailingSlash: "always", }); diff --git a/web/package.json b/web/package.json index dbf8468..74b19ed 100644 --- a/web/package.json +++ b/web/package.json @@ -3,21 +3,25 @@ "type": "module", "version": "0.0.1", "scripts": { - "prepare-output": "mkdir -p public/data && cp -r ../output/ public/data", + "prepare-output": "mkdir -p public/data && cp -r ../output/ public/data && cp -r ../configs/ public/data", "dev": "pnpm prepare-output && astro dev", "build": "pnpm prepare-output && astro build", "preview": "astro preview", - "astro": "astro" + "astro": "astro", + "format": "pnpm exec prettier . --write" }, "dependencies": { "@fontsource-variable/noto-sans": "^5.2.10", "astro": "^5.16.6", "dayjs": "^1.11.19", "medium-zoom": "^1.1.0", - "sass": "^1.97.1" + "sass": "^1.97.1", + "yaml": "^2.8.2" }, "devDependencies": { + "prettier": "3.7.4", + "prettier-plugin-astro": "0.14.1", "vis-data": "^8.0.3", "vis-network": "^10.0.2" } -} \ No newline at end of file +} diff --git a/web/pnpm-lock.yaml b/web/pnpm-lock.yaml index c2791a5..c6e3136 100644 --- a/web/pnpm-lock.yaml +++ b/web/pnpm-lock.yaml @@ -13,7 +13,7 @@ importers: version: 5.2.10 astro: specifier: ^5.16.6 - version: 5.16.6(@types/node@25.0.3)(rollup@4.54.0)(sass@1.97.1)(typescript@5.8.3) + version: 5.16.6(@types/node@25.0.3)(rollup@4.54.0)(sass@1.97.1)(typescript@5.8.3)(yaml@2.8.2) dayjs: specifier: ^1.11.19 version: 1.11.19 @@ -23,7 +23,16 @@ importers: sass: specifier: ^1.97.1 version: 1.97.1 + yaml: + specifier: ^2.8.2 + version: 2.8.2 devDependencies: + prettier: + specifier: 3.7.4 + version: 3.7.4 + prettier-plugin-astro: + specifier: 0.14.1 + version: 0.14.1 vis-data: specifier: ^8.0.3 version: 8.0.3(uuid@13.0.0)(vis-util@6.0.0(@egjs/hammerjs@2.0.17)(component-emitter@2.0.0)) @@ -1275,6 +1284,15 @@ packages: resolution: {integrity: sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==} engines: {node: ^10 || ^12 || >=14} + prettier-plugin-astro@0.14.1: + resolution: {integrity: sha512-RiBETaaP9veVstE4vUwSIcdATj6dKmXljouXc/DDNwBSPTp8FRkLGDSGFClKsAFeeg+13SB0Z1JZvbD76bigJw==} + engines: {node: ^14.15.0 || >=16.0.0} + + prettier@3.7.4: + resolution: {integrity: sha512-v6UNi1+3hSlVvv8fSaoUbggEM5VErKmmpGA7Pl3HF8V6uKY7rvClBOJlH6yNwQtfTueNkGVpOv/mtWL9L4bgRA==} + engines: {node: '>=14'} + hasBin: true + prismjs@1.30.0: resolution: {integrity: sha512-DEvV2ZF2r2/63V+tK8hQvrR2ZGn10srHbXviTlcv7Kpzw8jWiNTqbVgjO3IY8RxrrOUF8VPMQQFysYYYv0YZxw==} engines: {node: '>=6'} @@ -1350,6 +1368,12 @@ packages: engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true + s.color@0.0.15: + resolution: {integrity: sha512-AUNrbEUHeKY8XsYr/DYpl+qk5+aM+DChopnWOPEzn8YKzOhv4l2zH6LzZms3tOZP3wwdOyc0RmTciyi46HLIuA==} + + sass-formatter@0.7.9: + resolution: {integrity: sha512-CWZ8XiSim+fJVG0cFLStwDvft1VI7uvXdCNJYXhDvowiv+DsbD1nXLiQ4zrE5UBvj5DWZJ93cwN0NX5PMsr1Pw==} + sass@1.97.1: resolution: {integrity: sha512-uf6HoO8fy6ClsrShvMgaKUn14f2EHQLQRtpsZZLeU/Mv0Q1K5P0+x2uvH6Cub39TVVbWNSrraUhDAoFph6vh0A==} engines: {node: '>=14.0.0'} @@ -1403,6 +1427,9 @@ packages: resolution: {integrity: sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==} engines: {node: '>=12'} + suf-log@2.5.3: + resolution: {integrity: sha512-KvC8OPjzdNOe+xQ4XWJV2whQA0aM1kGVczMQ8+dStAO6KfEB140JEVQ9dE76ONZ0/Ylf67ni4tILPJB41U0eow==} + svgo@4.0.0: resolution: {integrity: sha512-VvrHQ+9uniE+Mvx3+C9IEe/lWasXCU0nXMY2kZeLrHNICuRiC8uMPyM14UEaMOFA5mhyQqEkB02VoQ16n3DLaw==} engines: {node: '>=16'} @@ -1666,6 +1693,11 @@ packages: xxhash-wasm@1.1.0: resolution: {integrity: sha512-147y/6YNh+tlp6nd/2pWq38i9h6mz/EuQ6njIrmW8D1BS5nCqs0P6DG+m6zTGnNz5I+uhZ0SHxBs9BsPrwcKDA==} + yaml@2.8.2: + resolution: {integrity: sha512-mplynKqc1C2hTVYxd0PU2xQAc22TI1vShAYGksCCfxbn/dFwnHTNi1bvYsBTkhdUNtGIf5xNOg938rrSSYvS9A==} + engines: {node: '>= 14.6'} + hasBin: true + yargs-parser@21.1.1: resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} engines: {node: '>=12'} @@ -2183,7 +2215,7 @@ snapshots: array-iterate@2.0.1: {} - astro@5.16.6(@types/node@25.0.3)(rollup@4.54.0)(sass@1.97.1)(typescript@5.8.3): + astro@5.16.6(@types/node@25.0.3)(rollup@4.54.0)(sass@1.97.1)(typescript@5.8.3)(yaml@2.8.2): dependencies: '@astrojs/compiler': 2.13.0 '@astrojs/internal-helpers': 0.7.5 @@ -2240,8 +2272,8 @@ snapshots: unist-util-visit: 5.0.0 unstorage: 1.17.3 vfile: 6.0.3 - vite: 6.4.1(@types/node@25.0.3)(sass@1.97.1) - vitefu: 1.1.1(vite@6.4.1(@types/node@25.0.3)(sass@1.97.1)) + vite: 6.4.1(@types/node@25.0.3)(sass@1.97.1)(yaml@2.8.2) + vitefu: 1.1.1(vite@6.4.1(@types/node@25.0.3)(sass@1.97.1)(yaml@2.8.2)) xxhash-wasm: 1.1.0 yargs-parser: 21.1.1 yocto-spinner: 0.2.3 @@ -3093,6 +3125,14 @@ snapshots: picocolors: 1.1.1 source-map-js: 1.2.1 + prettier-plugin-astro@0.14.1: + dependencies: + '@astrojs/compiler': 2.13.0 + prettier: 3.7.4 + sass-formatter: 0.7.9 + + prettier@3.7.4: {} + prismjs@1.30.0: {} prompts@2.4.2: @@ -3237,6 +3277,12 @@ snapshots: '@rollup/rollup-win32-x64-msvc': 4.54.0 fsevents: 2.3.3 + s.color@0.0.15: {} + + sass-formatter@0.7.9: + dependencies: + suf-log: 2.5.3 + sass@1.97.1: dependencies: chokidar: 4.0.3 @@ -3325,6 +3371,10 @@ snapshots: dependencies: ansi-regex: 6.2.2 + suf-log@2.5.3: + dependencies: + s.color: 0.0.15 + svgo@4.0.0: dependencies: commander: 11.1.0 @@ -3486,7 +3536,7 @@ snapshots: '@egjs/hammerjs': 2.0.17 component-emitter: 2.0.0 - vite@6.4.1(@types/node@25.0.3)(sass@1.97.1): + vite@6.4.1(@types/node@25.0.3)(sass@1.97.1)(yaml@2.8.2): dependencies: esbuild: 0.25.12 fdir: 6.5.0(picomatch@4.0.3) @@ -3498,10 +3548,11 @@ snapshots: '@types/node': 25.0.3 fsevents: 2.3.3 sass: 1.97.1 + yaml: 2.8.2 - vitefu@1.1.1(vite@6.4.1(@types/node@25.0.3)(sass@1.97.1)): + vitefu@1.1.1(vite@6.4.1(@types/node@25.0.3)(sass@1.97.1)(yaml@2.8.2)): optionalDependencies: - vite: 6.4.1(@types/node@25.0.3)(sass@1.97.1) + vite: 6.4.1(@types/node@25.0.3)(sass@1.97.1)(yaml@2.8.2) web-namespaces@2.0.1: {} @@ -3519,6 +3570,8 @@ snapshots: xxhash-wasm@1.1.0: {} + yaml@2.8.2: {} + yargs-parser@21.1.1: {} yocto-queue@1.2.2: {} diff --git a/web/src/components/Colors.astro b/web/src/components/Colors.astro index 07d9091..62660ca 100644 --- a/web/src/components/Colors.astro +++ b/web/src/components/Colors.astro @@ -1,18 +1,41 @@ diff --git a/web/src/components/MediumZoom.astro b/web/src/components/MediumZoom.astro index 8944f2b..ece5361 100644 --- a/web/src/components/MediumZoom.astro +++ b/web/src/components/MediumZoom.astro @@ -1,5 +1,5 @@ diff --git a/web/src/components/Visualization.astro b/web/src/components/Visualization.astro index 78a9504..a9b2dae 100644 --- a/web/src/components/Visualization.astro +++ b/web/src/components/Visualization.astro @@ -1,5 +1,5 @@ --- -import VisualizationScript from './VisualizationScript.astro'; +import VisualizationScript from "./VisualizationScript.astro"; interface Props { interactome: string; @@ -7,37 +7,41 @@ interface Props { const { interactome } = Astro.props; -const noHeaderInteractomeArray = interactome.trim().split("\n").slice(1) -const noHeaderInteractome = (noHeaderInteractomeArray.length > 200 ? "BIG" : noHeaderInteractomeArray.join("\n")) +const edgeLimit = 300; + +const noHeaderInteractomeArray = interactome.trim().split("\n").slice(1); +const noHeaderInteractome = noHeaderInteractomeArray.length > edgeLimit ? "BIG" : noHeaderInteractomeArray.join("\n"); --- -
There is nothing to visualize.
: -- There are over 200 edges in this graph. Visualizing it may lag your machine, and - may also not be visually meaningful. If you do want to see this - data visualized, using the local Cytoscape analyzer SPRAS has may - be a better option. -
- } -There is nothing to visualize.
+ ) : ( ++ There are {noHeaderInteractomeArray.length} edges, which is over the {edgeLimit} edge maximum. Visualizing it + may lag your machine, and may also not be visually meaningful. If you do want to see this data visualized, using + the local Cytoscape analyzer SPRAS has may be a better option. +
+