@sjcrh/proteinpaint-shared 2.153.1-2 → 2.161.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/package.json +1 -1
- package/src/common.js +32 -0
- package/src/termdb.usecase.js +7 -0
package/package.json
CHANGED
package/src/common.js
CHANGED
|
@@ -79,6 +79,38 @@ export const dt2label = {
|
|
|
79
79
|
[dtmetaboliteintensity]: 'Metabolite Intensity'
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
+
// Maps dt types to UI labels and lesion types for GRIN2
|
|
83
|
+
// All dt types use lesionTypes array for consistency
|
|
84
|
+
export const dt2lesion = {
|
|
85
|
+
[dtsnvindel]: {
|
|
86
|
+
uilabel: 'SNV/INDEL (Mutation)',
|
|
87
|
+
lesionTypes: [{ name: 'Mutation', lesionType: 'mutation' }]
|
|
88
|
+
},
|
|
89
|
+
[dtcnv]: {
|
|
90
|
+
uilabel: 'CNV (Copy Number Variation)',
|
|
91
|
+
lesionTypes: [
|
|
92
|
+
{ name: 'Loss', lesionType: 'loss' },
|
|
93
|
+
{ name: 'Gain', lesionType: 'gain' }
|
|
94
|
+
]
|
|
95
|
+
},
|
|
96
|
+
[dtsv]: {
|
|
97
|
+
uilabel: 'SV (Structural Variation)',
|
|
98
|
+
lesionTypes: [{ name: 'SV', lesionType: 'sv' }]
|
|
99
|
+
},
|
|
100
|
+
[dtfusionrna]: {
|
|
101
|
+
uilabel: 'Fusion (RNA Fusion)',
|
|
102
|
+
lesionTypes: [{ name: 'Fusion', lesionType: 'fusion' }]
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// Maps GRIN2 option types to their corresponding dt values
|
|
107
|
+
export const optionToDt = {
|
|
108
|
+
snvindelOptions: dtsnvindel,
|
|
109
|
+
cnvOptions: dtcnv,
|
|
110
|
+
fusionOptions: dtfusionrna,
|
|
111
|
+
svOptions: dtsv
|
|
112
|
+
}
|
|
113
|
+
|
|
82
114
|
export const mclass = {
|
|
83
115
|
M: {
|
|
84
116
|
label: 'MISSENSE',
|
package/src/termdb.usecase.js
CHANGED
|
@@ -83,6 +83,13 @@ export function isUsableTerm(term, _usecase, termdbConfig, ds) {
|
|
|
83
83
|
if (hasAllowedChildTypes(child_types, ['survival'])) uses.add('branch')
|
|
84
84
|
return uses
|
|
85
85
|
|
|
86
|
+
case 'summaryInput':
|
|
87
|
+
if (usecase.detail === 'term2' || usecase.detail == 'term0') {
|
|
88
|
+
if (term.type && term.type !== 'survival') uses.add('plot')
|
|
89
|
+
if (hasAllowedChildTypes(child_types, ['survival'])) uses.add('branch')
|
|
90
|
+
return uses
|
|
91
|
+
}
|
|
92
|
+
|
|
86
93
|
case 'matrix':
|
|
87
94
|
if (term.type) uses.add('plot')
|
|
88
95
|
if (!term.isleaf) uses.add('branch')
|