I have an affyBatch object with gene expression data. The data is read in using
dat <- ReadAffy()
with no options. I then extract the 5600 genes that I am interested in using,
dat <- RemoveProbes(listOutProbeSets, cdfpackagename, probepackagename)
I then normalise the expression data using
dat.rma <- rma(dat)
Now I want to the export the raw data AND the rma-normalised data to .csv files. Inspecting the data I find that exprs(dat) has dimensions 226576 by 30 and dat.rma has dimensions 5600 by 30. How do I extract the 5600 by 30 matrix of the RAW expression values? I don’t know where the 226576 rows in the raw data have come from!
I’m a bit of a beginner with bioconductor data structures! Sorry for not providing runnable example code – not sure how I would do that in this case.
During transformation from raw to rma-normalised data, you have, among other things, combined/summarised low level probe intensity values into probe sets values (that map to genes). This explains why you have more features in a raw
AffyBatchobject than in aExpressionSetinstance (created by thermafunction). Also, depending on the chip you have, there are several perfect match (PM) and miss match (MM) probes per probeset, which boosts the number of probes per probeset. The mapping probe -> probeset is defined in the chip definition file and handled automatically.A few additional thoughts though. Removing probes before doing normalisation might not be a good thing to do. One assumption when performing normalisation is that most of you ‘genes’ do not change, so keeping only ‘those of interest‘ might break this, depending what ‘those of interest‘ means of course. You can always do your filtering on the
ExpressionSet, after normalisation:Hope this helps.