GenePixTwoChannelsPreprocessingFunction<- function(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))
 genesids <- Reduce(intersect, list(rownames(MAb$M),rownames(MAb$A),MAb$genes$ID))
 MAb$genes <- MAb$genes[MAb$genes$ID %in% genesids,]
 MAb$M <- MAb$M[rownames(MAb$M) %in% genesids,]
 MAb$A <- MAb$A[rownames(MAb$A) %in% genesids,]
 MA.avg <-suppressWarnings(suppressMessages(avereps(MAb, ID=genesids)))
 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)))
}