changeset 42:fadbdd8d76d5 draft

Uploaded
author proteomisc
date Sat, 16 Dec 2023 13:24:48 +0000
parents 8aaf6fdb06d6
children dc0904796d06
files preprocess_datasets/test-data/Agilent_Two_Colors_Preprocessing_Functions.R
diffstat 1 files changed, 22 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /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)
+}