convert Gene collection to gene list for camera function
1
0
Entering edit mode
Seymoo • 0
@seymoo-12522
Last seen 12 months ago
Oslo

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 • 1.6k views
ADD COMMENT
3
Entering edit mode
@james-w-macdonald-5106
Last seen 4 hours ago
United States

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 COMMENT
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

Thanks James!

ADD REPLY

Login before adding your answer.

Traffic: 586 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