Hello All,
I have performed differential expression analysis of RNAseq data for Colon cancer dataset taken from TCGA. I got a list of differentially expressed genes by using edgeR. I also performed the goseq analysis and got the results for it. Now, I am trying to extract only those genes that are DE from my list of DE list given to goseq after the enrichment analysis.
I used the following code, but I get an error that is posted below:
#Goseq analysis
genes=as.integer(p.adjust(de.cmn$table$PValue[de.cmn$table$logFC!=0],method="BH")<.05)
names(genes)=row.names(de.cmn$table[de.cmn$table$logFC!=0,])
table(genes)
pwf=nullp(genes,"hg19","knownGene")
GO.wall=goseq(pwf,"hg19","knownGene")
enriched=GO.wall$category[p.adjust(GO.wall$over_represented_pvalue, method="BH")<.05]
biocLite("org.Hs.eg.db")
library(org.Hs.eg.db)
biocLite("GO.db")
library(GO.db)
biocLite("annotate")
library(annotate)
sigCats <- GO.wall[which(GO.wall[,2] < 0.05),]
cats <- sigCats$category
terms <- stack(lapply(mget(cats, GO:0005615, ifnotfound=NA), extracellular space))
ERROR: Error: unexpected symbol in "terms <- stack(lapply(mget(cats, GO:0005615, ifnotfound=NA), extracellular space"
Could someone tell me what is the error about. I would really appreciate your help and thanks in advance.
I don't quite follow what you are trying to do. You say that you want to "extract only those genes that are DE from my list of DE" genes, but that doesn't make sense because obviously all the genes in your list of DE genes are DE.
Do you perhaps want to know which of your DE genes belong to a particular GO category?
Are you using Entrez Gene IDs? If not, what type of IDs are you using?
Hello Smyth,
Thanks for the reply. Yes, I am interested in getting only those DE expressed present in that particular category. And, yes I am using Entrez Gene IDs.