@sjcrh/proteinpaint-server 2.29.2 → 2.29.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cards/bam.json CHANGED
@@ -259,5 +259,6 @@
259
259
  "name": "BAM track supporting information",
260
260
  "link": "https://proteinpaint.stjude.org/bam"
261
261
  }
262
- ]
262
+ ],
263
+ "citation_id": 1004
263
264
  }
@@ -25,6 +25,15 @@
25
25
  "pmid": "32466770",
26
26
  "pmidURL": "https://pubmed.ncbi.nlm.nih.gov/32466770/",
27
27
  "doi": "https://doi.org/10.1186/s13059-020-02043-x"
28
+ },
29
+ {
30
+ "id": 1004,
31
+ "title": "ppBAM: ProteinPaint BAM track for read alignment visualization and variant genotyping",
32
+ "year": "2023",
33
+ "journal": "Bioinformatics",
34
+ "pmid": "37140547",
35
+ "pmidURL": "https://ncbi.nlm.nih.gov/pmc/articles/PMC10182850/",
36
+ "doi": "https://doi.org/10.1093/bioinformatics/btad300"
28
37
  }
29
38
  ]
30
39
  }
package/cards/gdcbam.json CHANGED
@@ -18,5 +18,6 @@
18
18
  "name": "Launch App from Link",
19
19
  "link": "https://proteinpaint.stjude.org/?gdcbamslice=1"
20
20
  }
21
- ]
21
+ ],
22
+ "citation_id": 1004
22
23
  }
package/cards/index.json CHANGED
@@ -3,9 +3,6 @@
3
3
  {
4
4
  "gridarea": "col1",
5
5
  "sections": [
6
- {
7
- "id": "nestedCards"
8
- },
9
6
  {
10
7
  "id": "tracks",
11
8
  "name": "Tracks"
@@ -22,6 +19,9 @@
22
19
  {
23
20
  "id": "apps",
24
21
  "name": "Launch Apps"
22
+ },
23
+ {
24
+ "id": "nestedCards"
25
25
  }
26
26
  ]
27
27
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjcrh/proteinpaint-server",
3
- "version": "2.29.2",
3
+ "version": "2.29.4",
4
4
  "description": "a genomics visualization tool for exploring a cohort's genotype and phenotype data",
5
5
  "main": "server.js",
6
6
  "bin": "start.js",
@@ -22,6 +22,13 @@ export const api: any = {
22
22
  embedder: 'localhost',
23
23
  getcategories: 1,
24
24
  tid: 'diaggrp',
25
+ term1_q: {
26
+ isAtomic: true,
27
+ hiddenValues: {},
28
+ type: 'values',
29
+ groupsetting: { disabled: true },
30
+ mode: 'discrete'
31
+ },
25
32
  filter: {
26
33
  type: 'tvslst',
27
34
  in: true,
@@ -0,0 +1,64 @@
1
+ // import { gettermbyidRequest, gettermbyidResponse } from '#shared/types/routes/termdb.termbyid'
2
+ import { copy_term } from '#src/termdb.js'
3
+
4
+ export const api: any = {
5
+ endpoint: 'termdb/termbyid',
6
+ methods: {
7
+ get: {
8
+ init,
9
+ request: {
10
+ typeId: 'gettermbyidRequest'
11
+ },
12
+ response: {
13
+ typeId: 'gettermbyidResponse'
14
+ },
15
+ examples: [
16
+ {
17
+ request: {
18
+ body: {
19
+ genome: 'hg38-test',
20
+ dslabel: 'TermdbTest',
21
+ embedder: 'localhost',
22
+ gettermbyid: 'subcohort'
23
+ }
24
+ },
25
+ response: {
26
+ header: { status: 200 }
27
+ }
28
+ }
29
+ ]
30
+ },
31
+ post: {
32
+ alternativeFor: 'get',
33
+ init
34
+ }
35
+ }
36
+ }
37
+
38
+ function init({ genomes }) {
39
+ return async (req: any, res: any): Promise<void> => {
40
+ const q = req.query // as getcategoriesRequest
41
+ try {
42
+ const g = genomes[req.query.genome]
43
+ if (!g) throw 'invalid genome name'
44
+ const ds = g.datasets[req.query.dslabel]
45
+ if (!ds) throw 'invalid dataset name'
46
+ const tdb = ds.cohort.termdb
47
+ if (!tdb) throw 'invalid termdb object'
48
+
49
+ await trigger_gettermbyid(q, res, tdb) // as getcategoriesResponse
50
+ } catch (e) {
51
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
52
+ // @ts-ignore
53
+ res.send({ error: e?.message || e })
54
+ if (e instanceof Error && e.stack) console.log(e)
55
+ }
56
+ }
57
+ }
58
+
59
+ async function trigger_gettermbyid(q, res, tdb) {
60
+ const t = tdb.q.termjsonByOneid(q.gettermbyid)
61
+ res.send({
62
+ term: t ? copy_term(t) : undefined
63
+ })
64
+ }