@sjcrh/proteinpaint-server 2.44.0 → 2.46.0
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/dataset/clinvar.hg19.js +53 -52
- package/dataset/clinvar.hg38.js +74 -73
- package/dataset/clinvar.js +164 -47
- package/dataset/termdb.test.js +257 -0
- package/genome/CriGri.js +1859 -27
- package/genome/cgc.js +743 -7
- package/genome/danRer10.js +1108 -46
- package/genome/dm3.js +71 -44
- package/genome/dm6.js +1926 -45
- package/genome/galGal5.js +23522 -46
- package/genome/galGal6.js +512 -46
- package/genome/hg19.js +293 -198
- package/genome/hg38.js +472 -105
- package/genome/hg38.test.js +406 -40
- package/genome/hgvirus.js +45 -20
- package/genome/mm10.js +135 -67
- package/genome/mm9.js +116 -79
- package/genome/rn6.js +1002 -47
- package/package.json +31 -35
- package/routes/_template_.js +30 -0
- package/routes/burden.js +149 -0
- package/routes/dataset.js +266 -0
- package/routes/dsdata.js +127 -0
- package/routes/gdc.maf.js +120 -0
- package/routes/gdc.mafBuild.js +106 -0
- package/routes/gdc.topMutatedGenes.js +465 -0
- package/routes/gene2canonicalisoform.js +41 -0
- package/routes/genelookup.js +52 -0
- package/routes/genomes.js +144 -0
- package/routes/healthcheck.js +30 -0
- package/routes/hicdata.js +98 -0
- package/routes/hicstat.js +55 -0
- package/routes/isoformlst.js +57 -0
- package/routes/ntseq.js +43 -0
- package/routes/pdomain.js +61 -0
- package/routes/snp.js +107 -0
- package/routes/termdb.categories.js +209 -0
- package/routes/termdb.cluster.js +228 -0
- package/routes/termdb.cohort.summary.js +38 -0
- package/routes/termdb.cohorts.js +49 -0
- package/routes/termdb.config.js +201 -0
- package/routes/termdb.getdescrstats.js +102 -0
- package/routes/termdb.getnumericcategories.js +92 -0
- package/routes/termdb.getpercentile.js +108 -0
- package/routes/termdb.getrootterm.js +65 -0
- package/routes/termdb.gettermchildren.js +67 -0
- package/routes/termdb.singleSampleMutation.js +80 -0
- package/routes/termdb.singlecellData.js +46 -0
- package/routes/termdb.singlecellSamples.js +160 -0
- package/routes/termdb.termsbyids.js +59 -0
- package/routes/termdb.topVariablyExpressedGenes.js +171 -0
- package/routes/termdb.violin.js +77 -0
- package/src/app.js +41498 -0
- package/src/serverconfig.js +14 -8
- package/start.js +3 -3
- package/routes/README.md +0 -84
- package/routes/burden.ts +0 -143
- package/routes/gdc.maf.ts +0 -195
- package/routes/gdc.mafBuild.ts +0 -114
- package/routes/gdc.topMutatedGenes.ts +0 -586
- package/routes/genelookup.ts +0 -50
- package/routes/healthcheck.ts +0 -29
- package/routes/hicdata.ts +0 -111
- package/routes/hicstat.ts +0 -55
- package/routes/termdb.categories.ts +0 -245
- package/routes/termdb.cluster.ts +0 -248
- package/routes/termdb.getdescrstats.ts +0 -102
- package/routes/termdb.getnumericcategories.ts +0 -99
- package/routes/termdb.getpercentile.ts +0 -118
- package/routes/termdb.getrootterm.ts +0 -73
- package/routes/termdb.gettermchildren.ts +0 -82
- package/routes/termdb.singleSampleMutation.ts +0 -87
- package/routes/termdb.singlecellData.ts +0 -49
- package/routes/termdb.singlecellSamples.ts +0 -175
- package/routes/termdb.termsbyids.ts +0 -63
- package/routes/termdb.topVariablyExpressedGenes.ts +0 -214
- package/routes/termdb.violin.ts +0 -77
- package/server.js +0 -2
- package/server.js.map +0 -1
- package/shared/common.js +0 -1080
- package/shared/termdb.initbinconfig.js +0 -96
- package/shared/vcf.js +0 -629
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
import serverconfig from "@sjcrh/proteinpaint-server/src/serverconfig.js";
|
|
2
|
+
import * as path from "path";
|
|
3
|
+
import { existsSync, unlinkSync, symlinkSync, access, constants } from "fs";
|
|
4
|
+
copyDataFilesFromRepo2Tp();
|
|
5
|
+
var termdb_test_default = {
|
|
6
|
+
isMds3: true,
|
|
7
|
+
cohort: {
|
|
8
|
+
db: {
|
|
9
|
+
file: "files/hg38/TermdbTest/db"
|
|
10
|
+
},
|
|
11
|
+
allowedChartTypes: [
|
|
12
|
+
"summary",
|
|
13
|
+
"survival",
|
|
14
|
+
"matrix",
|
|
15
|
+
"sampleScatter",
|
|
16
|
+
"cuminc",
|
|
17
|
+
"dataDownload",
|
|
18
|
+
"sampleView",
|
|
19
|
+
"regression"
|
|
20
|
+
],
|
|
21
|
+
termdb: {
|
|
22
|
+
displaySampleIds: true,
|
|
23
|
+
// allow to display sample-level data
|
|
24
|
+
timeUnit: "years",
|
|
25
|
+
minTimeSinceDx: 5,
|
|
26
|
+
// enrollment in sjlife requires 5 years since cancer diagnosis
|
|
27
|
+
ageEndOffset: 274e-5,
|
|
28
|
+
// number of years to offset ending age of patients
|
|
29
|
+
// for cox outcome with timeScale='age'
|
|
30
|
+
// 1 day (i.e. 1/365 or 0.00274) needs to be added
|
|
31
|
+
// to age_end to prevent age_end = age_start (which
|
|
32
|
+
// would cause regression analysis to fail in R)
|
|
33
|
+
cohortStartTimeMsg: "5 years post cancer diagnosis",
|
|
34
|
+
selectCohort: {
|
|
35
|
+
// wrap term.id into a term json object so as to use it in tvs;
|
|
36
|
+
// the term is not required to exist in termdb
|
|
37
|
+
// term.id is specific to this dataset, should not use literally in client/server code but always through a variable
|
|
38
|
+
term: {
|
|
39
|
+
id: "subcohort",
|
|
40
|
+
type: "categorical"
|
|
41
|
+
},
|
|
42
|
+
prompt: "Select a cohort and test the plots.",
|
|
43
|
+
values: [
|
|
44
|
+
// <ul><li> for items, with a radio button for each.
|
|
45
|
+
{
|
|
46
|
+
keys: ["ABC"],
|
|
47
|
+
label: "ABC Cohort (ABC)",
|
|
48
|
+
shortLabel: "ABC",
|
|
49
|
+
isdefault: true
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
keys: ["XYZ"],
|
|
53
|
+
label: "XYZ cohort (XYZ)",
|
|
54
|
+
shortLabel: "XYZ"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
keys: ["ABC", "XYZ"],
|
|
58
|
+
label: "Combined ABC+XYZ*",
|
|
59
|
+
shortLabel: "ABC+XYZ"
|
|
60
|
+
// show note under label in smaller text size
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
asterisk: "*fineprint on an item"
|
|
64
|
+
},
|
|
65
|
+
dataDownloadCatch: {
|
|
66
|
+
helpLink: "https://university.stjude.cloud/docs/visualization-community/data-download/",
|
|
67
|
+
missingAccess: {
|
|
68
|
+
message: "You are missing approval to one or more of the required datasets. Please go to <a target=_blank href='MISSING-ACCESS-LINK'>Genomics Platform Data Browser</a> to request access. For more information, please see this <a target=_blank href='https://university.stjude.cloud/docs/visualization-community/data-download/'>tutorial.</a>",
|
|
69
|
+
links: {
|
|
70
|
+
sjlife: "https://platform.stjude.cloud/data/cohorts?selected_tags=SJC-DS-1002",
|
|
71
|
+
ccss: "https://platform.stjude.cloud/data/cohorts?selected_tags=SJC-DS-1005",
|
|
72
|
+
"sjlife,ccss": "https://platform.stjude.cloud/data/cohorts?selected_tags=SJC-DS-1002,SJC-DS-1005",
|
|
73
|
+
fake: "https://platform.stjude.cloud/data/cohorts?selected_tags=SJC-DS-1002"
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
jwt: {
|
|
77
|
+
"Invalid token": "https://university.stjude.cloud/docs/visualization-community/data-download/"
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
matrix: {
|
|
81
|
+
settings: {
|
|
82
|
+
ignoreCnvValues: true
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
termid2totalsize2: {}
|
|
86
|
+
},
|
|
87
|
+
scatterplots: {
|
|
88
|
+
plots: [
|
|
89
|
+
{
|
|
90
|
+
name: "TermdbTest TSNE",
|
|
91
|
+
dimension: 2,
|
|
92
|
+
file: "files/hg38/TermdbTest/tnse.txt",
|
|
93
|
+
colorTW: { id: "diaggrp" }
|
|
94
|
+
}
|
|
95
|
+
]
|
|
96
|
+
},
|
|
97
|
+
matrixplots: {
|
|
98
|
+
plots: [
|
|
99
|
+
{
|
|
100
|
+
name: "Matrix plot",
|
|
101
|
+
file: "files/hg38/TermdbTest/TermdbTest_matrix.json"
|
|
102
|
+
}
|
|
103
|
+
]
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
customTwQByType: {
|
|
107
|
+
// dataset-specific termsetting configs on certain term types
|
|
108
|
+
geneVariant: {
|
|
109
|
+
default: { cnvGainCutoff: 0.1, cnvLossCutoff: -0.1, cnvMaxLength: 0 },
|
|
110
|
+
byGene: {
|
|
111
|
+
// key is term.name, thus possible to use non-gene names e.g. C19MC
|
|
112
|
+
MYCN: { cnvGainCutoff: 0.5, cnvLossCutoff: -0.1, cnvMaxLength: 0 }
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
variant2samples: {
|
|
117
|
+
variantkey: "ssm_id",
|
|
118
|
+
// required, tells client to return ssm_id for identifying variants
|
|
119
|
+
// list of term ids as sample details
|
|
120
|
+
twLst: [
|
|
121
|
+
{ id: "sex", q: {} },
|
|
122
|
+
{ id: "diaggrp", q: {} },
|
|
123
|
+
{ id: "agedx", q: {} }
|
|
124
|
+
],
|
|
125
|
+
// small list of terms for sunburst rings
|
|
126
|
+
sunburst_twLst: [{ id: "sex", q: {} }]
|
|
127
|
+
},
|
|
128
|
+
queries: {
|
|
129
|
+
// temporary fix for genomeBrowser app to show gene model
|
|
130
|
+
defaultBlock2GeneMode: true,
|
|
131
|
+
snvindel: {
|
|
132
|
+
forTrack: true,
|
|
133
|
+
byrange: {
|
|
134
|
+
bcffile: "files/hg38/TermdbTest/TermdbTest.bcf.gz"
|
|
135
|
+
},
|
|
136
|
+
skewerRim: {
|
|
137
|
+
type: "format",
|
|
138
|
+
formatKey: "origin",
|
|
139
|
+
rim1value: "germline",
|
|
140
|
+
noRimValue: "somatic"
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
svfusion: {
|
|
144
|
+
byrange: {
|
|
145
|
+
file: "files/hg38/TermdbTest/TermdbTest_Fusion.gz"
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
cnv: {
|
|
149
|
+
byrange: {
|
|
150
|
+
src: "native",
|
|
151
|
+
file: "files/hg38/TermdbTest/TermdbTest_CNV_gene.gz"
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
/*
|
|
155
|
+
on the fly cnv calls from gene body probe signals are no longer used
|
|
156
|
+
probe2cnv:{
|
|
157
|
+
file: 'files/hg19/pnet/PNET.probesignals.gz'
|
|
158
|
+
}
|
|
159
|
+
*/
|
|
160
|
+
singleSampleMutation: {
|
|
161
|
+
src: "native",
|
|
162
|
+
sample_id_key: "sample_id",
|
|
163
|
+
folder: "files/hg38/TermdbTest/mutationpersample/"
|
|
164
|
+
},
|
|
165
|
+
singleSampleGenomeQuantification: {
|
|
166
|
+
// to show genome-wide quantification plot for a sample
|
|
167
|
+
MethylationArray: {
|
|
168
|
+
description: "Genome-wide copy number variation based on tumor/normal methylation array, averaged at genomic bins.",
|
|
169
|
+
min: -1.2,
|
|
170
|
+
max: 1.2,
|
|
171
|
+
sample_id_key: "sample_id",
|
|
172
|
+
folder: "files/hg38/TermdbTest/methylationArrayNormalSubtracted_bins/",
|
|
173
|
+
// binned data, not probe-level
|
|
174
|
+
positiveColor: "#a35069",
|
|
175
|
+
negativeColor: "#5051a3",
|
|
176
|
+
singleSampleGbtk: "methylationProbeSignal"
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
singleSampleGbtk: {
|
|
180
|
+
methylationProbeSignal: {
|
|
181
|
+
description: "Probe signals from methylation array.",
|
|
182
|
+
min: -1.2,
|
|
183
|
+
max: 1.2,
|
|
184
|
+
sample_id_key: "sample_id",
|
|
185
|
+
folder: "files/hg38/TermdbTest/methylationArrayNormalSubtracted/"
|
|
186
|
+
// probe-level data, only for locus view as genome browser track
|
|
187
|
+
// each file is 1.gz and 1.gz.tbi, bedgraph format
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
geneExpression: {
|
|
191
|
+
src: "native",
|
|
192
|
+
file: "files/hg38/TermdbTest/TermdbTest.fpkm.matrix.gz"
|
|
193
|
+
},
|
|
194
|
+
topVariablyExpressedGenes: { src: "native" }
|
|
195
|
+
},
|
|
196
|
+
assayAvailability: {
|
|
197
|
+
// use "genetic_race" as fake sources of assay availability
|
|
198
|
+
byDt: {
|
|
199
|
+
// snvindel, differentiating sample origin
|
|
200
|
+
1: {
|
|
201
|
+
byOrigin: {
|
|
202
|
+
germline: {
|
|
203
|
+
term_id: "genetic_race",
|
|
204
|
+
label: "Germline",
|
|
205
|
+
// human readable label of this origin
|
|
206
|
+
yes: { value: ["European Ancestry", "Asian Ancestry"] },
|
|
207
|
+
no: { value: ["Multi-Ancestry-Admixed", "African Ancestry"] }
|
|
208
|
+
},
|
|
209
|
+
somatic: {
|
|
210
|
+
term_id: "genetic_race",
|
|
211
|
+
label: "Somatic",
|
|
212
|
+
yes: { value: ["European Ancestry", "African Ancestry"] },
|
|
213
|
+
no: { value: ["Multi-Ancestry-Admixed", "Asian Ancestry"] }
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
// fusion
|
|
218
|
+
2: {
|
|
219
|
+
//mutations are detected from RNAseq
|
|
220
|
+
term_id: "genetic_race",
|
|
221
|
+
yes: { value: ["European Ancestry", "African Ancestry"] },
|
|
222
|
+
no: { value: ["Asian Ancestry", "Multi-Ancestry-Admixed"] }
|
|
223
|
+
},
|
|
224
|
+
// cnv
|
|
225
|
+
4: {
|
|
226
|
+
// mutations are detected from Methylation
|
|
227
|
+
term_id: "genetic_race",
|
|
228
|
+
yes: { value: ["European Ancestry", "African Ancestry"] },
|
|
229
|
+
no: { value: ["Asian Ancestry", "Multi-Ancestry-Admixed"] }
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
};
|
|
234
|
+
function copyDataFilesFromRepo2Tp() {
|
|
235
|
+
if (existsSync("/home/root/pp"))
|
|
236
|
+
return;
|
|
237
|
+
const targetDir = path.join(serverconfig.binpath, "test/tp/files/hg38/TermdbTest");
|
|
238
|
+
const datadir = path.join(serverconfig.tpmasterdir, "files/hg38/TermdbTest");
|
|
239
|
+
if (datadir == `${serverconfig.binpath}/test/tp`) {
|
|
240
|
+
access(datadir, constants.R_OK | constants.W_OK, (err) => {
|
|
241
|
+
if (!err) {
|
|
242
|
+
try {
|
|
243
|
+
if (!existsSync(datadir))
|
|
244
|
+
unlinkSync(datadir);
|
|
245
|
+
symlinkSync(targetDir, datadir);
|
|
246
|
+
} catch (error) {
|
|
247
|
+
console.warn("Error while coping data files from Repo to Tp: " + error);
|
|
248
|
+
}
|
|
249
|
+
} else {
|
|
250
|
+
console.warn(`user doesn't have sufficient permissions for `);
|
|
251
|
+
}
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
export {
|
|
256
|
+
termdb_test_default as default
|
|
257
|
+
};
|