how to do normalization in edgeR
2
0
Entering edit mode
4.0 years ago
adR ▴ 120

Hello, Dears, I have questions and I want your kind help?

I did gene filtering as below in edgeR which is exactly the same with my filtered genes in DESeq2 which I did before and I like that because I had a thought I may get different numbers of genes. Maybe you could comment to me here.

## edgeR
y2 <- DGEList(counts = count, group = factor(Sample_data[,2])) 
keep <- rowSums(y2$counts >= 50) >= 59 
y2 <- y2[keep, , keep.lib.sizes=FALSE] 
nrow(y2) # 10685

## DESeq2
dds <- DESeqDataSetFromMatrix(countData = countMatrix, colData = colData, design = ~gender) 
keep <- rowSums(counts(dds) >= 50) >= 59 
dds <- dds[keep,] 
nrow(dds) # 10685

My question here are two:

  1. how to do normalization in edger? I mean, Is it enough using the function (y2 <- calcNormFactors(y2, method = “TMM”)) or still, I have to convert this to CPM? or Just using CPM is enough without prior use of calcNormFactor ()?

  2. How to export significant genes as a CSV file plus how to extract significant and normalized genes for heatmap visualization?

Thank you so much?

rna-seq • 1.3k views
ADD COMMENT
0
Entering edit mode

Hello wolideamare!

It appears that your post has been cross-posted to another site: https://support.bioconductor.org/p/129842/

This is typically not recommended as it runs the risk of annoying people in both communities.

ADD REPLY
0
Entering edit mode

Hi, I am sorry. I will not do it in the future!

ADD REPLY
0
Entering edit mode

To sum this up you have now two users here saying "follow the manual" and the edgeR senior author over at Bio saying "follow the manual", so this should be the way to go ;-)

ADD REPLY
3
Entering edit mode
4.0 years ago
brunobsouzaa ▴ 830

just use calcNormFactor after y2 <- y2[keep, , keep.lib.sizes=FALSE]

y <- calcNormFactors(y)

You can use the top DE genes to save a csv file, something like this:

et <- exactTest(y, pair=c("Group_1", "Group_2"))
topet <- topTags(et, n=Inf, adjust.method="BH", sort.by="PValue", p.value=1)
write.csv(as.data.frame(topet), file="path/to/results_EdgeR.csv")

Hope it helps

ADD COMMENT
2
Entering edit mode
4.0 years ago
  1. Just use calcNormFactors(). CPMs are never used for statistics.
  2. You can write data frames to a text file with write.csv(). There are hundreds of ways to make heatmaps, see the edgeR vignette or google around for examples.
ADD COMMENT

Login before adding your answer.

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