Created
August 24, 2013 00:12
-
-
Save meren/6325174 to your computer and use it in GitHub Desktop.
This should create an iTOL compatible newick tree under your home directory..
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library('ape') | |
library('vegan') | |
library('ade4') | |
raw_data <- t(data.matrix(read.table('YOUR TAB DELIMITED TRANSCRIPTOMIC DATA MATRIX', header = TRUE, row.names = 1, sep="\t"))) | |
drows<-vegdist(t(raw_data), method='euclidean', na.rm=TRUE) | |
hc <- hclust(drows, method='ward') | |
phy <- hclust2phylog(hc, add.tools = TRUE) | |
write.tree(as.phylo(phy), file="~/newick.tre") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment