How to use brainarray custom cdf with oligo package?
2
1
Entering edit mode
sanj ▴ 20
@sanj-5889
Last seen 7.6 years ago
United Kingdom

Hi,

I have two datasets from HTA platform for which I want to do fRMA normalisation(specifically). As I understand fRMA works with either affybatch object(package affy) or ExpressionFeatureSet(package oligo). How can I do this by using custom cdf file from brain array resource? I have tried using the "hta20hsensgprobe" package from brainarray website and used the following lines of code:

library(oligo)
library(hta20hsensgprobe)

celFiles<- list.celfiles( "HTA_data",full.names = TRUE)

affyRaw <- read.celfiles(celFiles,pkgname="hta20hsensgprobe")

But this gives me the following error:

Error in (function (classes, fdef, mtable)  : 
  unable to find an inherited method for function ‘kind’ for signature ‘"probetable"’

The sessionInfo is as follows:

 

R version 3.1.2 (2014-10-31)
Platform: x86_64-apple-darwin10.8.0 (64-bit)

locale:
[1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8

attached base packages:
[1] stats4    parallel  stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] hta20hsensgprobe_19.0.0 AnnotationDbi_1.28.2    GenomeInfoDb_1.2.4      pd.hta.2.0_3.10.1       RSQLite_1.0.0           DBI_0.3.1              
 [7] Biostrings_2.34.1       XVector_0.6.0           IRanges_2.0.1           S4Vectors_0.4.0         oligoClasses_1.28.0     frma_1.18.0            
[13] Biobase_2.26.0          BiocGenerics_0.12.1     data.table_1.9.4        aroma.light_2.2.1       aroma.affymetrix_2.13.1 aroma.core_2.13.0      
[19] R.devices_2.13.0        R.filesets_2.7.1        R.utils_2.0.2           R.oo_1.19.0             oligo_1.30.0            affxparser_1.38.0      
[25] R.methodsS3_1.7.0      

loaded via a namespace (and not attached):
 [1] affy_1.44.0           affyio_1.34.0         aroma.apd_0.6.0       base64enc_0.1-3       BiocInstaller_1.16.2  bit_1.1-12            Cairo_1.5-5          
 [8] chron_2.3-45          codetools_0.2-11      digest_0.6.8          DNAcopy_1.40.0        ff_2.2-13             foreach_1.4.2         GenomicRanges_1.18.4 
[15] iterators_1.0.7       magrittr_1.5          MASS_7.3-39           matrixStats_0.14.0    plyr_1.8.2            preprocessCore_1.28.0 PSCBS_0.44.0         
[22] R.cache_0.11.0        R.huge_0.9.0          R.rsp_0.20.0          Rcpp_0.11.6           reshape2_1.4.1        splines_3.1.2         stringi_0.4-1        
[29] stringr_1.0.0         tools_3.1.2           zlibbioc_1.12.0  

 

Thanks in advance.

Regards,

Sanjana

 

 

oligo customcdf HTA frma • 5.5k views
ADD COMMENT
4
Entering edit mode
@james-w-macdonald-5106
Last seen 5 hours ago
United States

Benilton added functionality to do this in the last release. Here is a quick primer.

> library(pdInfoBuilder)
> library(ff)
> library(doMC)
> registerDoMC(10) ## set to number of cores you want to use

## get cdf from MBNI

> download.file("http://mbni.org/customcdf/19.0.0/ense.download/hta20_Hs_ENSE_19.0.0.zip","tmp.zip")
trying URL 'http://mbni.org/customcdf/19.0.0/ense.download/hta20_Hs_ENSE_19.0.0.zip'
Content type 'application/zip' length 362105032 bytes (345.3 MB)
==================================================
downloaded 345.3 MB

> unzip("tmp.zip")
> dir()
[1] "hta20_Hs_ENSE.cdf"         "hta20_Hs_ENSE_desc.txt" 
[3] "hta20_Hs_ENSE_mapping.txt" "hta20_Hs_ENSE_probe_tab" 

## We need the cdf file

> z <- cdf2table("hta20_Hs_ENSE.cdf")

> seed <- new("GenericPDInfoPkgSeed", table=z, author = "me", email = "me@mine.org", species = "Homo sapiens", pkgName = "pd.hta20hsense")

> makePdInfoPackage(seed)
================================================================================
Building annotation for Generic Array
================================================================================
Creating package in ./pd.hta20hsense
Inserting 575650 rows into table featureSet1... OK
Inserting 8613698 rows into table mps1pm... OK
Inserting 5257137 rows into table pmfeature... OK
Counting rows in featureSet1
Counting rows in mps1pm
Counting rows in pmfeature
[1] TRUE

## install it

> install.packages("pd.hta20hsense/", repos = NULL)
* installing *source* package  pd.hta20hsense  ...
** R
** inst
** preparing package for lazy loading
Creating a generic function for  nchar  from package  base  in package  S4Vectors
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
Creating a generic function for  nchar  from package  base  in package  S4Vectors
* DONE (pd.hta20hsense)
>

 

EDIT: I should note here that you now have to specify the pdInfoPackage when you use oligo. The pkgname argument of read.celfiles() should be specified as "pd.hta20hsense"

dat <- read.celfiles(filenames = list.celfiles(), pkgname = "pd.hta20hsense")
ADD COMMENT
0
Entering edit mode

Hi James,

I am Prathyusha Bachali, working as a Bioinformatician at Ampel Biosolutions. I am working on Hu Gene 1.1 ST arrays. It requires oligo package to analyze rather affy. I am able to do for Affy CDFs. I am trying to use Brainarray CDF too. I created annotation package for Brain array CDF by following the exact instructions mentioned in above reply. I could successfully build the annotation package. How should I get the feature data for the annotation package I created. I could see that rows have been created to featureSet1, but I am not sure how to extract the featureSet1. I tried getNetAffx to get the feature data but it has thrown me an error that getNetAffx cannot be used for GenericFeatureSet. I am wondering how to get the feature data.

Any help would be much appreciated.

Thanks,

Prat

ADD REPLY
0
Entering edit mode

There is no need to make an annotation package yourselves for the remapped/custom/brainarray "CDF" when using oligo, because the annotations are already available in the remapped PdInfo object.

<<edit: i was not completely correct; as James pointed out below, you still/also need the *.db file, which is also provided by the MBNI group. See his code below. >>

 

Check this thread (and links) for additional info; especially with respect to the function annotateEset() available in the library affycoretools (function is nowadays available in the 'release' version). A: matching probes to genes from pd.porgene.1.1.st array.

ADD REPLY
2
Entering edit mode

There are two problems here. First, you are confusing things; the instructions above are for making a pdInfoPackage, which isn't an annotation package. Instead, it is a package that oligo uses to map probes to probesets so you can summarize your data. Second, you don't need to make these any more, as Manhong Dai is now doing that for you. You can just install the correct pdInfoPackage from MBNI, as well as the annotation package and go from there. As an example, say we wanted to use the Entrez Gene mapped MBNI package. I am on Windows here, so I have to say that the type is 'source'. If you are on linux this isn't necessary, but it will be if you are on MacOS.

> install.packages("http://mbni.org/customcdf/21.0.0/entrezg.download/pd.hugene11st.hs.entrezg_21.0.0.tar.gz", repos = NULL, type = "source")

> install.packages("http://mbni.org/customcdf/21.0.0/entrezg.download/hugene11sthsentrezg.db_21.0.0.tar.gz", repos = NULL, type = "source")

> library(oligo)

> dat <- read.celfiles(list.celfiles(), pkgname = "pd..hugene11st.hs.entrezg")
> eset <- rma(dat)

> library(affycoretools)

> library(hugene11sthsentrezg.db)

> eset <- annotateEset(eset, hugene11sthsentrezg.db)

 

And now you can proceed with your analysis.

ADD REPLY
0
Entering edit mode

Dear James, thanks a lot for this answer!

ADD REPLY
0
Entering edit mode
@matthew-mccall-4459
Last seen 4.9 years ago
United States

I do not believe that oligo platform annotation packages are available from the brainarray group. It appears that you are trying to pass a probe annotation package (hta20hsensgprobe) to a function (read.celfiles) that expects an oligo-style package.

Also, note that the HTA platform isn't currently supported in fRMA, so you would need to build your own frozen parameter vectors.

Best,

Matt

ADD COMMENT

Login before adding your answer.

Traffic: 610 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6