paper/paper_tables_and_figures.md

Minimal input data frame

| element | feature | value | annotation | group | | --------------- | --------------- | --------- | ---------- | ----- | | chr or fctr | chr or fctr | numeric | … | … |

library(tidyverse)
## ── Attaching packages ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── tidyverse 1.3.0 ──

## ✓ ggplot2 3.3.1     ✓ purrr   0.3.4
## ✓ tibble  3.0.1     ✓ dplyr   1.0.0
## ✓ tidyr   1.1.0     ✓ stringr 1.4.0
## ✓ readr   1.3.1     ✓ forcats 0.5.0

## ── Conflicts ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── tidyverse_conflicts() ──
## x dplyr::filter() masks stats::filter()
## x dplyr::lag()    masks stats::lag()
library(tidyHeatmap)
## 
## Attaching package: 'tidyHeatmap'

## The following object is masked from 'package:stats':
## 
##     heatmap
pasilla_plus = 
    tidyHeatmap::pasilla %>%
        dplyr::mutate(act = activation) %>% 
        tidyr::nest(data = -sample) %>%
        dplyr::mutate(size = rnorm(n(), 4,0.5)) %>%
        dplyr::mutate(age = runif(n(), 50, 200)) %>%
        tidyr::unnest(data) %>%
        dplyr::rename(count = `count normalised adjusted`) %>%
        dplyr::mutate(pathway = if_else(location == "Secretory", "cluster 1", "cluster 2"))
pasilla_plus %>%
  group_by(pathway) %>%
  heatmap( symbol, sample, count ) %>%
    add_tile(condition) %>%
    add_point(activation) %>%
    add_tile(act) %>%
    add_bar(size) %>%
    add_line(age)
## Adding missing grouping variables: `pathway`
## Adding missing grouping variables: `pathway`
## Adding missing grouping variables: `pathway`
## Adding missing grouping variables: `pathway`



stemangiola/tidyHeatmap documentation built on July 30, 2023, 2:14 a.m.