Tutorial: How To Install A Specific Cdf Package For Use In Bioconductor
14
gravatar for Obi Griffith
5.2 years ago by
Obi Griffith16k
Washington University, St Louis, USA
Obi Griffith16k wrote:

Sometimes you may wish to use a CDF file obtained from somewhere (besides the default ones provided through BioConductor). This tutorial is not about how to make such a CDF. But, merely about how to install it and use it with existing Bioconductor packages such as affy and rma.

#Create a package for downloaded CDF
#This assumes you have already downloaded or created a CDF and you just want to use it in Bioconductor with (for example) ReadAffy
#For example suppose you wanted to use a specific CDF from the Affy web site:
#http://www.affymetrix.com/support/technical/byproduct.affx?product=hugene-1_0-st-v1

#Note, this example is purely for illustration. There is no real need to create a package for HuGene-1_0-st-v1
#This chip is already supported by BioConductor and can be loaded with 
#library(hugene10stv1cdf)   #cdfname="hugene10stv1"

#Install package for making cdf packages
source("http://bioconductor.org/biocLite.R")
biocLite("makecdfenv")
library(makecdfenv)

#Create CDF package in temporary directory 
pkgpath <- tempdir()
make.cdf.package("HuGene-1_0-st-v1.r3.cdf", cdf.path="/Users/ogriffit/Downloads/HuGene-1_0-st-v1.r3.unsupported-cdf", compress=FALSE, species = "Homo_sapiens", package.path = pkgpath)
dir(pkgpath)

#Install that package at a terminal using 'pkgpath' from above
#R CMD INSTALL /var/folders/8j/bqry255x52q6_dhyw22w6sq80000gn/T//Rtmppd9YEK/hugene10stv1.r3cdf

#Then, load it for use here
library(hugene10stv1.r3cdf)

#Download a CEL file package for testing purposes
getGEOSuppFiles("GSE27447")

#Unpack the CEL files
untar("GSE27447/GSE27447_RAW.tar", exdir="data")
cels = list.files("data/", pattern = "CEL")
sapply(paste("data", cels, sep="/"), gunzip)
cels = list.files("data/", pattern = "CEL")

setwd("/Users/ogriffit/data")
raw.data=ReadAffy(verbose=TRUE, filenames=cels, cdfname="hugene10stv1.r3cdf") #Custom installed CDF

#You can now go on to whatever normalizing and analysis you wish with the data using your custom CDF package
#perform RMA normalization 
data.rma.norm=rma(raw.data)

#Get the important stuff out of the data - the expression estimates for each array
rma=exprs(data.rma.norm)
ADD COMMENTlink modified 3.5 years ago by microbeatic80 • written 5.2 years ago by Obi Griffith16k

I think one more bioconductor package that also needs to be installed is `s4vector` http://www.bioconductor.org/packages/release/bioc/html/S4Vectors.html

ADD REPLYlink modified 3.5 years ago • written 3.5 years ago by microbeatic80

i was trying to add this to comment instead #quickfingers.

ADD REPLYlink written 3.5 years ago by microbeatic80
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 698 users visited in the last hour