Search
Question: convert Gene collection to gene list for camera function
0
gravatar for Seymoo
7 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))])

 

ADD COMMENTlink modified 7 months ago by James W. MacDonald47k • written 7 months ago by Seymoo0
2
gravatar for James W. MacDonald
7 months ago by
United States
James W. MacDonald47k 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 7 months ago by James W. MacDonald47k

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

ADD REPLYlink written 7 months ago by Gordon Smyth35k

Thanks James!

ADD REPLYlink written 7 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 2.2.0
Traffic: 370 users visited in the last hour