This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How can I generate Heat Map with dendograms, and PCA analysis in "R Programming" for this type of data?

I have scale and normalized data in excel. A column = genes, B - S columns = Tissue types.

  1. How can I perform PCA for my data; >To cluster similar Tissue types, >To cluster similar Gene groups
  2. -How can I generate heat map for this data; I used d3heatmap R package, but I do not know how to explain this statistically this because not sure what method is using this package i.e. Clustering method, scaling, etc.

The way my data looks like in Excel,

AGI Tissue Type 1 Tissue Type 2 Tissue Type 3 Tissue Type 4 Tissue Type 5 Tissue Type 6 Tissue Type 7 Tissue Type 8

A 1.457958966 1.082728155 1.421862008 1.282919309 1.365338194 1.825823721 1.442458653 1.301820193

B 0.215245986 0.232381653 0.206548478 0.203164578 0.476502255 0.178929005 0.2419442 0.381018497

C 0.297877541 0.313489112 0.251719576 0.272301642 0.354067746 0.326371147 0.268637474 0.344993509

E 1 D 1.113670056 0.878336899 1.467816289 1.099945097 0.841847105 1.296911268 1.04983679 1.20244969

F 1.236532232 1.297729828 1.225486185 1.308011803 1.148918493 1.229466152 1.232070028 1.286624981

I have genes A to BC (55 genes), 18 different Tissue types,

r pca heat map

1 answer

First get your data out of Excel by saving it as a TSV or CSV file, then read this into R with read.table() or read.csv(). Then:

Each of these functions will scale your data for you. In order to understand which distance (e.g. Euclidean, correlation, Canberra, etc.) and linkage (e.g. single, average, complete, Ward's, etc.) methods are being use, research the default values for each function. In R, if you want to see what the defaults are, then type the function name with a question mark pre-pended, e.g. ?heatmap.2 brings up the help pages ont the heatmap.2 function

Thank you very much Kevin for your very kind reply. I appreciate you taking your time to answer. I will try this.

Log in to answer this question.