|
a |
|
b/resources/colours/colours_to_markdown.Rmd |
|
|
1 |
--- |
|
|
2 |
title: "B-NHL colours" |
|
|
3 |
output: |
|
|
4 |
html_document: default |
|
|
5 |
pdf_document: default |
|
|
6 |
--- |
|
|
7 |
|
|
|
8 |
```{r setup, include=FALSE,echo=FALSE} |
|
|
9 |
knitr::opts_chunk$set(echo = TRUE) |
|
|
10 |
library(kableExtra) |
|
|
11 |
library(tidyverse) |
|
|
12 |
#devtools::install_github("morinlab/ggsci") |
|
|
13 |
library(ggsci) |
|
|
14 |
library(gridExtra) |
|
|
15 |
library(conflicted) |
|
|
16 |
conflict_prefer("filter", "dplyr") |
|
|
17 |
``` |
|
|
18 |
|
|
|
19 |
```{r,echo=FALSE,message=F} |
|
|
20 |
full_codes = read_tsv("colour_codes.tsv") %>% dplyr::filter(is.na(is_alias)) %>% select(-is_alias) |
|
|
21 |
``` |
|
|
22 |
|
|
|
23 |
|
|
|
24 |
```{r cars,echo=FALSE,message=FALSE} |
|
|
25 |
show_col = function(col_df){ |
|
|
26 |
|
|
|
27 |
|
|
|
28 |
col_df = col_df %>% rename("Name"="name","Code"="colour") %>% |
|
|
29 |
dplyr::relocate(Name,Code) |
|
|
30 |
|
|
|
31 |
col_df %>% |
|
|
32 |
kbl() %>% |
|
|
33 |
kable_styling(full_width = T) %>% |
|
|
34 |
|
|
|
35 |
column_spec(1, color = "white", |
|
|
36 |
background = col_df$Code) %>% |
|
|
37 |
column_spec(2, color = "white", |
|
|
38 |
background = col_df$Code) |
|
|
39 |
} |
|
|
40 |
|
|
|
41 |
``` |
|
|
42 |
|
|
|
43 |
## Hex codes for B-cell lymphomas |
|
|
44 |
|
|
|
45 |
```{r full_image1, echo=FALSE, message=FALSE} |
|
|
46 |
dplyr::filter(full_codes,group=="pathology") %>% show_col() |
|
|
47 |
|
|
|
48 |
``` |
|
|
49 |
|
|
|
50 |
|
|
|
51 |
|
|
|
52 |
### Cell of Origin / Gene Expression Subgroups |
|
|
53 |
|
|
|
54 |
```{r coo, echo=FALSE} |
|
|
55 |
|
|
|
56 |
dplyr::filter(full_codes,group=="coo") %>% show_col() |
|
|
57 |
``` |
|
|
58 |
|
|
|
59 |
### LymphGen classes with Composite classes |
|
|
60 |
|
|
|
61 |
|
|
|
62 |
```{r full_image2, echo=FALSE, message=FALSE} |
|
|
63 |
dplyr::filter(full_codes,group=="LymphGen") %>% show_col() |
|
|
64 |
|
|
|
65 |
``` |
|
|
66 |
|
|
|
67 |
### HMRN classes |
|
|
68 |
```{r hmrn, echo=FALSE } |
|
|
69 |
dplyr::filter(full_codes,group=="hmrn") %>% show_col() |
|
|
70 |
``` |
|
|
71 |
|
|
|
72 |
### Clinical variables |
|
|
73 |
```{r clinical, echo=FALSE } |
|
|
74 |
dplyr::filter(full_codes,group=="clinical") %>% show_col() |
|
|
75 |
``` |
|
|
76 |
|
|
|
77 |
|
|
|
78 |
### BL and DLBCL Genetic subgroups from the Morin lab |
|
|
79 |
```{r bl,echo=FALSE} |
|
|
80 |
dplyr::filter(full_codes,group %in% c("BL-genetic","DLBCL-genetic")) %>% show_col() |
|
|
81 |
``` |
|
|
82 |
### ASH family journals |
|
|
83 |
```{r blood, echo=FALSE } |
|
|
84 |
dplyr::filter(full_codes,group=="blood") %>% show_col() |
|
|
85 |
``` |
|
|
86 |
|
|
|
87 |
### The entire palette |
|
|
88 |
|
|
|
89 |
```{r,echo=F} |
|
|
90 |
full_codes %>% show_col() |
|
|
91 |
|
|
|
92 |
``` |