Skip to content

Commit

Permalink
#10 tested 4.0.4 image
Browse files Browse the repository at this point in the history
  • Loading branch information
FranziMe committed Dec 8, 2021
1 parent a89a8ae commit b7cf2ee
Showing 3 changed files with 251 additions and 655 deletions.
27 changes: 11 additions & 16 deletions R_workshop.2.Rmd
Original file line number Diff line number Diff line change
@@ -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)
```


0 comments on commit b7cf2ee

Please sign in to comment.