topGO allGenes argument
1
0
Entering edit mode
3.6 years ago
Ric ▴ 350

Hi, In this paper they used the following to determine differential expression

> tr <- glmTreat(fit, contrast=B.LvsP, lfc=log2(1.5))
> topTags(tr)
Coefficient:  -1*Leaves.2 1*Leaves.3
          logFC unshrunk.logFC logCPM  PValue     FDR
sp0090975   2.6            2.6    2.8 5.7e-14 2.7e-09
sp0037632  -3.0           -3.0    3.4 1.7e-13 2.7e-09
sp0074153  -3.9           -3.9    3.8 1.8e-13 2.7e-09
sp0008306   3.2            3.2    2.9 1.8e-13 2.7e-09
sp0073530  -4.5           -4.5    3.4 2.3e-12 2.3e-08
sp0025713  -3.9           -3.9    4.4 2.6e-12 2.3e-08
sp0037721   7.8            8.0    2.4 2.7e-12 2.3e-08
sp0083660   2.0            2.0    4.4 3.2e-12 2.3e-08
sp0052245  -2.9           -2.9    4.9 3.9e-12 2.6e-08
sp0071520  -3.3           -3.3    2.7 5.8e-12 3.4e-08

How is it possible to get the gene names (1st column) out of tr and give them as argument to topGO's allGenes?

myGOdata <- new("topGOdata", description="My project", ontology="BP", allGenes=geneList,  annot = annFUN.gene2GO, gene2GO = geneID2GO)

Thank you in advance.

RNA-Seq edger R topgo • 1.4k views
ADD COMMENT
2
Entering edit mode
3.6 years ago
e.rempel ★ 1.0k

Hi

you could use:

rownames(topTags(tr)@.Data[[1]])
ADD COMMENT
0
Entering edit mode

It turns out that allGenes should be a R vector which contains the

  • gene names and
  • p-value

How to convert tr (1st and 5th column) to an vector?

ADD REPLY
1
Entering edit mode
geneList <- tr$PValue

names(geneList) <- tr[,1]

...or names(geneList) <- rownames(tr) if the gene IDs are rownames of tr.

ADD REPLY

Login before adding your answer.

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