Using log2FC distance matrix in Boot.Phylo to create bootstrapped trees
0
0
Entering edit mode
Larry K. • 0
@larry-k-15228
Last seen 6.0 years ago

Hi,

I have a raw gene expression data matrix (data; matrix of 5000 rows [genes] and 100 columns [samples]). I want to take the log2FC distance matrix generated from plotMDS and run that through boot.phylo. I want to do this because I want to take their exact method for calculating log2FC on an abbreviated list of the top 500 genes. The problem appears to be how I am writing out the function step. Any help is appreciated.

Larry

 

d<-DGEList(data, group=group)

###Group membership is assigned in a different step. That's not the problem.

MDS<-plotMDS(d, gene.selection = "common")

###I want to take the MDS$distance.matrix and take it through boot.phylo.
###The matrix is asymmetrical, so I make it symmetrical first.

MDSmatrix<-as.data.frame(MDS$distance.matrix)
upper<-t(MDSmatrix)
symmetrical.matrix<-upper + MDSmatrix
matrix<-as.matrix(symmetrical.matrix)
dist.matrix<-as.dist(matrix)
data.nj<-nj(dist.matrix)

####Now, put this into boot.phylo

pdf("Tree.pdf")
data.func<- function(x) nj(plotMDS(DGEList(x, group = group))gene.selection="common")
node.prob.1000<-boot.phylo(data.nj, data, data.func, B=1000)
plot(data.nj)
nodelabels(node.prob.1000)
mtext("log2 FC",  outer= T, cex = 1.4, font=2)
dev.off()

 

 

tree bootstrap dgelist plotmds • 895 views
ADD COMMENT

Login before adding your answer.

Traffic: 754 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6