load csv file to edgeR
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,
• 1,876 views
•
link
1 answer
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)
• 0 views
•
link
Log in to answer this question.
What have you tried?
`?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 badI think you're reading
?goana.DGELRTrather than?goana. Typemethods(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.