[BioC] Trouble calculating fold-changes - please help

Srinivas Iyyer srini_iyyer_bio at yahoo.com
Sat May 13 01:54:30 CEST 2006


Hello:

I am analyzing farmer_breast data.  I classified
normals as normal and any other transformed tissue
into cancer. 
in my class file CL0 = normal and CL1 = Cancer


I wrote a function to compute fold changes. 
I would like some help from group members to comment
on this function to calculate fold changes. 

1. is there a better way to calculate. 
2. how do i get log-fold changes. 




fc <- function(x,CL0,CL1){
	x0 <- x[,CL0]
	x1 <- x[,CL1]
	res <- (apply(x0,1,mean) - apply(x1,1,mean))
}


foldcs
<-fc(mydata_mat,CL0=(farm.cl==0),CL1=(fram.cl==1))


logfoldcs <- log(foldcs,2) OR loggoldcs <-
log2(foldcs)

While doing this I get error:
Warning message:
NaNs produced in: log(x, base) 

Could any one help me please. 

Thanks
sri



More information about the Bioconductor mailing list