
## Needs the BioConductor affy library installed
runRMA <- function(cel_file_dir, save_gex_in_file) {
	library("affy")
	setwd(cel_file_dir)
	# makes one from ALL cel files in that folder
	eset <- justRMA()
	write.exprs(eset,file=save_gex_in_file) 
}

runRMA2 <- function(cel_file_names, cel_file_dir, save_gex_in_file) {
	library("affy")
	# setwd(cel_file_dir)
	eset <- justRMA(filenames=cel_file_names, celfile.path=cel_file_dir)
	write.exprs(eset,file=save_gex_in_file) 

	cat( "Calculating detection calls .. " )
	#calls <- exprs( mas5calls(x.cel) )

PACalls <- mas5calls(exprs)
cat("done.\nWriting to all.res .. " )
write.res(PACalls)
cat("done.\n")


}




