Question: convert Gene collection to gene list for camera function
gravatar for Seymoo
28 days ago by
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

       "human_c2_v5p2.rdata", mode = "wb")

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


ADD COMMENTlink modified 28 days ago by James W. MacDonald45k • written 28 days ago by Seymoo0
gravatar for James W. MacDonald
28 days ago by
United States
James W. MacDonald45k 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)]))

ADD COMMENTlink written 28 days ago by James W. MacDonald45k

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

ADD REPLYlink written 27 days ago by Gordon Smyth33k

Thanks James!

ADD REPLYlink written 27 days ago by Seymoo0
Please log in to add an answer.


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