Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # calculate variance of fcs(fold changes) for each quantiles of means
- # and returns gene names which abs(fcs) > 2*Zscores
- # objects
- # means: numeric vector of means
- # fcs: numeric vector of fold changes
- # LAB: names of probes
- zscores = function(i){
- qt = quantile(means, c(0:10)*0.1)
- cls = findInterval(means, qt)
- zs = tapply(fcs, findInterval(means, qt), sd)
- sig = which(abs(fcs) > zs[cls]*2)
- plot(means, fcs, ylim=c(-1,1), pch=16, cex=0.6)
- points(means[sig], fcs[sig], ylim=c(-1,1), col=2, pch=16, cex=0.6)
- return(LAB[sig])
- }
Add Comment
Please, Sign In to add comment