From b7cf2eecc1d5d3d3445560bb5185cf2a430a8a05 Mon Sep 17 00:00:00 2001 From: FranziMe Date: Wed, 8 Dec 2021 20:06:17 +0100 Subject: [PATCH] #10 tested 4.0.4 image --- R_workshop.2.Rmd | 27 ++- R_workshop.2.html | 433 ++++++++++++-------------------------------- R_workshop.html | 446 +++++++++++++--------------------------------- 3 files changed, 251 insertions(+), 655 deletions(-) diff --git a/R_workshop.2.Rmd b/R_workshop.2.Rmd index 542c3a2..355f5de 100644 --- a/R_workshop.2.Rmd +++ b/R_workshop.2.Rmd @@ -543,24 +543,19 @@ hist(log2(mean.after), breaks = H1$breaks, col = '#20502050', add = TRUE) Heatmaps are another regular plot to describe expression data among many other applications. We will use the data and code from this webpage: https://davetang.org/muse/2018/05/15/making-a-heatmap-in-r-with-the-pheatmap-package/ -```{r, eval = F, echo = TRUE} -if (!requireNamespace("BiocManager", quietly = TRUE)) - install.packages("BiocManager", repos='http://cran.us.r-project.org' , - dependencies = TRUE, version = "1.30.10") -BiocManager::install("DESeq") -``` - -```{r eval = T, message=FALSE, eval = FALSE} +```{r, message=FALSE, eval = TRUE} library(pheatmap) -library(DESeq) -# load data and subset -example_file = system.file ("extra/TagSeqExample.tab", package="DESeq") -data = read.delim(example_file, header=T, row.names="gene") -data_subset = as.matrix(data[rowSums(data)>50000,]) - -# create heatmap using pheatmap -pheatmap(data_subset) +# Generate some data +test = matrix(rnorm(200), 20, 10) +test[1:10, seq(1, 10, 2)] = test[1:10, seq(1, 10, 2)] + 3 +test[11:20, seq(2, 10, 2)] = test[11:20, seq(2, 10, 2)] + 2 +test[15:20, seq(2, 10, 2)] = test[15:20, seq(2, 10, 2)] + 4 +colnames(test) = paste("Test", 1:10, sep = "") +rownames(test) = paste("Gene", 1:20, sep = "") + +# Draw heatmaps +pheatmap(test) ``` diff --git a/R_workshop.2.html b/R_workshop.2.html index b5f1c61..c24073b 100644 --- a/R_workshop.2.html +++ b/R_workshop.2.html @@ -14,207 +14,36 @@ R Workshop – Day 2 - + + - - - - - - + + + + + + + - + code{white-space: pre-wrap;} + span.smallcaps{font-variant: small-caps;} + span.underline{text-decoration: underline;} + div.column{display: inline-block; vertical-align: top; width: 50%;} + div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;} + ul.task-list{list-style: none;} + + + diff --git a/R_workshop.html b/R_workshop.html index d8b6dc7..cfc3d11 100644 --- a/R_workshop.html +++ b/R_workshop.html @@ -13,207 +13,36 @@ R Workshop – Introduction to R - + + - - - - - - + + + + + + + - + code{white-space: pre-wrap;} + span.smallcaps{font-variant: small-caps;} + span.underline{text-decoration: underline;} + div.column{display: inline-block; vertical-align: top; width: 50%;} + div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;} + ul.task-list{list-style: none;} + + +