Skip to content

Commit

Permalink
dark color update
Browse files Browse the repository at this point in the history
  • Loading branch information
sigven committed Mar 26, 2024
1 parent 4715e03 commit 7ca2e6b
Show file tree
Hide file tree
Showing 5 changed files with 124 additions and 52 deletions.
4 changes: 2 additions & 2 deletions inst/templates/cpsr.css
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ h2, #TOC>ul>li {
*/

.exploratory {
background: #000;
background: #2c313c;
border-radius: 5px;

}
Expand Down Expand Up @@ -88,7 +88,7 @@ h2, #TOC>ul>li {

.custom {
/*background: darkmagenta;*/
background: #000;
background: #2c313c;
border-radius: 5px;

}
Expand Down
7 changes: 5 additions & 2 deletions inst/templates/cpsr_report.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ format:
embed-resources: true
smooth-scroll: true
page-layout: full
fontsize: 0.9em
fontsize: 0.92em
toc: true
toc_depth: 2
grid:
body-width: 920px
body-width: 940px
css: cpsr.css

---
Expand Down Expand Up @@ -106,12 +106,15 @@ options(scipen = 0)

<br><br>

<font size="-1">

## References

::: {#refs}
:::

</font>

```{r cpsr_disclaimer}
#| eval: true
#| output: asis
Expand Down
161 changes: 115 additions & 46 deletions inst/templates/quarto/cpsr_biomarkers.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ missing_germline_items <- list()
biomarker_present <- F
etype_set <- list()
for (etype in c("Predictive","Diagnostic","Predisposing","Prognostic")) {
for (etype in c("Predictive","Diagnostic",
"Predisposing","Prognostic")) {
show_germline_filters[[tolower(etype)]] <- F
missing_germline_items[[tolower(etype)]] <- T
Expand Down Expand Up @@ -61,7 +62,9 @@ As indicated from the variant-association numbers above, the same germline mutat
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")
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>')
cat('<ul><li>Biomarker match at the <mark style="background-color:',
pcgrr::color_palette$bg_dark,
'; font-weight:bold; color:white">&nbsp; genomic position/amino acid/codon level&nbsp;</mark></li>')
cat(paste0('<br><li>Biomarker match at the <mark style="background-color:',
pcgrr::color_palette$warning,
'; color:white; font-weight:bold">&nbsp; exon/gene level&nbsp; </mark></li></ul>\n\n:::'))
Expand Down Expand Up @@ -102,13 +105,23 @@ variants_germline_predisposing_shared <- crosstalk::SharedData$new(
etype_set[['predisposing']])
crosstalk::bscols(
list(
crosstalk::filter_select("BM_CANCER_TYPE", "Cancer type", variants_germline_predisposing_shared, ~BM_CANCER_TYPE),
crosstalk::filter_select("BM_CLINICAL_SIGNIFICANCE", "Clinical significance", variants_germline_predisposing_shared, ~BM_CLINICAL_SIGNIFICANCE),
crosstalk::filter_select("BM_EVIDENCE_LEVEL", "Evidence level", variants_germline_predisposing_shared, ~BM_EVIDENCE_LEVEL)
crosstalk::filter_select(
"BM_CANCER_TYPE", "Cancer type",
variants_germline_predisposing_shared, ~BM_CANCER_TYPE),
crosstalk::filter_select(
"BM_CLINICAL_SIGNIFICANCE", "Clinical significance",
variants_germline_predisposing_shared, ~BM_CLINICAL_SIGNIFICANCE),
crosstalk::filter_select(
"BM_EVIDENCE_LEVEL", "Evidence level",
variants_germline_predisposing_shared, ~BM_EVIDENCE_LEVEL)
),
list(
crosstalk::filter_select("SYMBOL", "Gene", variants_germline_predisposing_shared, ~SYMBOL),
crosstalk::filter_select("BM_RESOLUTION", "Biomarker resolution", variants_germline_predisposing_shared, ~BM_RESOLUTION)
crosstalk::filter_select(
"SYMBOL", "Gene",
variants_germline_predisposing_shared, ~SYMBOL),
crosstalk::filter_select(
"BM_RESOLUTION", "Biomarker resolution",
variants_germline_predisposing_shared, ~BM_RESOLUTION)
)
)
Expand Down Expand Up @@ -137,11 +150,16 @@ DT::datatable(variants_germline_predisposing_shared,
fontWeight = "bold",
`text-align` = "center",
backgroundColor = DT::styleEqual(
c("genomic", "hgvsp", "codon",
"hgvsp_nonprincipal", "exon", "gene"),
c("#000", "#000", "#000","#000",
pcgrr::color_palette$warning,
pcgrr::color_palette$warning)
c('genomic','hgvsp','codon',
'exon','gene_region_mut',
'gene_lof','gene_mut'),
c(pcgrr::color_palette$bg_dark,
pcgrr::color_palette$bg_dark,
pcgrr::color_palette$bg_dark,
pcgrr::color_palette[['warning']],
pcgrr::color_palette[['warning']],
pcgrr::color_palette[['warning']],
pcgrr::color_palette[['warning']])
)
)
```
Expand Down Expand Up @@ -186,15 +204,26 @@ variants_germline_predictive_shared <- crosstalk::SharedData$new(
etype_set[['predictive']])
crosstalk::bscols(
list(
crosstalk::filter_select("BM_CANCER_TYPE", "Cancer type", variants_germline_predictive_shared, ~BM_CANCER_TYPE),
crosstalk::filter_select("BM_CLINICAL_SIGNIFICANCE", "Clinical significance", variants_germline_predictive_shared, ~BM_CLINICAL_SIGNIFICANCE),
crosstalk::filter_select("BM_EVIDENCE_LEVEL", "Evidence level", variants_germline_predictive_shared, ~BM_EVIDENCE_LEVEL)
crosstalk::filter_select(
"BM_CANCER_TYPE", "Cancer type",
variants_germline_predictive_shared, ~BM_CANCER_TYPE),
crosstalk::filter_select(
"BM_CLINICAL_SIGNIFICANCE", "Clinical significance",
variants_germline_predictive_shared, ~BM_CLINICAL_SIGNIFICANCE),
crosstalk::filter_select(
"BM_EVIDENCE_LEVEL", "Evidence level",
variants_germline_predictive_shared, ~BM_EVIDENCE_LEVEL)
),
list(
crosstalk::filter_select("SYMBOL", "Gene", variants_germline_predictive_shared, ~SYMBOL),
crosstalk::filter_select("BM_RESOLUTION", "Biomarker resolution",
variants_germline_predictive_shared, ~BM_RESOLUTION),
crosstalk::filter_select("BM_THERAPEUTIC_CONTEXT", "Therapeutic context", variants_germline_predictive_shared, ~BM_THERAPEUTIC_CONTEXT)
crosstalk::filter_select(
"SYMBOL", "Gene",
variants_germline_predictive_shared, ~SYMBOL),
crosstalk::filter_select(
"BM_RESOLUTION", "Biomarker resolution",
variants_germline_predictive_shared, ~BM_RESOLUTION),
crosstalk::filter_select(
"BM_THERAPEUTIC_CONTEXT", "Therapeutic context",
variants_germline_predictive_shared, ~BM_THERAPEUTIC_CONTEXT)
)
)
Expand Down Expand Up @@ -222,11 +251,16 @@ DT::datatable(
fontWeight = "bold",
`text-align` = "center",
backgroundColor = DT::styleEqual(
c("genomic", "hgvsp", "codon",
"hgvsp_nonprincipal", "exon", "gene"),
c("#000", "#000", "#000","#000",
pcgrr::color_palette$warning,
pcgrr::color_palette$warning)
c('genomic','hgvsp','codon',
'exon','gene_region_mut',
'gene_lof','gene_mut'),
c(pcgrr::color_palette$bg_dark,
pcgrr::color_palette$bg_dark,
pcgrr::color_palette$bg_dark,
pcgrr::color_palette[['warning']],
pcgrr::color_palette[['warning']],
pcgrr::color_palette[['warning']],
pcgrr::color_palette[['warning']])
)
)
```
Expand Down Expand Up @@ -272,22 +306,36 @@ variants_germline_prognostic_shared <- crosstalk::SharedData$new(
etype_set[['prognostic']])
crosstalk::bscols(
list(
crosstalk::filter_select("SYMBOL", "Gene", variants_germline_prognostic_shared, ~SYMBOL),
crosstalk::filter_select("BM_CANCER_TYPE", "Cancer type", variants_germline_prognostic_shared, ~BM_CANCER_TYPE),
crosstalk::filter_select("BM_CLINICAL_SIGNIFICANCE", "Clinical significance", variants_germline_prognostic_shared, ~BM_CLINICAL_SIGNIFICANCE)
crosstalk::filter_select(
"SYMBOL", "Gene",
variants_germline_prognostic_shared, ~SYMBOL),
crosstalk::filter_select(
"BM_CANCER_TYPE", "Cancer type",
variants_germline_prognostic_shared, ~BM_CANCER_TYPE),
crosstalk::filter_select(
"BM_CLINICAL_SIGNIFICANCE", "Clinical significance",
variants_germline_prognostic_shared, ~BM_CLINICAL_SIGNIFICANCE)
),
list(
crosstalk::filter_select("BM_EVIDENCE_LEVEL", "Evidence level", variants_germline_prognostic_shared, ~BM_EVIDENCE_LEVEL),
crosstalk::filter_select("BM_RESOLUTION", "Biomarker resolution", variants_germline_prognostic_shared, ~BM_RESOLUTION)
crosstalk::filter_select(
"BM_EVIDENCE_LEVEL", "Evidence level",
variants_germline_prognostic_shared, ~BM_EVIDENCE_LEVEL),
crosstalk::filter_select(
"BM_RESOLUTION", "Biomarker resolution",
variants_germline_prognostic_shared, ~BM_RESOLUTION)
)
)
##cat("The table below lists all variant-evidence item associations:", sep = "\n")
htmltools::br()
htmltools::br()
DT::datatable(variants_germline_prognostic_shared, escape = F, extensions = c("Buttons", "Responsive"), options = list(
buttons = c("csv", "excel"),
pageLength = 6, dom = "Bfrtip")) |>
DT::datatable(
variants_germline_prognostic_shared,
escape = F,
extensions = c("Buttons", "Responsive"),
options = list(
buttons = c("csv", "excel"),
pageLength = 6, dom = "Bfrtip")) |>
DT::formatStyle("BM_EVIDENCE_LEVEL",
backgroundColor = DT::styleEqual(
pcgrr::color_palette$clinical_evidence$levels,
Expand All @@ -301,10 +349,16 @@ DT::datatable(variants_germline_prognostic_shared, escape = F, extensions = c("B
fontWeight = "bold",
`text-align` = "center",
backgroundColor = DT::styleEqual(
c("genomic", "hgvsp", "codon", "hgvsp_nonprincipal", "exon", "gene"),
c("#000", "#000", "#000","#000",
pcgrr::color_palette$warning,
pcgrr::color_palette$warning)
c('genomic','hgvsp','codon',
'exon','gene_region_mut',
'gene_lof','gene_mut'),
c(pcgrr::color_palette$bg_dark,
pcgrr::color_palette$bg_dark,
pcgrr::color_palette$bg_dark,
pcgrr::color_palette[['warning']],
pcgrr::color_palette[['warning']],
pcgrr::color_palette[['warning']],
pcgrr::color_palette[['warning']])
)
)
```
Expand Down Expand Up @@ -350,13 +404,23 @@ variants_germline_diagnostic_shared <- crosstalk::SharedData$new(
etype_set[['diagnostic']])
crosstalk::bscols(
list(
crosstalk::filter_select("SYMBOL", "Gene", variants_germline_diagnostic_shared, ~SYMBOL),
crosstalk::filter_select("BM_CANCER_TYPE", "Cancer type", variants_germline_diagnostic_shared, ~BM_CANCER_TYPE),
crosstalk::filter_select("BM_CLINICAL_SIGNIFICANCE", "Clinical association", variants_germline_diagnostic_shared, ~BM_CLINICAL_SIGNIFICANCE)
crosstalk::filter_select(
"SYMBOL", "Gene",
variants_germline_diagnostic_shared, ~SYMBOL),
crosstalk::filter_select(
"BM_CANCER_TYPE", "Cancer type",
variants_germline_diagnostic_shared, ~BM_CANCER_TYPE),
crosstalk::filter_select(
"BM_CLINICAL_SIGNIFICANCE", "Clinical association",
variants_germline_diagnostic_shared, ~BM_CLINICAL_SIGNIFICANCE)
),
list(
crosstalk::filter_select("BM_EVIDENCE_LEVEL", "Evidence level", variants_germline_diagnostic_shared, ~BM_EVIDENCE_LEVEL),
crosstalk::filter_select("BM_RESOLUTION", "Biomarker resolution", variants_germline_diagnostic_shared, ~BM_RESOLUTION)
crosstalk::filter_select(
"BM_EVIDENCE_LEVEL", "Evidence level",
variants_germline_diagnostic_shared, ~BM_EVIDENCE_LEVEL),
crosstalk::filter_select(
"BM_RESOLUTION", "Biomarker resolution",
variants_germline_diagnostic_shared, ~BM_RESOLUTION)
)
)
##cat("The table below lists all variant-evidence item associations:", sep = "\n")
Expand All @@ -382,11 +446,16 @@ DT::datatable(variants_germline_diagnostic_shared,
fontWeight = "bold",
`text-align` = "center",
backgroundColor = DT::styleEqual(
c("genomic", "hgvsp", "codon",
"hgvsp_nonprincipal", "exon", "gene"),
c("#000", "#000", "#000","#000",
pcgrr::color_palette$warning,
pcgrr::color_palette$warning)
c('genomic','hgvsp','codon',
'exon','gene_region_mut',
'gene_lof','gene_mut'),
c(pcgrr::color_palette$bg_dark,
pcgrr::color_palette$bg_dark,
pcgrr::color_palette$bg_dark,
pcgrr::color_palette[['warning']],
pcgrr::color_palette[['warning']],
pcgrr::color_palette[['warning']],
pcgrr::color_palette[['warning']])
)
)
```
Expand Down
2 changes: 1 addition & 1 deletion inst/templates/quarto/cpsr_classification.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ DT::datatable(variants_class3_1,
dom = "Bfrtip",
initComplete = DT::JS(
"function(settings, json) {",
"$(this.api().table().header()).css({'background-color':'#000000', 'color': '#fff'});",
"$(this.api().table().header()).css({'background-color':'#2c313c', 'color': '#fff'});",
"}"
)
)
Expand Down
2 changes: 1 addition & 1 deletion inst/templates/quarto/cpsr_summary.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ color_report <- "#007a74"
color_clinvar <- color_report
color_novel <- color_report
color_vus <- "#000"
color_vus <- "#2c313c"
n_clinvar <- cps_report$content$snv_indel$callset$variant_display$cpg_non_sf |>
dplyr::filter(.data$CPSR_CLASSIFICATION_SOURCE == "ClinVar") |>
Expand Down

0 comments on commit 7ca2e6b

Please sign in to comment.