-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDemo.R
25 lines (22 loc) · 1.23 KB
/
Demo.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#vignette
##### normalize data #
# this creates the fits required to do the normalization
#sigAsample<-sigA[1:1000,]; sigBsample=sigB[1:1000,]; Annotsample<-Annot[1:1000,]
library(pls)
save(sigAsample, sigBsample, Annotsample, matred, matgrn, cp.types, cell_type, file='data.Rda')
newnormout <- newnorm(ifquant=FALSE, sigA=sigAsample, sigB=sigBsample, Annot=Annotsample,
controlred=matred, controlgrn=matgrn,
cp.types=cp.types, cell_type = cell_type,
ncmp = ncmp, save.loess=TRUE, applyloess=TRUE, logit.quant=TRUE)
origBeta <- newnormout[[1]]
newBeta <- newnormout[[2]]
rownames(newBeta) <- rownames(origBeta)
colnames(newBeta) <- colnames(origBeta)
#save(newBeta, file=paste(PATH,"NEW_NORM_DATA/newBeta4.RData",sep=""))
#save(origBeta, file=paste(PATH,"NEW_NORM_DATA/origBeta.RData",sep=""))
#### end of normalization algorithm
################################################
#BETA<-read.delim(paste(PATH,"RAW_DATA/AVG_Beta.txt", sep=""),sep="\t",as.is=T)
#colnames(BETA)=substr(colnames(BETA),2,18); rownames(BETA)=BETA[,1]
#AVG.BETA=BETA[cpg,keep]
#save(AVG.BETA,file=paste(PATH,"RAW_DATA/AVG.BETA.RData",sep="")