Questions about exporting data out of R
2
0
Entering edit mode
Lizhe Xu ▴ 210
@lizhe-xu-666
Last seen 10.2 years ago
I have two questions about exporting data out of R: (1) how to catch and export the result of the following commond >pm(Data) I want to look at the original data of individual probe before any modification (basically the data of PM probe in affy Cel file combined with Probe ID) (2) how to combine the data (rmaData) with the mas5 flag calls (Dataflag) and export them together after using the following command >Data <-ReadAffy() >rmaData<-rma(Data) >Dataflag<-mas5calls(Data) Thank you very much. Lizhe
probe affy probe affy • 959 views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 43 minutes ago
United States
To 'catch' data, you have to assign them to a variable name. my.pm.data <- pm(Data) To export, see ?write.table To combine rma expression values and mas5 flag calls you can either cbind the two matrices and export together or export and then combine in Excel or whatever you are using. See ?cbind Jim James W. MacDonald Affymetrix and cDNA Microarray Core University of Michigan Cancer Center 1500 E. Medical Center Drive 7410 CCGC Ann Arbor MI 48109 734-647-5623 >>> "Lizhe Xu" <lxu@chnola-research.org> 03/16/04 1:17 PM >>> I have two questions about exporting data out of R: (1) how to catch and export the result of the following commond >pm(Data) I want to look at the original data of individual probe before any modification (basically the data of PM probe in affy Cel file combined with Probe ID) (2) how to combine the data (rmaData) with the mas5 flag calls (Dataflag) and export them together after using the following command >Data <-ReadAffy() >rmaData<-rma(Data) >Dataflag<-mas5calls(Data) Thank you very much. Lizhe _______________________________________________ Bioconductor mailing list Bioconductor@stat.math.ethz.ch https://www.stat.math.ethz.ch/mailman/listinfo/bioconductor
ADD COMMENT
0
Entering edit mode
@matthew-hannah-621
Last seen 10.2 years ago
Lizhe, I did this a while ago and found that if you simply export the pm values you get it in a format that has too many columns for excel. The following works (not sure if its the most efficient). It returns a list of all the affy IDS followed by the 11 values for pm in one file and mm in another (If you have a different size probeset just change [1:11]. To use it you have to create a new folder and then create a subfolder containing each single CEL file (and list these in the dirs line below). Set the first of these dirs as the working directory and then run the following script. Beware though as it takes at least 5min per CEL file on my machine. HTH, Matt #set dirs - modify to your directory names dirs <- c("C:../C24A","C:../C24ACC") library(affy) for(j in dirs) { setwd(j) data <- ReadAffy() #pm data extraction gn <- geneNames(data) pmdatatable <- matrix(nrow=length(gn),ncol=11,byrow=T) for(i in 1:length(gn)){ pmdatatable[i,]<-pm(data,gn[i])[1:11] } #join genenames as labels on pmdatatable and write to file pmdata<- cbind(gn, pmdatatable) write.table(pmdata, file="pmdata.txt") #then for mm values mmdatatable <- matrix(nrow=length(gn),ncol=11,byrow=T) for(i in 1:length(gn)){ mmdatatable[i,]<-mm(data,gn[i])[1:11] } mmdata<- cbind(gn, mmdatatable) write.table(mmdata, file="mmdata.txt") }
ADD COMMENT

Login before adding your answer.

Traffic: 944 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6