Question: convert Gene collection to gene list for camera function
0
gravatar for Seymoo
20 months ago by
Seymoo0
Oslo
Seymoo0 wrote:

I want to use `camera` function in limma. I downloaded xml file from MSigDB and loaded it but I am wondering how can I make it to a compatible list for camera function as it has been mentioned in here that GEneCollection need to be converted to a list.

what I have done is

gsc <- getBroadSets("P:/repos/R/msigdb_v6.1.xml")

camera(eset, design = design, index = gsc[grepl("REACTOME", names(gsc))])

Error in Stat[iset] : invalid subscript type 'S4'

 

This code works when I load the file from http://bioinf.wehi.edu.au

download.file("http://bioinf.wehi.edu.au/software/MSigDB/human_c2_v5p2.rdata",
       "human_c2_v5p2.rdata", mode = "wb")

load("human_c2_v5p2.rdata")
camera(eset, design = design, index = Hs.c2[grepl("REACTOME", names(Hs.c2))])

 

limma gseabase • 400 views
ADD COMMENTlink modified 20 months ago by James W. MacDonald51k • written 20 months ago by Seymoo0
Answer: convert Gene collection to gene list for camera function
2
gravatar for James W. MacDonald
20 months ago by
United States
James W. MacDonald51k wrote:

Using GSEABase seems overkill. Just download the gmt you need from the Broad and parse it yourself. As an example, I downloaded the c2.cp.reactome.v1.1.entrez.gmt file, which is all the Reactome gene sets.

> z <- strsplit(readLines("c2.cp.reactome.v6.1.entrez.gmt"), "\t")
> zz <- lapply(z, function(x) x[3:length(x)])
> names(zz) <- sapply(z, "[", 1)

Then you should be able to feed that as your 'index' argument to camera. Although I don't think there is any profit in doing so, as what I get is identical to what you already have from WEHI:

> table(mapply(function(x,y) all(x %in% y), zz, Hs.c2[names(zz)]))

TRUE
 674
ADD COMMENTlink written 20 months ago by James W. MacDonald51k

That's right, the Reactome Pathways are the same in MSigDb v6 as they were in v5.

ADD REPLYlink written 20 months ago by Gordon Smyth39k

Thanks James!

ADD REPLYlink written 20 months ago by Seymoo0
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 16.09
Traffic: 467 users visited in the last hour