Skip to content

Commit 7ca2e6b

Browse files
committed
dark color update
1 parent 4715e03 commit 7ca2e6b

File tree

5 files changed

+124
-52
lines changed

5 files changed

+124
-52
lines changed

inst/templates/cpsr.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ h2, #TOC>ul>li {
4949
*/
5050

5151
.exploratory {
52-
background: #000;
52+
background: #2c313c;
5353
border-radius: 5px;
5454

5555
}
@@ -88,7 +88,7 @@ h2, #TOC>ul>li {
8888

8989
.custom {
9090
/*background: darkmagenta;*/
91-
background: #000;
91+
background: #2c313c;
9292
border-radius: 5px;
9393

9494
}

inst/templates/cpsr_report.qmd

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ format:
2323
embed-resources: true
2424
smooth-scroll: true
2525
page-layout: full
26-
fontsize: 0.9em
26+
fontsize: 0.92em
2727
toc: true
2828
toc_depth: 2
2929
grid:
30-
body-width: 920px
30+
body-width: 940px
3131
css: cpsr.css
3232

3333
---
@@ -106,12 +106,15 @@ options(scipen = 0)
106106

107107
<br><br>
108108

109+
<font size="-1">
109110

110111
## References
111112

112113
::: {#refs}
113114
:::
114115

116+
</font>
117+
115118
```{r cpsr_disclaimer}
116119
#| eval: true
117120
#| output: asis

inst/templates/quarto/cpsr_biomarkers.qmd

Lines changed: 115 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ missing_germline_items <- list()
1111
biomarker_present <- F
1212
etype_set <- list()
1313
14-
for (etype in c("Predictive","Diagnostic","Predisposing","Prognostic")) {
14+
for (etype in c("Predictive","Diagnostic",
15+
"Predisposing","Prognostic")) {
1516
show_germline_filters[[tolower(etype)]] <- F
1617
missing_germline_items[[tolower(etype)]] <- T
1718
@@ -61,7 +62,9 @@ As indicated from the variant-association numbers above, the same germline mutat
6162
6263
cat("\n::: {.callout-note}\n## Note - biomarker resolution\n\n Biomarkers registered in CIViC/CGI are provided at different _resolutions_ (i.e. filter <b>Biomarker resolution</b>). The accuracy of a match between a variant in the sample and a clinical evidence item (biomarker) will vary accordingly (highlighted by gene symbols with different color backgrounds):\n\n")
6364
64-
cat('<ul><li>Biomarker match at the <mark style="background-color:black; font-weight:bold; color:white">&nbsp; genomic position/amino acid/codon level &nbsp;</mark></li>')
65+
cat('<ul><li>Biomarker match at the <mark style="background-color:',
66+
pcgrr::color_palette$bg_dark,
67+
'; font-weight:bold; color:white">&nbsp; genomic position/amino acid/codon level&nbsp;</mark></li>')
6568
cat(paste0('<br><li>Biomarker match at the <mark style="background-color:',
6669
pcgrr::color_palette$warning,
6770
'; color:white; font-weight:bold">&nbsp; exon/gene level&nbsp; </mark></li></ul>\n\n:::'))
@@ -102,13 +105,23 @@ variants_germline_predisposing_shared <- crosstalk::SharedData$new(
102105
etype_set[['predisposing']])
103106
crosstalk::bscols(
104107
list(
105-
crosstalk::filter_select("BM_CANCER_TYPE", "Cancer type", variants_germline_predisposing_shared, ~BM_CANCER_TYPE),
106-
crosstalk::filter_select("BM_CLINICAL_SIGNIFICANCE", "Clinical significance", variants_germline_predisposing_shared, ~BM_CLINICAL_SIGNIFICANCE),
107-
crosstalk::filter_select("BM_EVIDENCE_LEVEL", "Evidence level", variants_germline_predisposing_shared, ~BM_EVIDENCE_LEVEL)
108+
crosstalk::filter_select(
109+
"BM_CANCER_TYPE", "Cancer type",
110+
variants_germline_predisposing_shared, ~BM_CANCER_TYPE),
111+
crosstalk::filter_select(
112+
"BM_CLINICAL_SIGNIFICANCE", "Clinical significance",
113+
variants_germline_predisposing_shared, ~BM_CLINICAL_SIGNIFICANCE),
114+
crosstalk::filter_select(
115+
"BM_EVIDENCE_LEVEL", "Evidence level",
116+
variants_germline_predisposing_shared, ~BM_EVIDENCE_LEVEL)
108117
),
109118
list(
110-
crosstalk::filter_select("SYMBOL", "Gene", variants_germline_predisposing_shared, ~SYMBOL),
111-
crosstalk::filter_select("BM_RESOLUTION", "Biomarker resolution", variants_germline_predisposing_shared, ~BM_RESOLUTION)
119+
crosstalk::filter_select(
120+
"SYMBOL", "Gene",
121+
variants_germline_predisposing_shared, ~SYMBOL),
122+
crosstalk::filter_select(
123+
"BM_RESOLUTION", "Biomarker resolution",
124+
variants_germline_predisposing_shared, ~BM_RESOLUTION)
112125
)
113126
)
114127
@@ -137,11 +150,16 @@ DT::datatable(variants_germline_predisposing_shared,
137150
fontWeight = "bold",
138151
`text-align` = "center",
139152
backgroundColor = DT::styleEqual(
140-
c("genomic", "hgvsp", "codon",
141-
"hgvsp_nonprincipal", "exon", "gene"),
142-
c("#000", "#000", "#000","#000",
143-
pcgrr::color_palette$warning,
144-
pcgrr::color_palette$warning)
153+
c('genomic','hgvsp','codon',
154+
'exon','gene_region_mut',
155+
'gene_lof','gene_mut'),
156+
c(pcgrr::color_palette$bg_dark,
157+
pcgrr::color_palette$bg_dark,
158+
pcgrr::color_palette$bg_dark,
159+
pcgrr::color_palette[['warning']],
160+
pcgrr::color_palette[['warning']],
161+
pcgrr::color_palette[['warning']],
162+
pcgrr::color_palette[['warning']])
145163
)
146164
)
147165
```
@@ -186,15 +204,26 @@ variants_germline_predictive_shared <- crosstalk::SharedData$new(
186204
etype_set[['predictive']])
187205
crosstalk::bscols(
188206
list(
189-
crosstalk::filter_select("BM_CANCER_TYPE", "Cancer type", variants_germline_predictive_shared, ~BM_CANCER_TYPE),
190-
crosstalk::filter_select("BM_CLINICAL_SIGNIFICANCE", "Clinical significance", variants_germline_predictive_shared, ~BM_CLINICAL_SIGNIFICANCE),
191-
crosstalk::filter_select("BM_EVIDENCE_LEVEL", "Evidence level", variants_germline_predictive_shared, ~BM_EVIDENCE_LEVEL)
207+
crosstalk::filter_select(
208+
"BM_CANCER_TYPE", "Cancer type",
209+
variants_germline_predictive_shared, ~BM_CANCER_TYPE),
210+
crosstalk::filter_select(
211+
"BM_CLINICAL_SIGNIFICANCE", "Clinical significance",
212+
variants_germline_predictive_shared, ~BM_CLINICAL_SIGNIFICANCE),
213+
crosstalk::filter_select(
214+
"BM_EVIDENCE_LEVEL", "Evidence level",
215+
variants_germline_predictive_shared, ~BM_EVIDENCE_LEVEL)
192216
),
193217
list(
194-
crosstalk::filter_select("SYMBOL", "Gene", variants_germline_predictive_shared, ~SYMBOL),
195-
crosstalk::filter_select("BM_RESOLUTION", "Biomarker resolution",
196-
variants_germline_predictive_shared, ~BM_RESOLUTION),
197-
crosstalk::filter_select("BM_THERAPEUTIC_CONTEXT", "Therapeutic context", variants_germline_predictive_shared, ~BM_THERAPEUTIC_CONTEXT)
218+
crosstalk::filter_select(
219+
"SYMBOL", "Gene",
220+
variants_germline_predictive_shared, ~SYMBOL),
221+
crosstalk::filter_select(
222+
"BM_RESOLUTION", "Biomarker resolution",
223+
variants_germline_predictive_shared, ~BM_RESOLUTION),
224+
crosstalk::filter_select(
225+
"BM_THERAPEUTIC_CONTEXT", "Therapeutic context",
226+
variants_germline_predictive_shared, ~BM_THERAPEUTIC_CONTEXT)
198227
)
199228
)
200229
@@ -222,11 +251,16 @@ DT::datatable(
222251
fontWeight = "bold",
223252
`text-align` = "center",
224253
backgroundColor = DT::styleEqual(
225-
c("genomic", "hgvsp", "codon",
226-
"hgvsp_nonprincipal", "exon", "gene"),
227-
c("#000", "#000", "#000","#000",
228-
pcgrr::color_palette$warning,
229-
pcgrr::color_palette$warning)
254+
c('genomic','hgvsp','codon',
255+
'exon','gene_region_mut',
256+
'gene_lof','gene_mut'),
257+
c(pcgrr::color_palette$bg_dark,
258+
pcgrr::color_palette$bg_dark,
259+
pcgrr::color_palette$bg_dark,
260+
pcgrr::color_palette[['warning']],
261+
pcgrr::color_palette[['warning']],
262+
pcgrr::color_palette[['warning']],
263+
pcgrr::color_palette[['warning']])
230264
)
231265
)
232266
```
@@ -272,22 +306,36 @@ variants_germline_prognostic_shared <- crosstalk::SharedData$new(
272306
etype_set[['prognostic']])
273307
crosstalk::bscols(
274308
list(
275-
crosstalk::filter_select("SYMBOL", "Gene", variants_germline_prognostic_shared, ~SYMBOL),
276-
crosstalk::filter_select("BM_CANCER_TYPE", "Cancer type", variants_germline_prognostic_shared, ~BM_CANCER_TYPE),
277-
crosstalk::filter_select("BM_CLINICAL_SIGNIFICANCE", "Clinical significance", variants_germline_prognostic_shared, ~BM_CLINICAL_SIGNIFICANCE)
309+
crosstalk::filter_select(
310+
"SYMBOL", "Gene",
311+
variants_germline_prognostic_shared, ~SYMBOL),
312+
crosstalk::filter_select(
313+
"BM_CANCER_TYPE", "Cancer type",
314+
variants_germline_prognostic_shared, ~BM_CANCER_TYPE),
315+
crosstalk::filter_select(
316+
"BM_CLINICAL_SIGNIFICANCE", "Clinical significance",
317+
variants_germline_prognostic_shared, ~BM_CLINICAL_SIGNIFICANCE)
278318
),
279319
list(
280-
crosstalk::filter_select("BM_EVIDENCE_LEVEL", "Evidence level", variants_germline_prognostic_shared, ~BM_EVIDENCE_LEVEL),
281-
crosstalk::filter_select("BM_RESOLUTION", "Biomarker resolution", variants_germline_prognostic_shared, ~BM_RESOLUTION)
320+
crosstalk::filter_select(
321+
"BM_EVIDENCE_LEVEL", "Evidence level",
322+
variants_germline_prognostic_shared, ~BM_EVIDENCE_LEVEL),
323+
crosstalk::filter_select(
324+
"BM_RESOLUTION", "Biomarker resolution",
325+
variants_germline_prognostic_shared, ~BM_RESOLUTION)
282326
)
283327
)
284328
##cat("The table below lists all variant-evidence item associations:", sep = "\n")
285329
htmltools::br()
286330
htmltools::br()
287331
288-
DT::datatable(variants_germline_prognostic_shared, escape = F, extensions = c("Buttons", "Responsive"), options = list(
289-
buttons = c("csv", "excel"),
290-
pageLength = 6, dom = "Bfrtip")) |>
332+
DT::datatable(
333+
variants_germline_prognostic_shared,
334+
escape = F,
335+
extensions = c("Buttons", "Responsive"),
336+
options = list(
337+
buttons = c("csv", "excel"),
338+
pageLength = 6, dom = "Bfrtip")) |>
291339
DT::formatStyle("BM_EVIDENCE_LEVEL",
292340
backgroundColor = DT::styleEqual(
293341
pcgrr::color_palette$clinical_evidence$levels,
@@ -301,10 +349,16 @@ DT::datatable(variants_germline_prognostic_shared, escape = F, extensions = c("B
301349
fontWeight = "bold",
302350
`text-align` = "center",
303351
backgroundColor = DT::styleEqual(
304-
c("genomic", "hgvsp", "codon", "hgvsp_nonprincipal", "exon", "gene"),
305-
c("#000", "#000", "#000","#000",
306-
pcgrr::color_palette$warning,
307-
pcgrr::color_palette$warning)
352+
c('genomic','hgvsp','codon',
353+
'exon','gene_region_mut',
354+
'gene_lof','gene_mut'),
355+
c(pcgrr::color_palette$bg_dark,
356+
pcgrr::color_palette$bg_dark,
357+
pcgrr::color_palette$bg_dark,
358+
pcgrr::color_palette[['warning']],
359+
pcgrr::color_palette[['warning']],
360+
pcgrr::color_palette[['warning']],
361+
pcgrr::color_palette[['warning']])
308362
)
309363
)
310364
```
@@ -350,13 +404,23 @@ variants_germline_diagnostic_shared <- crosstalk::SharedData$new(
350404
etype_set[['diagnostic']])
351405
crosstalk::bscols(
352406
list(
353-
crosstalk::filter_select("SYMBOL", "Gene", variants_germline_diagnostic_shared, ~SYMBOL),
354-
crosstalk::filter_select("BM_CANCER_TYPE", "Cancer type", variants_germline_diagnostic_shared, ~BM_CANCER_TYPE),
355-
crosstalk::filter_select("BM_CLINICAL_SIGNIFICANCE", "Clinical association", variants_germline_diagnostic_shared, ~BM_CLINICAL_SIGNIFICANCE)
407+
crosstalk::filter_select(
408+
"SYMBOL", "Gene",
409+
variants_germline_diagnostic_shared, ~SYMBOL),
410+
crosstalk::filter_select(
411+
"BM_CANCER_TYPE", "Cancer type",
412+
variants_germline_diagnostic_shared, ~BM_CANCER_TYPE),
413+
crosstalk::filter_select(
414+
"BM_CLINICAL_SIGNIFICANCE", "Clinical association",
415+
variants_germline_diagnostic_shared, ~BM_CLINICAL_SIGNIFICANCE)
356416
),
357417
list(
358-
crosstalk::filter_select("BM_EVIDENCE_LEVEL", "Evidence level", variants_germline_diagnostic_shared, ~BM_EVIDENCE_LEVEL),
359-
crosstalk::filter_select("BM_RESOLUTION", "Biomarker resolution", variants_germline_diagnostic_shared, ~BM_RESOLUTION)
418+
crosstalk::filter_select(
419+
"BM_EVIDENCE_LEVEL", "Evidence level",
420+
variants_germline_diagnostic_shared, ~BM_EVIDENCE_LEVEL),
421+
crosstalk::filter_select(
422+
"BM_RESOLUTION", "Biomarker resolution",
423+
variants_germline_diagnostic_shared, ~BM_RESOLUTION)
360424
)
361425
)
362426
##cat("The table below lists all variant-evidence item associations:", sep = "\n")
@@ -382,11 +446,16 @@ DT::datatable(variants_germline_diagnostic_shared,
382446
fontWeight = "bold",
383447
`text-align` = "center",
384448
backgroundColor = DT::styleEqual(
385-
c("genomic", "hgvsp", "codon",
386-
"hgvsp_nonprincipal", "exon", "gene"),
387-
c("#000", "#000", "#000","#000",
388-
pcgrr::color_palette$warning,
389-
pcgrr::color_palette$warning)
449+
c('genomic','hgvsp','codon',
450+
'exon','gene_region_mut',
451+
'gene_lof','gene_mut'),
452+
c(pcgrr::color_palette$bg_dark,
453+
pcgrr::color_palette$bg_dark,
454+
pcgrr::color_palette$bg_dark,
455+
pcgrr::color_palette[['warning']],
456+
pcgrr::color_palette[['warning']],
457+
pcgrr::color_palette[['warning']],
458+
pcgrr::color_palette[['warning']])
390459
)
391460
)
392461
```

inst/templates/quarto/cpsr_classification.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ DT::datatable(variants_class3_1,
530530
dom = "Bfrtip",
531531
initComplete = DT::JS(
532532
"function(settings, json) {",
533-
"$(this.api().table().header()).css({'background-color':'#000000', 'color': '#fff'});",
533+
"$(this.api().table().header()).css({'background-color':'#2c313c', 'color': '#fff'});",
534534
"}"
535535
)
536536
)

inst/templates/quarto/cpsr_summary.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ color_report <- "#007a74"
1212
1313
color_clinvar <- color_report
1414
color_novel <- color_report
15-
color_vus <- "#000"
15+
color_vus <- "#2c313c"
1616
1717
n_clinvar <- cps_report$content$snv_indel$callset$variant_display$cpg_non_sf |>
1818
dplyr::filter(.data$CPSR_CLASSIFICATION_SOURCE == "ClinVar") |>

0 commit comments

Comments
 (0)