setwd("C:/sepp/work/fabia/experiments") library(fabia) m <- 100 ff <- list() for (i in 1:m) { dat <- make_fabi_data(n = 1000,l= 100,p = 10,f1 = 5,f2 = 5,of1 = 5,of2 = 10,sd_noise = 3.0,sd_z_noise = 0.2,mean_z = 2.0,sd_z = 1.0,sd_l_noise = 0.2,mean_l = 3.0,sd_l = 1.0) rownames(dat$X) <- as.character(1:nrow(dat$X)) colnames(dat$X) <- as.character(1:ncol(dat$X)) ff[[i]] <- paste("exp_",as.character(i),"_plaid",sep = "") save(dat,file=paste("exp_",as.character(i),".RData",sep = "")) write.table(dat$X, file = paste("exp_",as.character(i),"_X.txt",sep = ""), quote = FALSE, sep = "\t",row.names = TRUE,col.names = TRUE) write.table(dat$Y, file = paste("exp_",as.character(i),"_Y.txt",sep = ""), quote = FALSE, sep = "\t",row.names = TRUE,col.names = TRUE) for (j in 1:length(dat$LC)) { write.table(t(as.vector(dat$LC[[j]])), file = paste("exp_",as.character(i),"_L.txt",sep = ""), quote = FALSE, sep = "\t",row.names = FALSE,col.names = FALSE,append =TRUE) } for (j in 1:length(dat$ZC)) { write.table(t(as.vector(dat$ZC[[j]])), file = paste("exp_",as.character(i),"_Z.txt",sep = ""), quote = FALSE, sep = "\t",row.names = FALSE,col.names = FALSE,append =TRUE) } cat("probeset\t",file = paste("exp_",as.character(i),"_bicat.txt",sep = "")) write.table(dat$X, file = paste("exp_",as.character(i),"_bicat.txt",sep = ""), quote = FALSE, sep = "\t",row.names = TRUE,col.names = TRUE,append=TRUE) write.table(dat$X, file = paste("exp_",as.character(i),"_plaid.dat",sep = ""), quote = FALSE, sep = "\t",row.names = FALSE,col.names = FALSE) write.table(as.character(1:nrow(dat$X)), file = paste("exp_",as.character(i),"_plaid.row",sep = ""), quote = TRUE, sep = "\n",row.names = FALSE,col.names = FALSE) write.table(as.character(1:ncol(dat$X)), file = paste("exp_",as.character(i),"_plaid.col",sep = ""), quote = TRUE, sep = "\n",row.names = FALSE,col.names = FALSE) } write.table(unlist(ff), file = "basenames", quote = FALSE, sep = "\n",row.names = FALSE,col.names = FALSE)