GenePixTwoChannelsPreprocessingFunction<- function(path,data,methodBC,methodNWA,methodNBA)
{
 RG <<- backgroundCorrect(data,method=methodBC, offset=64)
 MA <<- suppressWarnings(suppressMessages(normalizeWithinArrays(RG, method=methodNWA,bc.method="none")))
 rownames(MA$A)=rownames(MA$M)=MA$gene$ID
 MA<-MA[rm.na(rownames(MA$M)),]
 RG.pq <<- RG.MA(MA)
 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$ID %in% c(rownames(MAb$A),rownames(MAb$M))),])
 MA.avg <-suppressWarnings(suppressMessages(avereps(MAb, ID=MAb$genes$ID)))
 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")    

return(make_design(MA_matrix=list(dataBG=RG,dataNWA=RG.pq,dataNBA=MA.avg,matrix_data=as.matrix(data_matrix),symbol=MA.avg$genes$Name)))
}

