# HG changeset patch # User proteomisc # Date 1702733088 0 # Node ID fadbdd8d76d5d7795e29ac4e037fba439b79452b # Parent 8aaf6fdb06d6693b71dcb789129b65f7838905c3 Uploaded diff -r 8aaf6fdb06d6 -r fadbdd8d76d5 preprocess_datasets/test-data/Agilent_Two_Colors_Preprocessing_Functions.R --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/preprocess_datasets/test-data/Agilent_Two_Colors_Preprocessing_Functions.R Sat Dec 16 13:24:48 2023 +0000 @@ -0,0 +1,22 @@ +AgilentTwoChannelsPreprocessingFunction<- function(data,methodBC,methodNWA,methodNBA) +{ + RG <<- suppressWarnings(suppressMessages(backgroundCorrect(data,method=methodBC, offset= 16))) + MA <<- suppressWarnings(suppressMessages(normalizeWithinArrays(RG, method=methodNWA,bc.method="none"))) + rownames(MA$A)=rownames(MA$M)=MA$gene$ProbeName + MA<-MA[rm.na(rownames(MA$M)),] + MAb <<- suppressWarnings(suppressMessages(normalizeBetweenArrays(MA, method=methodNBA))) + data_mt<-NaRV.omit(as.data.frame(MAb$M)) + MAb$M=(data_mt) + MAb$A=NaRV.omit(as.data.frame(MAb$A)) + MAb$genes=(MAb$genes[(MAb$genes$ProbeName %in% c(rownames(MAb$A),rownames(MAb$M))),]) + RG.pq <<- RG.MA(MA) + MAb$E=MAb$E[rownames(MAb$E) %in% MAb$genes$ProbeName,] + MA.avg <- suppressWarnings(suppressMessages(avereps(MAb,ID=row.names(MAb$E)))) + data_matrix=NaRV.omit(MA.avg$M) + colnames(data_matrix)<-designo$sample + write.table(format(data_matrix, justify="right"),sep="\t", quote=FALSE, + row.names=T, col.names=T,file="Matrix.Data.tsv") + Prepro_object1<-list(dataBG=RG,dataNWA=RG.pq,dataNBA=MA.avg,matrix_data=as.matrix(data_matrix),symbol=(MA.avg$genes$GeneName)) + Prepro_object1=make_design(MA_matrix=Prepro_object1) + return(Prepro_object1) +}