GenePixOneColorPreprocessingFunction<- function(data,methodBC,methodNBA)
{
  MA <<- suppressWarnings(suppressMessages(backgroundCorrect(data, method=methodBC ,offset = 16))) 
  rownames(MA$E)=MA$genes$ID
  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$ID %in% rownames(MAb$E)),])
  MA.avg <-suppressWarnings(suppressMessages(avereps(MAb, ID=MAb$genes$ID)))
  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$Name))
}

