I read several files into an affybatch object. In the next step I would like to run a normalization for only a specific subset of genes from this affyBatch.
The problem is, that there are no gene names in the object. Each probeSet has several probes and
This is always a problem I run in to when using eSet objects in R. It seems that these data structures are meant to contain all of your probe-level data (intensity values from your CEL files) as rows and columns in the matrix assayData, as well as phenotype info (in this case, probably the names of your CEL files) in a phenoData slot. You also have an annotation slot in this object, which I am assuming you want to contain gene names for each set of probes covering those genes. Well, guess what? Assuming you created this eSet object using "read.affybatch" or "ReadAffy" http://rss.acs.unt.edu/Rdoc/library/affy/html/read.affybatch.html) it seems that there is no way to specify this annotation information.
I work at the same university as the people who created these data structures, and, while I am sure they make sense to the creators, they can be pretty opaque to outsiders. If you want to subset your affyBatch object, the best you can do is specifying some rows or probe names from the assayData slot, or sample names from the phenoData slot.
sub.affyBatch <- affyBatch@assayData[,affyBatch@phenoData$samplename] # I think this gets the probe level data for one sample of "samplename".
sub.affyBatch2 <- affyBatch@assayData[which(rownames(affyBatch@assayData)=="rsid"),] # I think this grabs one probe from the probe level data across all your samples.
The above examples may not work, but this is the type of thing I think you are looking for.
But than it won't help me much as I'll need to coerce it into an affyBatch object all over again.
The Idea is, that I would like to remove the probe set which were found absent by the mas5-test from affymetrix.
Is there a different way to make sure to normalize the data only with the present probes?
But This is not exactly sub-setting the affyBatch, but sub-setting the environment I am working with this affyBatch. It seems quite harsh to me.
To add to that, I tried to detach the environment & load it back. I always got the same modified environment. To get the old, complete one. I needed to quit and restart the session (which is annoying).
The basic operations are summarized on
?"AffyBatch-class"
; generally using direct slot access (those@
) will only lead to tears.Note that this won't create new AffyBatch instances, but a matrix of number of probes by number of arrays.
But than it won't help me much as I'll need to coerce it into an affyBatch object all over again.
The Idea is, that I would like to remove the probe set which were found absent by the mas5-test from affymetrix. Is there a different way to make sure to normalize the data only with the present probes?