@sjcrh/proteinpaint-shared 2.98.0 → 2.99.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 +2 -2
- package/src/termdb.usecase.js +12 -0
- package/src/terms.js +22 -0
package/package.json
CHANGED
package/src/common.js
CHANGED
|
@@ -307,7 +307,7 @@ mclass[mclasscnvloss] = {
|
|
|
307
307
|
export const mclasscnvAmp = 'CNV_amplification'
|
|
308
308
|
mclass[mclasscnvAmp] = {
|
|
309
309
|
label: 'Copy number amplification',
|
|
310
|
-
color: '#
|
|
310
|
+
color: '#ff0000',
|
|
311
311
|
dt: dtcnv,
|
|
312
312
|
desc: 'Copy number amplification',
|
|
313
313
|
key: mclasscnvAmp
|
|
@@ -316,7 +316,7 @@ mclass[mclasscnvAmp] = {
|
|
|
316
316
|
export const mclasscnvHomozygousDel = 'CNV_homozygous_deletion'
|
|
317
317
|
mclass[mclasscnvHomozygousDel] = {
|
|
318
318
|
label: 'Copy number homozygous deletion',
|
|
319
|
-
color: '#
|
|
319
|
+
color: '#0000ff',
|
|
320
320
|
dt: dtcnv,
|
|
321
321
|
desc: 'Copy number homozygous deletion',
|
|
322
322
|
key: mclasscnvHomozygousDel
|
package/src/termdb.usecase.js
CHANGED
|
@@ -181,6 +181,18 @@ export function isUsableTerm(term, _usecase, termdbConfig, ds) {
|
|
|
181
181
|
}
|
|
182
182
|
// no specific rule for filter. pass and use default rules
|
|
183
183
|
|
|
184
|
+
case 'correlationVolcano':
|
|
185
|
+
if (usecase.detail == 'numeric') {
|
|
186
|
+
if (isNumericTerm(term)) {
|
|
187
|
+
uses.add('plot')
|
|
188
|
+
}
|
|
189
|
+
if (hasNumericChild(child_types)) uses.add('branch')
|
|
190
|
+
} else {
|
|
191
|
+
if (graphableTypes.has(term.type)) uses.add('plot')
|
|
192
|
+
if (!term.isleaf) uses.add('branch')
|
|
193
|
+
}
|
|
194
|
+
return uses
|
|
195
|
+
|
|
184
196
|
default:
|
|
185
197
|
if (graphableTypes.has(term.type)) uses.add('plot')
|
|
186
198
|
if (!term.isleaf) uses.add('branch')
|
package/src/terms.js
CHANGED
|
@@ -184,3 +184,25 @@ export function getParentType(types, ds) {
|
|
|
184
184
|
}
|
|
185
185
|
return null //no parent found
|
|
186
186
|
}
|
|
187
|
+
|
|
188
|
+
//Returns human readable type (nice label) for the given type
|
|
189
|
+
export function getReadableType(type) {
|
|
190
|
+
const typeMap = {
|
|
191
|
+
categorical: 'Categorical',
|
|
192
|
+
condition: 'Condition',
|
|
193
|
+
float: 'Numeric',
|
|
194
|
+
integer: 'Numeric',
|
|
195
|
+
geneExpression: 'Gene Expression',
|
|
196
|
+
geneVariant: 'Gene Variant',
|
|
197
|
+
metaboliteIntensity: 'Metabolite Intensity',
|
|
198
|
+
multiValue: 'Multi Value',
|
|
199
|
+
samplelst: 'Sample List',
|
|
200
|
+
singleCellGeneExpression: 'Single Cell, Gene Expression',
|
|
201
|
+
singleCellCellType: 'Single Cell, Cell Type',
|
|
202
|
+
snplocus: 'SNP Locus',
|
|
203
|
+
snp: 'SNP',
|
|
204
|
+
snplst: 'SNP List'
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
return typeMap[type] || 'Unknown type [shared/utils/src/terms.js getReadableType()]'
|
|
208
|
+
}
|