Skip to content

Commit

Permalink
website: add getting started
Browse files Browse the repository at this point in the history
  • Loading branch information
Kdreval committed Mar 20, 2024
1 parent c09f319 commit 658c9ee
Show file tree
Hide file tree
Showing 14 changed files with 1,059 additions and 42 deletions.
4 changes: 4 additions & 0 deletions docs/concepts/GAMBLR_family.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@
<li>
<a class="dropdown-item" href="../faq.html" rel="" target="">
<span class="dropdown-text">Frequently Asked Qestions</span></a>
</li>
<li>
<a class="dropdown-item" href="../tutorials/getting_started.html" rel="" target="">
<span class="dropdown-text">Getting Started</span></a>
</li>
</ul>
</li>
Expand Down
4 changes: 4 additions & 0 deletions docs/concepts/glossary.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@
<li>
<a class="dropdown-item" href="../faq.html" rel="" target="">
<span class="dropdown-text">Frequently Asked Qestions</span></a>
</li>
<li>
<a class="dropdown-item" href="../tutorials/getting_started.html" rel="" target="">
<span class="dropdown-text">Getting Started</span></a>
</li>
</ul>
</li>
Expand Down
10 changes: 10 additions & 0 deletions docs/faq.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@
<li>
<a class="dropdown-item" href="./faq.html" rel="" target="">
<span class="dropdown-text">Frequently Asked Qestions</span></a>
</li>
<li>
<a class="dropdown-item" href="./tutorials/getting_started.html" rel="" target="">
<span class="dropdown-text">Getting Started</span></a>
</li>
</ul>
</li>
Expand Down Expand Up @@ -196,6 +200,12 @@
<a href="./faq.html" class="sidebar-item-text sidebar-link active">
<span class="menu-text">Frequently Asked Qestions</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./tutorials/getting_started.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">Getting Started</span></a>
</div>
</li>
</ul>
</div>
Expand Down
4 changes: 4 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,10 @@
<li>
<a class="dropdown-item" href="./faq.html" rel="" target="">
<span class="dropdown-text">Frequently Asked Qestions</span></a>
</li>
<li>
<a class="dropdown-item" href="./tutorials/getting_started.html" rel="" target="">
<span class="dropdown-text">Getting Started</span></a>
</li>
</ul>
</li>
Expand Down
10 changes: 10 additions & 0 deletions docs/install.html
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@
<li>
<a class="dropdown-item" href="./faq.html" rel="" target="">
<span class="dropdown-text">Frequently Asked Qestions</span></a>
</li>
<li>
<a class="dropdown-item" href="./tutorials/getting_started.html" rel="" target="">
<span class="dropdown-text">Getting Started</span></a>
</li>
</ul>
</li>
Expand Down Expand Up @@ -226,6 +230,12 @@
<a href="./faq.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">Frequently Asked Qestions</span></a>
</div>
</li>
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./tutorials/getting_started.html" class="sidebar-item-text sidebar-link">
<span class="menu-text">Getting Started</span></a>
</div>
</li>
</ul>
</div>
Expand Down
4 changes: 4 additions & 0 deletions docs/resources/functions.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@
<li>
<a class="dropdown-item" href="../faq.html" rel="" target="">
<span class="dropdown-text">Frequently Asked Qestions</span></a>
</li>
<li>
<a class="dropdown-item" href="../tutorials/getting_started.html" rel="" target="">
<span class="dropdown-text">Getting Started</span></a>
</li>
</ul>
</li>
Expand Down
126 changes: 84 additions & 42 deletions docs/search.json

Large diffs are not rendered by default.

831 changes: 831 additions & 0 deletions docs/tutorials/getting_started.html

Large diffs are not rendered by default.

104 changes: 104 additions & 0 deletions docs/tutorials/getting_started.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
---
title: "Getting Started"
from: markdown+emoji
warning: false
fig.width: 7
fig.height: 5
fig.align: "center"
---

This is a quick tour of some basic commands and usage patterns, just to get you
started.

```{r load_packages}
#| message: false
# Load packages
library(GAMBLR.data)
library(GAMBLR.helpers)
library(GAMBLR.viz)
library(tidyverse)
```

This tutorial explores how to generate some basic and most common plots,
commonly occurring arguments across different functions, best practices and
recommendations in the scope of visualizing data.

## What are standartized colours?
First, let's explore the standartized color pallettes in the GAMBLR.viz. They
are stored as list in one of the GAMBLR.viz dependencies
([GAMBLR.helpers](https://github.com/morinlab/GAMBLR.helpers/blob/master/R/get_gambl_colours.R))
and are an integral part of visualizations.
For demonstration purposes, we will obtain all of the standartized colours:

```{r}
all_c <- get_gambl_colours(
as_dataframe = TRUE
)
```

What are the colours available?
```{r}
str(all_c)
```

What are the colour groups?
```{r}
table(all_c$group)
```

Many of these colours are conviniently provided for you to ensure consistency
that is independent of formatting and case: for example, when the color for
DLBCL COO is returned, the same color will be used for `UNCLASS`, `U`, `UNC`,
`Unclassified` etc.

Just for the purpose of this guide, we will define a simple function to display
some of these colour pallettes:
```{r}
show_col <- function(data, group){
data %>%
filter(
!!sym("group") == {{group}}
) %>%
ggplot(
aes(
x = name,
y = 0,
fill = colour,
label = name
)
) +
geom_tile(width = 0.9, height = 1) +
geom_text(color = "white", fontface="bold") +
scale_fill_identity(guide = "none") +
coord_flip() +
theme_void() +
labs(title = toupper(group)) +
theme(plot.title = element_text(lineheight = 0.9,hjust=0.5,face="bold"))
}
```

## Hex codes for B-cell lymphomas
```{r}
#| fig-height: 12
show_col(all_c, "pathology")
```

## Hex codes for genetic subgroups
```{r}
#| fig-height: 10
show_col(all_c, "genetic_subgroup")
```

## Hex codes for clinical variables
```{r}
#| fig-height: 15
show_col(all_c, "clinical")
```

## Hex codes for Mutation types
```{r}
show_col(all_c, "mutation")
```
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions docs/why.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@
<li>
<a class="dropdown-item" href="./faq.html" rel="" target="">
<span class="dropdown-text">Frequently Asked Qestions</span></a>
</li>
<li>
<a class="dropdown-item" href="./tutorials/getting_started.html" rel="" target="">
<span class="dropdown-text">Getting Started</span></a>
</li>
</ul>
</li>
Expand Down

0 comments on commit 658c9ee

Please sign in to comment.