library(devtools)
library(Biobase)
## Loading required package: BiocGenerics
## Loading required package: parallel
##
## Attaching package: 'BiocGenerics'
## The following objects are masked from 'package:parallel':
##
## clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
## clusterExport, clusterMap, parApply, parCapply, parLapply,
## parLapplyLB, parRapply, parSapply, parSapplyLB
## The following objects are masked from 'package:stats':
##
## IQR, mad, xtabs
## The following objects are masked from 'package:base':
##
## anyDuplicated, append, as.data.frame, cbind, colnames,
## do.call, duplicated, eval, evalq, Filter, Find, get, grep,
## grepl, intersect, is.unsorted, lapply, lengths, Map, mapply,
## match, mget, order, paste, pmax, pmax.int, pmin, pmin.int,
## Position, rank, rbind, Reduce, rownames, sapply, setdiff,
## sort, table, tapply, union, unique, unsplit, which, which.max,
## which.min
## Welcome to Bioconductor
##
## Vignettes contain introductory material; view with
## 'browseVignettes()'. To cite Bioconductor, see
## 'citation("Biobase")', and for packages 'citation("pkgname")'.
library(dendextend)
##
## ---------------------
## Welcome to dendextend version 1.5.0
## Type citation('dendextend') for how to cite the package.
##
## Type browseVignettes(package = 'dendextend') for the package vignette.
## The github page is: https://github.com/talgalili/dendextend/
##
## Suggestions and bug-reports can be submitted at: https://github.com/talgalili/dendextend/issues
## Or contact: <tal.galili@gmail.com>
##
## To suppress this message use: suppressPackageStartupMessages(library(dendextend))
## ---------------------
##
## Attaching package: 'dendextend'
## The following object is masked from 'package:stats':
##
## cutree
con =url("http://bowtie-bio.sourceforge.net/recount/ExpressionSets/montpick_eset.RData")
load(file=con)
close(con)
mp = montpick.eset
pdata=pData(mp)
edata=as.data.frame(exprs(mp))
fdata = fData(mp)
- With no changes to the data
- After filtering all genes with rowMeans less than 100
- After taking the log2 transform of the data without filtering
# By default calculates the distance between rows
dist1 = dist(t(edata))
## Look at distance matrix
colramp = colorRampPalette(c(3,"white",2))(9)
heatmap(as.matrix(dist1),col=colramp,Colv=NA,Rowv=NA)

edata = edata[rowMeans(edata) < 100,]
# By default calculates the distance between rows
dist1 = dist(t(edata))
## Look at distance matrix
colramp = colorRampPalette(c(3,"white",2))(9)
heatmap(as.matrix(dist1),col=colramp,Colv=NA,Rowv=NA)

edata = log2(edata + 1)
# By default calculates the distance between rows
dist1 = dist(t(edata))
## Look at distance matrix
colramp = colorRampPalette(c(3,"white",2))(9)
heatmap(as.matrix(dist1),col=colramp,Colv=NA,Rowv=NA)

sessionInfo()
## R version 3.3.1 (2016-06-21)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 16.04 LTS
##
## locale:
## [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
## [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
## [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
## [7] LC_PAPER=en_US.UTF-8 LC_NAME=C
## [9] LC_ADDRESS=C LC_TELEPHONE=C
## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
##
## attached base packages:
## [1] parallel stats graphics grDevices utils datasets methods
## [8] base
##
## other attached packages:
## [1] dendextend_1.5.0 Biobase_2.34.0 BiocGenerics_0.20.0
## [4] devtools_1.13.1
##
## loaded via a namespace (and not attached):
## [1] Rcpp_0.12.11 DEoptimR_1.0-8 plyr_1.8.4
## [4] viridis_0.4.0 class_7.3-14 tools_3.3.1
## [7] prabclus_2.2-6 digest_0.6.12 mclust_5.2.3
## [10] viridisLite_0.2.0 evaluate_0.10 memoise_1.0.0
## [13] tibble_1.2 gtable_0.2.0 lattice_0.20-35
## [16] yaml_2.1.14 mvtnorm_1.0-6 gridExtra_2.2.1
## [19] trimcluster_0.1-2 withr_1.0.2 stringr_1.2.0
## [22] knitr_1.16 cluster_2.0.6 fpc_2.1-10
## [25] stats4_3.3.1 diptest_0.75-7 rprojroot_1.2
## [28] grid_3.3.1 nnet_7.3-12 robustbase_0.92-7
## [31] flexmix_2.3-13 rmarkdown_1.5 kernlab_0.9-25
## [34] ggplot2_2.2.1 magrittr_1.5 whisker_0.3-2
## [37] backports_1.0.5 scales_0.4.1 htmltools_0.3.5
## [40] modeltools_0.2-21 MASS_7.3-45 assertthat_0.1
## [43] colorspace_1.3-2 stringi_1.1.5 lazyeval_0.2.0
## [46] munsell_0.4.3
EOF