[BioC] Importing CDF file for custom array using makecdfenv
James W. MacDonald
jmacdon at med.umich.edu
Thu Aug 24 15:33:45 CEST 2006
Hi Ann and Michal,
Michal Okoniewski wrote:
> Hi Ann,
>
> This is what I used to do:
>
> library(makecdfenv)
> library(altcdfenvs)
> library(simpleaffy)
>
> raw.data <- read.affy()
> tmp.env=make.cdf.env("XXX.cdf")
You can probably stop here, as long as you have named your cdfenv
correctly. The affy package will expect the env to be named XXX (or the
_actual_ name of the custom cdf, minus the cdf part), in which case it
will find it automatically when you do anything at all with the AffyBatch.
> my.env2 <- wrapCdfEnvAffy(tmp.env, 712, 712, "myenv") #change 712 into
> 291 in your case my.env2 at envName <-"HGU133a my environment"
> my.env <- as(my.env2,"environment")
> raw.data.mt at cdfName <- "my.env"
>
> or alternatively, and probably better: create the metadata package gzip
> file with make.cdf.package (setting the name and path), install it with
> R CMD INSTALL and just do:
Better would be to run make.cdf.package without setting the package
name. The automatic name will be the correct name to allow the affy
package to find the correct cdf package. If you come up with some
alternative name, then you have required yourself to re-set the cdfName
for any AffyBatch you ever create using these chips, forever (which is a
very long time ;-D).
Also note that you run R CMD INSTALL at a DOS prompt (usually from
within the <R_HOME>/bin directory unless you have added this directory
to your PATH).
>
> library(packagename) #not sure it this is necessary
> raw.data at cdfName <- "packagename"
>
> Cheers,
> Michal
>
> -----Original Message-----
> From: bioconductor-bounces at stat.math.ethz.ch
> [mailto:bioconductor-bounces at stat.math.ethz.ch] On Behalf Of Ann Hess
> Sent: 23 August 2006 22:16
> To: BioConductor Mail List
> Subject: [BioC] Importing CDF file for custom array using makecdfenv
>
> I have CEL (and CDF) files from a custom Affy chip and I need to import
> the CDF file into BioConductor. I am using R 2.3.1, Bioconductor 1.8
> and Windows XP.
>
> I have read the makecdfenv vignette and other postings about this
> process, but I can't figure out how to make it work! I have the
> original CDF file in the same directory as my CEL files. I have
> downloaded ActivePerl and the R source package installation files as
> suggested in the makecdfenv vignette (although I don't understand how
> these are used).
You don't use them. When you call R CMD INSTALL (or as we
case-insensitive windoze users can get away with, rcmd install) at a DOS
prompt, assuming you have set your PATH variable correctly, the INSTALL
perl script that is part of R will automagically do all the things
required to install the package into your R library directory. Then you
can merrily create an AffyBatch object and do lots of things with it
because the affy package will be able to find the correct cdf package.
>
> After loading affy and reading in the CEL files (into an affybatch
> object called "data"), I used the following
> commands:
> library(makecdfenv)
> make.cdf.package("XXX.cdf",species="XXX")
> XXXcdf=make.cdf.env("XXX.cdf")
You are doing two things here, only one of which is necessary. If you
make the package, then you can install it and it will be available for
your use any time you start R. If you make the environment, it will only
persist for the current instance of R, unless you save the R workspace
and do all further analyses that require this env in that workspace (not
usually ideal)>
>
> I do not get any errors, but when I try to look at the affybatch object
> I get the following message:
>
> Error in getCdfInfo(object) : Could not obtain CDF environment, problems
> encountered:
> Specified environment does not contain XXX Library - package XXXcdf not
> installed Data for package affy did not contain XXXcdf Bioconductor -
> XXXcdf not available AffyBatch object size of arrays=291x291 features
> (15887 kb) cdf=XXX (??? affyids) number of samples=24 Error in
> getCdfInfo(object) : Could not obtain CDF environment, problems
> encountered:
> Specified environment does not contain XXX
This line is a hint, although rather oblique. When the affy package
looks for an environment in the current .GlobalEnv, it expects it to be
named XXX, so if you use make.cdf.env, you should name it XXX. However,
if it looks for a package, it has to be named xxxcdf. The best bet is to
allow make.cdf.package to do the package naming itself, because it will
be 100% correct.
>
> I have tried putting the CDF file (created by BioC) in the R libraries
> folder with other libraries, but no luck.
Nope. You have to install. This would have worked for maybe R-1.7.0 or
so, but modern versions of R require you to install the right way.
HTH,
Jim
>
> In the makecdfenv vignette it says to "open a terminal with an operating
> system shell and write R CMD INSTALL XXXcdf", but I don't know how to do
> this on windows.
>
> Any suggestions would be greatly appreciated!
>
> Ann
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives:
> http://news.gmane.org/gmane.science.biology.informatics.conductor
>
> --------------------------------------------------------
>
>
> This email is confidential and intended solely for the use o...{{dropped}}
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
--
James W. MacDonald, M.S.
Biostatistician
Affymetrix and cDNA Microarray Core
University of Michigan Cancer Center
1500 E. Medical Center Drive
7410 CCGC
Ann Arbor MI 48109
734-647-5623
**********************************************************
Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues.
More information about the Bioconductor
mailing list