@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 +2 -1
- package/cards/citations.json +9 -0
- package/cards/gdcbam.json +2 -1
- package/cards/index.json +3 -3
- package/package.json +1 -1
- package/routes/termdb.categories.ts +7 -0
- package/routes/termdb.termbyid.ts +64 -0
- package/server.js +1 -1
package/cards/bam.json
CHANGED
package/cards/citations.json
CHANGED
|
@@ -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
package/cards/index.json
CHANGED
package/package.json
CHANGED
|
@@ -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
|
+
}
|