Question: GAGE pathway analysis for RNA-seq
1
gravatar for Ming Tang
5.2 years ago by
Ming Tang2.5k
Houston/MD Anderson Cancer Center
Ming Tang2.5k wrote:

Hi biostarers,

I was following the GAGE tutorial for pathway enrichment analysis after DESeq. 1724 differentially expressed genes were used for pathway analysis.

res <- nbinomTest( cds, 'control, 'treat' )

resSig <- res[ res$padj < 0.01 & (res$log2FoldChange >1| res$log2FoldChange < -1), ]

resSig <- na.omit(resSig)

require(gage)
datakegg.gs)
deseq.fc<- resSig$log2FoldChange
names(deseq.fc)<- resSig$id
sum(is.infinite(deseq.fc))  # there are some infinite numbers, if use DESeq2, no such problem.
deseq.fc[deseq.fc>10]=10
deseq.fc[deseq.fc<-10]=-10
exp.fc<- deseq.fc

#kegg.gsets works with 3000 KEGG speicies
data(korg)
head(korg[,1:3], n=20)


#let's get the annotation files for mouse and convert the gene set to gene symbol format
kg.mouse<- kegg.gsets("mouse")
kegg.gs<- kg.mouse$kg.sets[kg.mouse$sigmet.idx]
lapplykegg.gs[1:3],head)

# egSymb is only for human data, so eg2sym and sym2eg functions are only for human data.
#data(egSymb)
#kegg.gs.sym<- lapplykegg.gs, eg2sym)
#lapply(kegg.gs.sym[1:3],head)

# to convert IDs among gene/transcript ID to Entrez GeneID or reverse, use eg2id and id2eg in the pathview package #written by the same person.
library(pathview)
data(bods)
bods

gene.symbol.eg<- id2eg(ids=names(exp.fc), category='SYMBOL', org='Mm') # convert the gene symbol to Entrez Gene ID
headgene.symbol.eg, n=100)
headgene.symbol.eg[,2], n=10)

names(exp.fc)<- gene.symbol.eg[,2]

fc.kegg.p<- gage(exp.fc, gsets= kegg.gs, ref=NULL, samp=NULL)
sel<- fc.kegg.p$greater[,"q.val"] < 0.1 & !is.na(fc.kegg.p$greater[,"q.val"])
table(sel)

sel.l<- fc.kegg.p$less[,"q.val"] < 0.1 & !is.na(fc.kegg.p$greater[,"q.val"])
table(sel.l)

 

> table(sel.l)
sel.l
FALSE 
  202 

but no pathways are significantly changed  table(sel)...anything wrong with my code? Thank you!

rna-seq • 5.2k views
ADD COMMENTlink modified 5.2 years ago by bigmawen310 • written 5.2 years ago by Ming Tang2.5k
1
gravatar for bigmawen
5.2 years ago by
bigmawen310
United States
bigmawen310 wrote:

Briefly, GAGE and other methods (GSEA etc) require all genes included, not a preselect short list.

Question answered here in detail:

http://seqanswers.com/forums/showthread.php?t=34679&page=4#77

ADD COMMENTlink written 5.2 years ago by bigmawen310
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.3.0
Traffic: 1696 users visited in the last hour