@sjcrh/proteinpaint-server 2.39.5 → 2.40.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/shared/common.js CHANGED
@@ -31,6 +31,7 @@ export const dtdel = 7
31
31
  export const dtnloss = 8
32
32
  export const dtcloss = 9
33
33
  export const dtloh = 10 // to be used in svcnv track
34
+ export const plotColor = '#ce768e'
34
35
 
35
36
  export const dt2label = {
36
37
  [dtsnvindel]: 'SNV/indel',
@@ -299,6 +300,11 @@ mclass[mclassdeletion] = {
299
300
  }
300
301
  // TODO complex indel
301
302
 
303
+ export const dt2color = {
304
+ [dtsnvindel]: mclass.M.color // general color for snvindel irrespective of class (when class is not available)
305
+ // add new dt as needed
306
+ }
307
+
302
308
  // option to override mutation class attribute values
303
309
  export function applyOverrides(overrides = {}) {
304
310
  if (overrides.mclass) {
@@ -29,7 +29,9 @@ export function filter2GDCfilter(f) {
29
29
  }
30
30
  }
31
31
  obj.content.push(f)
32
- } else if (item.tvs.ranges) {
32
+ continue
33
+ }
34
+ if (item.tvs.ranges) {
33
35
  for (const range of item.tvs.ranges) {
34
36
  if (range.startunbounded) {
35
37
  obj.content.push({
@@ -45,21 +47,49 @@ export function filter2GDCfilter(f) {
45
47
  })
46
48
  continue
47
49
  }
48
- obj.content.push({
49
- op: 'and',
50
- content: [
51
- {
52
- op: range.startinclusive ? '>=' : '>',
53
- content: { field: mayChangeCase2Cases(item.tvs.term.id), value: range.start }
54
- },
55
- {
56
- op: range.stopinclusive ? '<=' : '<',
57
- content: { field: mayChangeCase2Cases(item.tvs.term.id), value: range.stop }
58
- }
59
- ]
60
- })
50
+ if (item.tvs.isnot) {
51
+ obj.content.push({
52
+ op: 'or',
53
+ content: [
54
+ {
55
+ op: 'and',
56
+ content: [
57
+ {
58
+ op: range.startinclusive ? '<' : '<=',
59
+ content: { field: mayChangeCase2Cases(item.tvs.term.id), value: range.start }
60
+ }
61
+ ]
62
+ },
63
+ {
64
+ op: 'and',
65
+ content: [
66
+ {
67
+ op: range.stopinclusive ? '>' : '>=',
68
+ content: { field: mayChangeCase2Cases(item.tvs.term.id), value: range.stop }
69
+ }
70
+ ]
71
+ }
72
+ ]
73
+ })
74
+ } else {
75
+ obj.content.push({
76
+ op: 'and',
77
+ content: [
78
+ {
79
+ op: range.startinclusive ? '>=' : '>',
80
+ content: { field: mayChangeCase2Cases(item.tvs.term.id), value: range.start }
81
+ },
82
+ {
83
+ op: range.stopinclusive ? '<=' : '<',
84
+ content: { field: mayChangeCase2Cases(item.tvs.term.id), value: range.stop }
85
+ }
86
+ ]
87
+ })
88
+ }
61
89
  }
90
+ continue
62
91
  }
92
+ throw 'unknown tvs structure when converting to gdc filter'
63
93
  }
64
94
  return obj
65
95
  }
package/utils/hclust.R CHANGED
@@ -14,7 +14,9 @@
14
14
 
15
15
  # To plot the heatmap uncomment line `library(ggplot2) and lines after "Visualization" comment
16
16
 
17
- library(jsonlite)
17
+ suppressWarnings({
18
+ suppressPackageStartupMessages(library(jsonlite))
19
+ })
18
20
  #library(flashClust)
19
21
  #library(ggplot2) # Uncomment this line to plot heatmap in R
20
22