load csv file to edgeR
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,

enter image description here

RNAseq edgeR • 337 views
ADD COMMENT
1
Entering edit mode

What have you tried?

ADD REPLY
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

ADD REPLY
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.

ADD REPLY
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)
Results <- read.csv("mycsvfile.csv")
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)
Results <- read.csv("mycsvfile.csv")
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)
ADD COMMENT

Login before adding your answer.

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