To analyze Affymetrix chips, one can either load a chip description file (cdf) from bioconductor (example: hgu133plus2cdf), or create one using the bioconductor package makecdfenv from the corresponding Affymetrix cdf file (here: HG-U133Plus2.cdf). The result is an environment as a hashtable, with the probesets as keys, and a table of probes as value (at least it is what I understood).
After modifying the composition of the cdf (removing unwanted probes and probesets), I would like the resulting environment to be packaged or saved as a file (to give it to the final user, and be sure that it will be used instead of the original cdf). makecdfenv (make.cdf.package) allow one to produce a package from a file; but how should I save the modified environment in a file to be able to use that function.
Thanks for any hint.
Did you try saving it to a file with save( )?
Yes; but when reloaded it is not recognized as a true cdf by bioconductor rma or similar packages, that keep on searching for the original package; but I found an alternative with Array Initiative programme. I still have to understand how to save properly my modified cdf environment, but there is no hurry.
Hmm. I see. I searched around on this topic and saw several people posting over the years a similar question. It seems that somehow using makecdfenv should be possible. But, I did not see a clear solution anywhere. So, if anyone else has successfully done this it would be great if they will post here.
makecdfenv is the end solution; but it requires a file properly formatted; in fact, it is exactly what ArrayInitiative (http://wellerlab.uncc.edu/ArrayInitiative/tutorial.html) is doing : taking the ascii cdf file originally proposed by Affymetrix as well as the corresponding probe file, to produce a dat file that your can then filter out of the unwanted probes and probesets. after reloading in ArrayInitiative the modified dat file, the programme output the modified ascii cdf file, that can then be used to produce a package with makecdfpackage from makecdfenv, or directly produce with the same package an environment usable in the subsequent array processing.
Very cool. It seems like this solved your problem. I suggest you put these details in an answer to your own question. You'll get my upvote! And, then this question can have an accepted answer.