@sjcrh/proteinpaint-types 2.188.1 → 2.190.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/README.md +8 -20
- package/dist/index.js +422 -553
- package/dist/index.js.map +7 -0
- package/package.json +13 -25
- package/dist/aiProjectAdmin.js +0 -11
- package/dist/aiProjectSelectedWSImages.js +0 -11
- package/dist/aiProjectTrainModel.js +0 -11
- package/dist/alphaGenome.js +0 -11
- package/dist/alphaGenomeTypes.js +0 -11
- package/dist/brainImaging.js +0 -11
- package/dist/brainImagingSamples.js +0 -11
- package/dist/burden.js +0 -11
- package/dist/chunk-2744ACBX.js +0 -126
- package/dist/chunk-2BCLGYAG.js +0 -96
- package/dist/chunk-2C4X5B6N.js +0 -62
- package/dist/chunk-2VJRTZE2.js +0 -287
- package/dist/chunk-46YIGVUP.js +0 -908
- package/dist/chunk-4EAGOSMN.js +0 -128
- package/dist/chunk-5H2LJKPX.js +0 -104
- package/dist/chunk-5L4VF3ZL.js +0 -266
- package/dist/chunk-5N7V62ZL.js +0 -231
- package/dist/chunk-62XTWOVJ.js +0 -273
- package/dist/chunk-6GKG55BT.js +0 -232
- package/dist/chunk-7MUISZHS.js +0 -61
- package/dist/chunk-7OA6G77M.js +0 -113
- package/dist/chunk-AGMCAWBR.js +0 -454
- package/dist/chunk-BCBSHTHS.js +0 -75
- package/dist/chunk-BZVFHGN3.js +0 -350
- package/dist/chunk-CQXBQY2H.js +0 -161
- package/dist/chunk-D7AKQKDG.js +0 -238
- package/dist/chunk-DDKGTDDB.js +0 -6739
- package/dist/chunk-DI4Q26E7.js +0 -16
- package/dist/chunk-DUCWIRPX.js +0 -311
- package/dist/chunk-EIJT53QB.js +0 -240
- package/dist/chunk-EOKM345J.js +0 -222
- package/dist/chunk-FK7OCBPT.js +0 -341
- package/dist/chunk-FMC4G5BP.js +0 -62
- package/dist/chunk-G4MMYXP6.js +0 -405
- package/dist/chunk-GTS2G4R4.js +0 -62
- package/dist/chunk-HQV2A7JV.js +0 -62
- package/dist/chunk-IS74WYQF.js +0 -207
- package/dist/chunk-JDF7A2LY.js +0 -361
- package/dist/chunk-JEQGBUK2.js +0 -5993
- package/dist/chunk-K4FSDTDW.js +0 -109
- package/dist/chunk-KCMPDEH7.js +0 -62
- package/dist/chunk-LC6KLHCJ.js +0 -8903
- package/dist/chunk-LQYSPLDQ.js +0 -3613
- package/dist/chunk-LRVF7U64.js +0 -62
- package/dist/chunk-MHDQO7R5.js +0 -195
- package/dist/chunk-MKYLCBTP.js +0 -5475
- package/dist/chunk-MNT3GF7M.js +0 -3628
- package/dist/chunk-MVB7LQS5.js +0 -3986
- package/dist/chunk-P25WDNMD.js +0 -171
- package/dist/chunk-PTE2I7DF.js +0 -91
- package/dist/chunk-Q3HGHP3J.js +0 -174
- package/dist/chunk-QNH3PKJK.js +0 -343
- package/dist/chunk-RPX4TVMD.js +0 -14
- package/dist/chunk-RXJNXOZC.js +0 -326
- package/dist/chunk-SDZIGJY3.js +0 -5931
- package/dist/chunk-SZZXZZKO.js +0 -3991
- package/dist/chunk-TD4YLTHL.js +0 -158
- package/dist/chunk-TEXOICIS.js +0 -11810
- package/dist/chunk-THQOFV2K.js +0 -205
- package/dist/chunk-TQQWSHFM.js +0 -5980
- package/dist/chunk-U3BTVE5T.js +0 -111
- package/dist/chunk-UBOVHONH.js +0 -62
- package/dist/chunk-ULKGA7YY.js +0 -158
- package/dist/chunk-UYJA4UM7.js +0 -97
- package/dist/chunk-V3JDD3ZG.js +0 -3671
- package/dist/chunk-VJB6F2HL.js +0 -309
- package/dist/chunk-VUKRI3TG.js +0 -164
- package/dist/chunk-W3F3CLYP.js +0 -61
- package/dist/chunk-X4JBWMXY.js +0 -130
- package/dist/chunk-X5E72ZXA.js +0 -5979
- package/dist/chunk-YNHC5SXO.js +0 -1780
- package/dist/chunk-YPEFUAJW.js +0 -62
- package/dist/chunk-YSTMGNYR.js +0 -113
- package/dist/chunk-YW5G4M5D.js +0 -158
- package/dist/chunk-Z3IYM5OK.js +0 -296
- package/dist/chunk-ZCV62ELK.js +0 -96
- package/dist/chunk-ZIOJDN75.js +0 -197
- package/dist/chunk-ZMDZYG5B.js +0 -4224
- package/dist/clearwsisession.js +0 -78
- package/dist/clearwsisessions.js +0 -13
- package/dist/correlationVolcano.js +0 -11
- package/dist/dataset.js +0 -11
- package/dist/deleteWSITileSelection.js +0 -11
- package/dist/dsdata.js +0 -11
- package/dist/dzimages.js +0 -11
- package/dist/gdc.grin2.js +0 -17
- package/dist/gdc.maf.js +0 -11
- package/dist/gdc.mafBuild.js +0 -11
- package/dist/genelookup.js +0 -11
- package/dist/genesetEnrichment.js +0 -11
- package/dist/genesetOverrepresentation.js +0 -11
- package/dist/grin2.js +0 -11
- package/dist/healthcheck.js +0 -11
- package/dist/hicdata.js +0 -11
- package/dist/hicgenome.js +0 -11
- package/dist/hicstat.js +0 -11
- package/dist/img.js +0 -11
- package/dist/isoformlst.js +0 -11
- package/dist/ntseq.js +0 -11
- package/dist/pdomain.js +0 -11
- package/dist/samplewsimages.js +0 -13
- package/dist/saveWSIAnnotation.js +0 -11
- package/dist/snp.js +0 -11
- package/dist/termdb.DE.js +0 -11
- package/dist/termdb.categories.js +0 -11
- package/dist/termdb.chat.js +0 -3631
- package/dist/termdb.chat2.js +0 -15
- package/dist/termdb.cluster.js +0 -11
- package/dist/termdb.cohort.summary.js +0 -11
- package/dist/termdb.cohorts.js +0 -11
- package/dist/termdb.dapVolcano.js +0 -11
- package/dist/termdb.descrstats.js +0 -11
- package/dist/termdb.diffMeth.js +0 -11
- package/dist/termdb.dmr.js +0 -11
- package/dist/termdb.filterTermValues.js +0 -11
- package/dist/termdb.isoformAvailability.js +0 -11
- package/dist/termdb.numericcategories.js +0 -11
- package/dist/termdb.percentile.js +0 -11
- package/dist/termdb.profileFormScores.js +0 -11
- package/dist/termdb.profileForms2Scores.js +0 -11
- package/dist/termdb.profileScores.js +0 -11
- package/dist/termdb.proteome.js +0 -11
- package/dist/termdb.rootterm.js +0 -11
- package/dist/termdb.runChart.js +0 -13
- package/dist/termdb.sampleImages.js +0 -11
- package/dist/termdb.sampleScatter.js +0 -11
- package/dist/termdb.singleSampleMutation.js +0 -11
- package/dist/termdb.singlecellDEgenes.js +0 -11
- package/dist/termdb.singlecellData.js +0 -11
- package/dist/termdb.singlecellSamples.js +0 -11
- package/dist/termdb.termchildren.js +0 -11
- package/dist/termdb.termsbyids.js +0 -11
- package/dist/termdb.topMutatedGenes.js +0 -11
- package/dist/termdb.topTermsByType.js +0 -11
- package/dist/termdb.topVariablyExpressedGenes.js +0 -11
- package/dist/termdb.violinBox.js +0 -17
- package/dist/tileserver.js +0 -11
- package/dist/wsimages.js +0 -11
- package/dist/wsisamples.js +0 -11
- package/src/Mclass.ts +0 -8
- package/src/dataset.ts +0 -2186
- package/src/docs.json +0 -16417
- package/src/fileOrUrl.ts +0 -15
- package/src/filter.ts +0 -110
- package/src/genome.ts +0 -129
- package/src/index.ts +0 -94
- package/src/routes/aiProjectAdmin.ts +0 -37
- package/src/routes/aiProjectSelectedWSImages.ts +0 -48
- package/src/routes/aiProjectTrainModel.ts +0 -20
- package/src/routes/alphaGenome.ts +0 -27
- package/src/routes/alphaGenomeTypes.ts +0 -21
- package/src/routes/brainImaging.ts +0 -47
- package/src/routes/brainImagingSamples.ts +0 -25
- package/src/routes/burden.ts +0 -113
- package/src/routes/clearwsisessions.ts +0 -19
- package/src/routes/correlationVolcano.ts +0 -51
- package/src/routes/dataset.ts +0 -14
- package/src/routes/deleteWSITileSelection.ts +0 -25
- package/src/routes/dsdata.ts +0 -14
- package/src/routes/dzimages.ts +0 -25
- package/src/routes/errorResponse.ts +0 -6
- package/src/routes/filter.gdc.ts +0 -15
- package/src/routes/gdc.grin2.ts +0 -246
- package/src/routes/gdc.maf.ts +0 -52
- package/src/routes/gdc.mafBuild.ts +0 -20
- package/src/routes/genelookup.ts +0 -22
- package/src/routes/genesetEnrichment.ts +0 -116
- package/src/routes/genesetOverrepresentation.ts +0 -48
- package/src/routes/grin2.ts +0 -173
- package/src/routes/healthcheck.ts +0 -80
- package/src/routes/hicdata.ts +0 -48
- package/src/routes/hicgenome.ts +0 -50
- package/src/routes/hicstat.ts +0 -57
- package/src/routes/img.ts +0 -23
- package/src/routes/isoformlst.ts +0 -14
- package/src/routes/ntseq.ts +0 -14
- package/src/routes/pdomain.ts +0 -14
- package/src/routes/routeApi.ts +0 -47
- package/src/routes/samplewsimages.ts +0 -44
- package/src/routes/saveWSIAnnotation.ts +0 -25
- package/src/routes/snp.ts +0 -13
- package/src/routes/termdb.DE.ts +0 -220
- package/src/routes/termdb.categories.ts +0 -74
- package/src/routes/termdb.chat2.ts +0 -190
- package/src/routes/termdb.cluster.ts +0 -134
- package/src/routes/termdb.cohort.summary.ts +0 -14
- package/src/routes/termdb.cohorts.ts +0 -14
- package/src/routes/termdb.dapVolcano.ts +0 -35
- package/src/routes/termdb.descrstats.ts +0 -75
- package/src/routes/termdb.diffMeth.ts +0 -63
- package/src/routes/termdb.dmr.ts +0 -121
- package/src/routes/termdb.filterTermValues.ts +0 -23
- package/src/routes/termdb.isoformAvailability.ts +0 -22
- package/src/routes/termdb.numericcategories.ts +0 -32
- package/src/routes/termdb.percentile.ts +0 -67
- package/src/routes/termdb.profileFormScores.ts +0 -26
- package/src/routes/termdb.profileForms2Scores.ts +0 -25
- package/src/routes/termdb.profileScores.ts +0 -27
- package/src/routes/termdb.proteome.ts +0 -13
- package/src/routes/termdb.rootterm.ts +0 -49
- package/src/routes/termdb.runChart.ts +0 -66
- package/src/routes/termdb.sampleImages.ts +0 -26
- package/src/routes/termdb.sampleScatter.ts +0 -60
- package/src/routes/termdb.singleSampleMutation.ts +0 -51
- package/src/routes/termdb.singlecellDEgenes.ts +0 -50
- package/src/routes/termdb.singlecellData.ts +0 -75
- package/src/routes/termdb.singlecellSamples.ts +0 -50
- package/src/routes/termdb.termchildren.ts +0 -49
- package/src/routes/termdb.termsbyids.ts +0 -26
- package/src/routes/termdb.topMutatedGenes.ts +0 -51
- package/src/routes/termdb.topTermsByType.ts +0 -32
- package/src/routes/termdb.topVariablyExpressedGenes.ts +0 -54
- package/src/routes/termdb.violinBox.ts +0 -230
- package/src/routes/tileserver.ts +0 -14
- package/src/routes/wsimages.ts +0 -34
- package/src/routes/wsisamples.ts +0 -25
- package/src/termdb.matrix.ts +0 -57
- package/src/terms/categorical.ts +0 -18
- package/src/terms/condition.ts +0 -73
- package/src/terms/date.ts +0 -20
- package/src/terms/dnaMethylation.ts +0 -28
- package/src/terms/geneExpression.ts +0 -38
- package/src/terms/geneVariant.ts +0 -132
- package/src/terms/isoformExpression.ts +0 -36
- package/src/terms/metaboliteIntensity.ts +0 -30
- package/src/terms/numeric.ts +0 -278
- package/src/terms/proteomeAbundance.ts +0 -38
- package/src/terms/q.ts +0 -105
- package/src/terms/qualitative.ts +0 -73
- package/src/terms/samplelst.ts +0 -34
- package/src/terms/singleCellCellType.ts +0 -18
- package/src/terms/singleCellGeneExpression.ts +0 -32
- package/src/terms/snp.ts +0 -24
- package/src/terms/snps.ts +0 -111
- package/src/terms/ssGSEA.ts +0 -26
- package/src/terms/term.ts +0 -60
- package/src/terms/termCollection.ts +0 -139
- package/src/terms/tw.ts +0 -64
- package/src/termsetting.ts +0 -201
- package/src/test/numeric.type.spec.ts +0 -275
- package/src/vocab.ts +0 -37
package/src/terms/snps.ts
DELETED
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import type { BaseTW, MinBaseQ, BaseTerm } from '../index.ts'
|
|
2
|
-
import type { TermSettingInstance, InstanceDom, UseCase } from '../termsetting.ts'
|
|
3
|
-
import type { VocabApi } from '../vocab.ts'
|
|
4
|
-
import type { Tvs, Filter } from '../filter.ts'
|
|
5
|
-
|
|
6
|
-
/*
|
|
7
|
-
--------EXPORTED--------
|
|
8
|
-
SnpsQ
|
|
9
|
-
SnpsEntry
|
|
10
|
-
SnpsTerm
|
|
11
|
-
SnpsTW
|
|
12
|
-
SnpsVocabApi
|
|
13
|
-
SnpsTermSettingInstance
|
|
14
|
-
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
type RestrictAncestry = {
|
|
18
|
-
name: string
|
|
19
|
-
tvs: Tvs
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export type SnpsQ = MinBaseQ & {
|
|
23
|
-
// termType: 'snplocus' | 'snplst'
|
|
24
|
-
//for snplst and snplocus term types
|
|
25
|
-
AFcutoff: number
|
|
26
|
-
alleleType: number
|
|
27
|
-
cacheid: string
|
|
28
|
-
doNotRestrictAncestry: any
|
|
29
|
-
geneticModel: number
|
|
30
|
-
info_fields?: any //[] Not documented
|
|
31
|
-
missingGenotype?: number
|
|
32
|
-
numOfSampleWithAnyValidGT: number
|
|
33
|
-
restrictAncestry: RestrictAncestry
|
|
34
|
-
snp2effAle?: any
|
|
35
|
-
snp2refGrp: any //[] maybe??
|
|
36
|
-
variant_filter: Filter
|
|
37
|
-
//Position
|
|
38
|
-
chr: string
|
|
39
|
-
start: number
|
|
40
|
-
stop: number
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
type AllelesEntry = {
|
|
44
|
-
allele: string
|
|
45
|
-
count: number
|
|
46
|
-
isRef: boolean
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export type SnpsEntry = {
|
|
50
|
-
alt2csq?: any //{} In document but not implemented?
|
|
51
|
-
altAlleles?: string[]
|
|
52
|
-
alleles?: AllelesEntry[]
|
|
53
|
-
effectAllele: boolean
|
|
54
|
-
gt2count?: {
|
|
55
|
-
k: string
|
|
56
|
-
v: string | number
|
|
57
|
-
}
|
|
58
|
-
invalid?: boolean
|
|
59
|
-
referenceAllele?: string
|
|
60
|
-
rsid: string
|
|
61
|
-
snpid: string
|
|
62
|
-
tobe_deleted?: any
|
|
63
|
-
//Position properties
|
|
64
|
-
chr?: string
|
|
65
|
-
pos?: number
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export type SnpsTerm = BaseTerm & {
|
|
69
|
-
id: string
|
|
70
|
-
reachedVariantLimit?: boolean
|
|
71
|
-
snps?: SnpsEntry[]
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export type SnpsTW = BaseTW & {
|
|
75
|
-
type: 'SnpsTW'
|
|
76
|
-
q: SnpsQ
|
|
77
|
-
term: SnpsTerm
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
type VariantFilter = {
|
|
81
|
-
active: any
|
|
82
|
-
filter: any
|
|
83
|
-
opts: any
|
|
84
|
-
terms: any
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
export type SnpsVocabApi = VocabApi & {
|
|
88
|
-
validateSnps: (f?: any) => {
|
|
89
|
-
error?: any
|
|
90
|
-
cacheid: string
|
|
91
|
-
snps: any
|
|
92
|
-
reachedVariantLimit: any
|
|
93
|
-
}
|
|
94
|
-
get_variantFilter: () => any
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
type SnpsDom = InstanceDom & {
|
|
98
|
-
input_AFcutoff_label: any
|
|
99
|
-
restrictAncestriesRow: any
|
|
100
|
-
setEffectAlleleAsHint: any
|
|
101
|
-
snplst_table: any
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
export type SnpsTermSettingInstance = TermSettingInstance & {
|
|
105
|
-
dom: SnpsDom
|
|
106
|
-
q: Partial<SnpsQ>
|
|
107
|
-
term: SnpsTerm
|
|
108
|
-
usecase: UseCase
|
|
109
|
-
variantFilter: VariantFilter
|
|
110
|
-
vocabApi: SnpsVocabApi
|
|
111
|
-
}
|
package/src/terms/ssGSEA.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { NumericBaseTerm, NumericQ, PresetNumericBins, NumTW, RawNumTW } from './numeric.ts'
|
|
2
|
-
|
|
3
|
-
/*
|
|
4
|
-
duplicated from geneExpression.ts
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
export type SsGSEAQ = NumericQ & { dt?: number }
|
|
8
|
-
|
|
9
|
-
export type SsGSEATerm = NumericBaseTerm & {
|
|
10
|
-
/** term.id: geneset db term id for native term, and cache file name for custom term */
|
|
11
|
-
/** term.name: geneset db term name for native term, and user-defined name for custom term */
|
|
12
|
-
/** custom term has list of gene names used for computing score */
|
|
13
|
-
genes?: string[]
|
|
14
|
-
name: string
|
|
15
|
-
type: 'ssGSEA'
|
|
16
|
-
bins?: PresetNumericBins
|
|
17
|
-
unit?: string
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export type RawSsGSEATerm = SsGSEATerm & {
|
|
21
|
-
name?: string
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export type SsGSEATW = NumTW & { term: SsGSEATerm }
|
|
25
|
-
|
|
26
|
-
export type RawSsGSEATW = RawNumTW & { term: SsGSEATerm }
|
package/src/terms/term.ts
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import type { Filter } from '../filter.js'
|
|
2
|
-
import type { ConditionTerm } from './condition.js'
|
|
3
|
-
import type { NumericTerm } from './numeric.js'
|
|
4
|
-
import type { GvTerm } from './geneVariant.js'
|
|
5
|
-
import type { SampleLstTerm } from './samplelst.js'
|
|
6
|
-
import type { SnpsTerm } from './snps.js'
|
|
7
|
-
import type { QualTerm } from './qualitative.ts'
|
|
8
|
-
import type { TermCollection } from './termCollection.ts'
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* @param id term.id for dictionary terms, undefined for non-dictionary terms
|
|
12
|
-
* @params $id client-computed deterministic unique identifier, to distinguish tw with the same term but different q, that are in the same payload
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
/*** types supporting termwrapper term ***/
|
|
16
|
-
|
|
17
|
-
export type BaseValue = {
|
|
18
|
-
key?: string
|
|
19
|
-
uncomputable?: boolean
|
|
20
|
-
label?: string | number
|
|
21
|
-
order?: string
|
|
22
|
-
color?: string
|
|
23
|
-
group?: number
|
|
24
|
-
filter?: Filter
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export type TermValues = {
|
|
28
|
-
[key: string | number]: BaseValue
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
export type BaseTerm = {
|
|
32
|
-
id: string
|
|
33
|
-
name: string
|
|
34
|
-
type: string
|
|
35
|
-
child_types?: string[]
|
|
36
|
-
hashtmldetail?: boolean
|
|
37
|
-
included_types?: string[]
|
|
38
|
-
isleaf?: boolean
|
|
39
|
-
values?: TermValues
|
|
40
|
-
/** Do not build .values{} when building termdb. Used for
|
|
41
|
-
making categorical term with empty .values{} in TermdbTest */
|
|
42
|
-
skipValuesBuild?: boolean
|
|
43
|
-
valueConversion?: {
|
|
44
|
-
fromUnit: string
|
|
45
|
-
toUnit: string
|
|
46
|
-
scaleFactor: string
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
// NumericTerm includes integer, float, date, geneExpression, metaboliteIntensity, proteomeAbundance, and other non-dict terms
|
|
51
|
-
export type Term = BaseTerm &
|
|
52
|
-
(NumericTerm | ConditionTerm | SampleLstTerm | SnpsTerm | GvTerm | QualTerm | TermCollection)
|
|
53
|
-
|
|
54
|
-
/*** types supporting Term types ***/
|
|
55
|
-
|
|
56
|
-
export type Subconditions = {
|
|
57
|
-
[index: string | number]: {
|
|
58
|
-
label: string
|
|
59
|
-
}
|
|
60
|
-
}
|
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
import type { BaseTerm, BaseTW, MinBaseQ } from '../index.ts'
|
|
2
|
-
|
|
3
|
-
/*
|
|
4
|
-
For term type 'termCollection'
|
|
5
|
-
*/
|
|
6
|
-
export type CategoryKey = { key: string; shown: boolean }
|
|
7
|
-
|
|
8
|
-
type BaseTermCollection = BaseTerm & {
|
|
9
|
-
name: string
|
|
10
|
-
type: 'termCollection'
|
|
11
|
-
/** list of term.ids that are available in this collection. this is used in request payload and server side */
|
|
12
|
-
termIds?: string[]
|
|
13
|
-
/** list of term objs corresponding to termIds[].
|
|
14
|
-
this is generated on server init, and sent to client, so client has easy access to show name of every term */
|
|
15
|
-
termlst: BaseTerm[]
|
|
16
|
-
/** TODO purpose */
|
|
17
|
-
newTvs?: boolean
|
|
18
|
-
propsByTermId: {
|
|
19
|
-
[termId: string]: {
|
|
20
|
-
[prop: string]: any
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
/** When true, member terms are non-dictionary terms (e.g. isoformExpression).
|
|
24
|
-
* getData() expands them into individual tws for existing handlers, then
|
|
25
|
-
* reconstitutes the grouped shape after data is returned. */
|
|
26
|
-
isCustom?: boolean
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export type NumericTermCollection = BaseTermCollection & {
|
|
30
|
-
/**
|
|
31
|
-
* Copies ds.cohort.termdb.termCollections[].type ('numeric' | 'categorical').
|
|
32
|
-
* Allows client code using the term to know the collection kind without looking up config.
|
|
33
|
-
*/
|
|
34
|
-
memberType: 'numeric'
|
|
35
|
-
/** the sum of numerator values will be divided by the sum of values for all terms,
|
|
36
|
-
* to be used for sorting matrix sample columns */
|
|
37
|
-
numerators?: string[]
|
|
38
|
-
/** optional transformation. app specific
|
|
39
|
-
*/
|
|
40
|
-
valueTransform?: { offset?: number }
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export type CategoricalTermCollection = BaseTermCollection & {
|
|
44
|
-
/**
|
|
45
|
-
* Copies ds.cohort.termdb.termCollections[].type ('numeric' | 'categorical').
|
|
46
|
-
* Allows client code using the term to know the collection kind without looking up config.
|
|
47
|
-
*/
|
|
48
|
-
memberType: 'categorical'
|
|
49
|
-
categoryKeys: CategoryKey[]
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export type TermCollection = NumericTermCollection | CategoricalTermCollection
|
|
53
|
-
|
|
54
|
-
/** Pre-fill shape for a numeric termCollection (memberType set by TermCollection.fill()) */
|
|
55
|
-
export type RawNumericTermCollection = {
|
|
56
|
-
type?: 'termCollection'
|
|
57
|
-
memberType?: 'numeric'
|
|
58
|
-
name?: string
|
|
59
|
-
termIds?: string[]
|
|
60
|
-
termlst?: BaseTerm[]
|
|
61
|
-
propsByTermId?: {
|
|
62
|
-
[termId: string]: {
|
|
63
|
-
[prop: string]: any
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
numerators?: string[]
|
|
67
|
-
isCustom?: boolean
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
/** Pre-fill shape for a categorical termCollection (memberType set by TermCollection.fill()) */
|
|
71
|
-
export type RawCategoricalTermCollection = {
|
|
72
|
-
type?: 'termCollection'
|
|
73
|
-
memberType?: 'categorical'
|
|
74
|
-
name?: string
|
|
75
|
-
termIds?: string[]
|
|
76
|
-
termlst?: BaseTerm[]
|
|
77
|
-
propsByTermId?: {
|
|
78
|
-
[termId: string]: {
|
|
79
|
-
[prop: string]: any
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
categoryKeys?: CategoryKey[]
|
|
83
|
-
isCustom?: boolean
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
export type RawTermCollection = RawNumericTermCollection | RawCategoricalTermCollection
|
|
87
|
-
|
|
88
|
-
/** Q shape for numeric (continuous) termCollection wrappers */
|
|
89
|
-
export type TermCollectionQCont = MinBaseQ & {
|
|
90
|
-
mode: 'continuous'
|
|
91
|
-
type: 'values'
|
|
92
|
-
/** a selection of term.ids for the current termwrapper, selected from term.lst */
|
|
93
|
-
lst: string[]
|
|
94
|
-
/** the sum of numerator values divided by the sum of all values will be used
|
|
95
|
-
* to sort matrix sample columns */
|
|
96
|
-
numerators?: string[]
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
/** Q shape for categorical (qualitative) termCollection wrappers */
|
|
100
|
-
export type TermCollectionQQual = MinBaseQ & {
|
|
101
|
-
mode: 'discrete'
|
|
102
|
-
type: 'values'
|
|
103
|
-
/** a selection of term.ids for the current termwrapper, selected from term.lst */
|
|
104
|
-
lst: string[]
|
|
105
|
-
categoryKeys?: CategoryKey[]
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
// TODO: may add different q types below
|
|
109
|
-
export type TermCollectionQ = TermCollectionQCont | TermCollectionQQual
|
|
110
|
-
|
|
111
|
-
export type TermCollectionTWCont = BaseTW & {
|
|
112
|
-
type: 'TermCollectionTWCont'
|
|
113
|
-
term: NumericTermCollection
|
|
114
|
-
q: TermCollectionQCont
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
export type TermCollectionTWQual = BaseTW & {
|
|
118
|
-
type: 'TermCollectionTWQual'
|
|
119
|
-
term: CategoricalTermCollection
|
|
120
|
-
q: TermCollectionQQual
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
// TODO: may add different termCollection TW types here
|
|
124
|
-
export type TermCollectionTW = TermCollectionTWCont | TermCollectionTWQual
|
|
125
|
-
|
|
126
|
-
export type RawTermCollectionTWCont = BaseTW & {
|
|
127
|
-
type?: 'TermCollectionTWCont'
|
|
128
|
-
term: RawNumericTermCollection
|
|
129
|
-
q?: TermCollectionQCont
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
export type RawTermCollectionTWQual = BaseTW & {
|
|
133
|
-
type?: 'TermCollectionTWQual'
|
|
134
|
-
term: RawCategoricalTermCollection
|
|
135
|
-
q?: TermCollectionQQual
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
// TODO: may add different termCollection TW types here
|
|
139
|
-
export type RawTermCollectionTW = RawTermCollectionTWCont | RawTermCollectionTWQual
|
package/src/terms/tw.ts
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import type { SnpsQ, SnpsTW } from './snps.ts'
|
|
2
|
-
import type { ConditionQ, ConditionTW, RawConditionTW } from './condition.ts'
|
|
3
|
-
import type { SampleLstQ } from './samplelst.ts'
|
|
4
|
-
import type { NumTW, NumericQ, RawNumTW } from './numeric.ts'
|
|
5
|
-
import type { GvTW, GvQ, RawGvTW } from './geneVariant.ts'
|
|
6
|
-
import type { QualTW, QualQ, RawQualTW } from './qualitative.ts'
|
|
7
|
-
import type { TermCollectionTW, TermCollectionQ, RawTermCollectionTW } from './termCollection.ts'
|
|
8
|
-
|
|
9
|
-
export type BaseTW = {
|
|
10
|
-
id?: string
|
|
11
|
-
$id?: string
|
|
12
|
-
isAtomic?: true
|
|
13
|
-
// plot-specific customizations that are applied to a tw copy
|
|
14
|
-
// todo: should rethink these
|
|
15
|
-
legend?: any
|
|
16
|
-
settings?: {
|
|
17
|
-
[key: string]: any
|
|
18
|
-
}
|
|
19
|
-
sortSamples?: any
|
|
20
|
-
minNumSamples?: number
|
|
21
|
-
valueFilter?: any
|
|
22
|
-
values?: { [key: string]: any }
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export type TermWrapper = NumTW | GvTW | ConditionTW | SnpsTW | QualTW | TermCollectionTW
|
|
26
|
-
|
|
27
|
-
export type Q = NumericQ | GvQ | ConditionQ | SnpsQ | SampleLstQ | QualQ | TermCollectionQ // | other q
|
|
28
|
-
|
|
29
|
-
//export type TermWrapper = CategoricalTW | NumericTW | SnpsTW | (BaseTW & { term: Term; q: Q })
|
|
30
|
-
export type TwLst = TermWrapper[]
|
|
31
|
-
|
|
32
|
-
//export type Q = BaseQ | CategoricalQ | ConditionQ | NumericQ | SampleLstQ | SnpsQ
|
|
33
|
-
|
|
34
|
-
export type RawDictTW = BaseTW & {
|
|
35
|
-
id: string
|
|
36
|
-
term?: undefined
|
|
37
|
-
q?: any
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export type RawTW = RawDictTW | RawQualTW | RawNumTW | RawGvTW | RawConditionTW | RawTermCollectionTW
|
|
41
|
-
//{ id: string } | RawCatTW
|
|
42
|
-
//
|
|
43
|
-
// BELOW TYPE IS NOT TESTED, only being used to compare tsc type checking behavior
|
|
44
|
-
// between non-union versus type-unions, which way is easier to code against
|
|
45
|
-
// {
|
|
46
|
-
// id?: string
|
|
47
|
-
// term?: {
|
|
48
|
-
// type: 'categorical' | 'condition'
|
|
49
|
-
// [key: string | number]: any
|
|
50
|
-
// }
|
|
51
|
-
// q?: {
|
|
52
|
-
// //predefined_groupset_idx?: number
|
|
53
|
-
// //customset?: any
|
|
54
|
-
// [key: string]: any
|
|
55
|
-
// //type?: string //'custom-groupset' |
|
|
56
|
-
// //customset?: any
|
|
57
|
-
// }
|
|
58
|
-
// isAtomic?: true
|
|
59
|
-
// $id?: string
|
|
60
|
-
// }
|
|
61
|
-
|
|
62
|
-
export interface TwHandler {
|
|
63
|
-
render?: (opts?: any) => void
|
|
64
|
-
}
|
package/src/termsetting.ts
DELETED
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
// TODO: will deprecate this code, should use client/termsetting/types.ts instead
|
|
2
|
-
import type { VocabApi } from './vocab.ts'
|
|
3
|
-
import type { TermWrapper, Q } from './terms/tw.ts'
|
|
4
|
-
import type { Term } from './terms/term.ts'
|
|
5
|
-
import type { Filter } from './filter.ts'
|
|
6
|
-
|
|
7
|
-
/*
|
|
8
|
-
|
|
9
|
-
!!!
|
|
10
|
-
For shared/types:
|
|
11
|
-
- Declare only the types that are used in the request and response payloads, or in *both* client and server-side code
|
|
12
|
-
- Do not track client or server-specific type declarations here, those belong in the corresponding workspace code
|
|
13
|
-
!!!
|
|
14
|
-
|
|
15
|
-
--------EXPORTED--------
|
|
16
|
-
Dom
|
|
17
|
-
Api
|
|
18
|
-
NoTermPromptOptsEntry
|
|
19
|
-
UseCase
|
|
20
|
-
SampleCountsEntry
|
|
21
|
-
Handler
|
|
22
|
-
PillData
|
|
23
|
-
TermSettingOpts
|
|
24
|
-
InstanceDom
|
|
25
|
-
TermSettingInstance
|
|
26
|
-
|
|
27
|
-
*/
|
|
28
|
-
|
|
29
|
-
/*** types supporting TermSettingOpts & PillData types ***/
|
|
30
|
-
|
|
31
|
-
export type Dom = {
|
|
32
|
-
holder: Selection
|
|
33
|
-
tip: any //TODO Menu type??
|
|
34
|
-
tip2: any //same as above
|
|
35
|
-
nopilldiv?: Selection
|
|
36
|
-
pilldiv?: Selection
|
|
37
|
-
btnDiv?: Selection
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export type NoTermPromptOptsEntry = {
|
|
41
|
-
isDictionary?: boolean
|
|
42
|
-
termtype?: string
|
|
43
|
-
text?: string
|
|
44
|
-
html?: string
|
|
45
|
-
q?: Q
|
|
46
|
-
/** whether or not opt is invalid */
|
|
47
|
-
invalid?: boolean
|
|
48
|
-
/** message displayed when opt is invalid */
|
|
49
|
-
invalidMsg?: string
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
type NumericContEditOptsEntry = {
|
|
53
|
-
scale: string
|
|
54
|
-
transform: string
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export type UseCase = {
|
|
58
|
-
target: string
|
|
59
|
-
detail?: string //Maybe?
|
|
60
|
-
regressionType?: string //Maybe?
|
|
61
|
-
term1type?: string //Maybe? not documented
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
type DefaultQ4fillTW = {
|
|
65
|
-
[index: string]: Q
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export type SampleCountsEntry = {
|
|
69
|
-
key: string
|
|
70
|
-
value: number //This maybe a string???
|
|
71
|
-
label?: string //Not documented?? in key or no?
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
export type Handler = {
|
|
75
|
-
getPillName: (d: any) => string
|
|
76
|
-
getPillStatus: (f?: any) => any
|
|
77
|
-
showEditMenu: (div: Selection) => void
|
|
78
|
-
validateQ?: (d: Q) => void
|
|
79
|
-
postMain?: () => void
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
type BaseTermSettingOpts = {
|
|
83
|
-
/** Set the max number of characters in a pill
|
|
84
|
-
* before the pill name is truncated. */
|
|
85
|
-
abbrCutoff?: number
|
|
86
|
-
activeCohort?: number
|
|
87
|
-
/** array of term objects to show in the tree but not clickable */
|
|
88
|
-
disable_terms?: Term[]
|
|
89
|
-
// This is not used anywhere.
|
|
90
|
-
// Ok to remove?
|
|
91
|
-
handler: Handler
|
|
92
|
-
noTermPromptOptions?: NoTermPromptOptsEntry[]
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
export type PillData = BaseTermSettingOpts & {
|
|
96
|
-
$id?: string
|
|
97
|
-
doNotHideTipInMain: boolean
|
|
98
|
-
dom: Dom
|
|
99
|
-
error?: string
|
|
100
|
-
filter?: Filter
|
|
101
|
-
q?: Q
|
|
102
|
-
sampleCounts?: SampleCountsEntry[]
|
|
103
|
-
term?: Term
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
export type TermSettingOpts = BaseTermSettingOpts & {
|
|
107
|
-
//Required
|
|
108
|
-
holder: any
|
|
109
|
-
vocabApi: VocabApi
|
|
110
|
-
//Optional
|
|
111
|
-
$id?: string
|
|
112
|
-
buttons?: string[] //replace, delete, info
|
|
113
|
-
defaultQ4fillTW?: DefaultQ4fillTW
|
|
114
|
-
menuOptions: string //all, edit, replace, remove
|
|
115
|
-
menuLayout?: string //horizonal, all
|
|
116
|
-
numericEditMenuVersion?: string[]
|
|
117
|
-
geneVariantEditMenuOnlyGrp?: boolean
|
|
118
|
-
numericContinuousEditOptions?: NumericContEditOptsEntry[]
|
|
119
|
-
placeholder?: string
|
|
120
|
-
placeholderIcon?: string //default '+'
|
|
121
|
-
renderAs: string //none
|
|
122
|
-
tip?: any //TODO: Menu type?
|
|
123
|
-
use_bins_less?: boolean
|
|
124
|
-
usecase?: UseCase
|
|
125
|
-
debug?: boolean | number //true or 1
|
|
126
|
-
//'snplocus' types
|
|
127
|
-
genomeObj?: any
|
|
128
|
-
|
|
129
|
-
//vocab??
|
|
130
|
-
|
|
131
|
-
// required callback function. argument is the updated termwrapper object
|
|
132
|
-
callback: (f: TermWrapper | null) => void
|
|
133
|
-
|
|
134
|
-
// ?
|
|
135
|
-
customFillTw?: (f: TermWrapper) => void
|
|
136
|
-
|
|
137
|
-
// to pass in purpose and context-specific arguments that will be merged to client request parameters
|
|
138
|
-
getBodyParams?: () => any
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
/*** types supporting TermSettingInstance type ***/
|
|
142
|
-
|
|
143
|
-
export type InstanceDom = {
|
|
144
|
-
//Separate from the Dom outlined in termsetting.ts?????
|
|
145
|
-
//Required
|
|
146
|
-
holder: any
|
|
147
|
-
tip: any //TODO Menu type??
|
|
148
|
-
tip2: any //same as above
|
|
149
|
-
nopilldiv?: any
|
|
150
|
-
pilldiv?: any
|
|
151
|
-
btnDiv?: any
|
|
152
|
-
//Optional
|
|
153
|
-
customBinBoundaryInput?: any
|
|
154
|
-
customBinBoundaryPercentileCheckbox?: any
|
|
155
|
-
customBinLabelInput?: any
|
|
156
|
-
customBinRanges?: any
|
|
157
|
-
cutoff_div?: any
|
|
158
|
-
num_holder?: any
|
|
159
|
-
pill_termname?: any
|
|
160
|
-
rangeAndLabelDiv?: any
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
export type TermSettingInstance = {
|
|
164
|
-
activeCohort?: number
|
|
165
|
-
clickNoPillDiv?: any
|
|
166
|
-
dom: InstanceDom
|
|
167
|
-
doNotHideTipInMain?: boolean
|
|
168
|
-
disable_terms?: Term[]
|
|
169
|
-
durations: { exit: number }
|
|
170
|
-
filter?: Filter
|
|
171
|
-
handler?: Handler
|
|
172
|
-
handlerByType?: { [index: string]: Handler }
|
|
173
|
-
hasError?: boolean
|
|
174
|
-
noTermPromptOptions?: NoTermPromptOptsEntry[]
|
|
175
|
-
opts: TermSettingOpts
|
|
176
|
-
placeholder: string | undefined
|
|
177
|
-
q: Q
|
|
178
|
-
term: Term
|
|
179
|
-
usecase?: UseCase
|
|
180
|
-
vocabApi: VocabApi
|
|
181
|
-
|
|
182
|
-
//Methods
|
|
183
|
-
/*
|
|
184
|
-
TODOs:
|
|
185
|
-
- Move specifc methods to their own intersection instance type within in termsetting/handler/*.ts, out of main type
|
|
186
|
-
*/
|
|
187
|
-
cancelGroupsetting?: () => void
|
|
188
|
-
enterPill?: () => void
|
|
189
|
-
exitPill?: () => void
|
|
190
|
-
initUI: () => void
|
|
191
|
-
removeTerm?: () => void
|
|
192
|
-
runCallback: (f?: any) => any
|
|
193
|
-
setHandler?: (f: string) => any
|
|
194
|
-
showGeneSearch: (clickedElem: Element | null, event: MouseEvent) => void
|
|
195
|
-
showMenu: (event: MouseEvent, clickedElem: string | null, menuHolder: any) => void
|
|
196
|
-
showReuseMenu?: (div: any) => void
|
|
197
|
-
showTree: (holder: Selection, event?: MouseEvent) => void
|
|
198
|
-
tabCallback?: (event: any, tab: any) => void
|
|
199
|
-
updatePill?: () => void
|
|
200
|
-
updateUI: () => void
|
|
201
|
-
}
|