1
0
Entering edit mode
5 weeks ago
Super • 0

Hi, I have a differential gene expression file created by edgeR and i wonder how i can import this csv file back to use goana() in the edgeR package?

Best,

RNAseq edgeR • 342 views
1
Entering edit mode

What have you tried?

0
Entering edit mode

?goana indicates that the function needs an DGELRT or DGEExact object, so that you cannot easily rebuild (if at all) from that table. Start over and be sure to save your critical elements or the entire environment after analysis, e.g. via saveRDS or save.image to always have it accessable if needed. sorry, my bad

2
Entering edit mode

I think you're reading ?goana.DGELRT rather than ?goana. Type methods(goana) to see the methods available. The default method supports an atomic vector of gene IDs.

In general, when I can, I try to write R code that has an entry point using base R objects as well as an object-orientated entry point.

1
Entering edit mode
5 weeks ago
Gordon Smyth ★ 4.8k

I assume that the differential results table is complete and contains all expressed genes rather than just the 12 genes shown in your post. I also assume that there are some significantly DE genes and that FDR < 0.05 is an appropriate DE cutoff.

If you don't want to separate DE genes by direction of change then

library(limma)
Universe <- as.character(Results$ENTREZID) DE <- Universe[ Results$FDR < 0.05 ]
g <- goana(DE, Universe)
topGO(g)


If you do want to separate genes by direction of change (recommended) then

library(limma)
Universe <- as.character(Results$ENTREZID) Up <- Universe[ Results$logFC > 0 & Results$FDR < 0.05 ] Dn <- Universe[ Results$logFC < 0 & Results\$FDR < 0.05 ]
g <- goana(list(Up=Up,Dn=Dn), Universe)
topGO(g)