AgilentOneColorPreprocessingFunction<- function(path,data,methodBC,methodNBA)
{
MA <<- backgroundCorrect(data, method=methodBC ,offset = 2) 
rownames(MA$E)=MA$genes$ProbeName
MA<-MA[rm.na(rownames(MA$E)),]
MAb <<-suppressWarnings(suppressMessages(normalizeBetweenArrays(MA, method=methodNBA)))
data_mt<-NaRV.omit(as.data.frame(MAb$E))
MAb$E=(data_mt)
MAb$genes=(MAb$genes[(MAb$genes$ProbeName %in% rownames(MAb$E)),])
MA.avg <-suppressWarnings(suppressMessages(avereps(MAb, ID=MAb$genes$ProbeName)))
data_matrix=NaRV.omit(MA.avg$E)
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(list(dataNBA=MA.avg,dataBG=MA,matrix_data=as.matrix(MA.avg$E),symbol=MA.avg$genes$GeneName))
}
