Question: Up/Down regulated genes list in EdgeR
0
gravatar for ali.hakimzadeh
5 months ago by
ali.hakimzadeh0 wrote:

Hi All,

I am doing differential gene expression analysis on "Edge R". I have to stimulate an article procedure which is

(Differential gene expression was done using edgeR and using a generalized linear model (GLM). DE genes were identified using a log2 fold change, and likelihood ratios (LR) test in edgeR significantly expressed genes had an FDR adjusted P value of < 5%).

So I write the code below in R studio, and now I want to compare my down and upregulated genes with them. I checked a few posts related to my question, but I couldn't get the proper answer to my problem. Is there any way through my codes to get a list of down and upregulated genes that I found?

Thanks in advance

library(edgeR)

group <- factor(c(rep("pro-vaccine",30),rep("pre_vaccine",20)))
x<-read.csv("table_50_ID.csv")
y<-DGEList(counts = x, group=group)
y<-calcNormFactors(y)
design<-model.matrix(object = ~group)
y<-estimateDisp(y,design)
fit<-glmFit(y,design)
lrt<-glmLRT(fit,coef = 2)
topTags(lrt)
FDR <- p.adjust(lrt$table$PValue)
sum(FDR<0.05)
lrt <-glmLRT(fit)
topTags(lrt)
summary(dt<-decideTestsDGE(lrt, p.value = 0.05))

and here is also my results:

Coefficient:  grouppro-vaccine 
      logFC       logCPM        LR        PValue           FDR
57295 -4.101295  1.360712137 1374.4852 7.360032e-301 4.252479e-296
9068  -4.344785  1.067874308 1051.4589 1.172813e-230 3.388140e-226
5677  -4.610764 -0.009603996  958.4642 1.917968e-210 3.693878e-206
33165 -2.939559  1.283327685  953.2145 2.654619e-209 3.834464e-205
4715  -4.641455  0.987098949  744.7318 5.609295e-164 6.481877e-160
24778 -3.296862  0.314347175  703.9992 4.037012e-155 3.887508e-151
38177 -2.903446  0.813450569  681.1693 3.720833e-150 3.071175e-146
25519 -4.101955 -0.452403717  633.1050 1.055625e-139 7.623988e-136
1295  -3.169060  1.382517191  622.5037 2.134096e-137 1.370042e-133
18598 -2.225708  1.284682587  602.2558 5.409457e-133 3.125476e-129

  [,1] 
Down    3312
NotSig 51219
Up      3247
ADD COMMENTlink written 5 months ago by ali.hakimzadeh0
1

Hi ali.hakimzadeh,

I think you can try:

deg <- topTags(lrt, n = Inf, p = 0.05)$table
up <- row.names(deg[deg$logFC > 0,])
down <- row.names(deg[deg$logFC < 0,])
ADD REPLYlink written 5 months ago by SMK1.9k

Thanks for your reply, SMK But it doesn't give me the output! It shows in R studio in Values part. If I want to mention my CSV file constructed from just counts and sample names that the first row belongs to the sample names and the others are counts of genes belong to them. can it be the problem that I couldn't get a table of up and down?

ADD REPLYlink written 5 months ago by ali.hakimzadeh0

Can you show us the first few lines of table_50_ID.csv?

ADD REPLYlink written 5 months ago by SMK1.9k

yes here is the pic of my "CSV" file! Table_50_ID.csv

ADD REPLYlink modified 5 months ago • written 5 months ago by ali.hakimzadeh0

Where's your gene ID?

ADD REPLYlink written 5 months ago by SMK1.9k

I removed the gene names from the first column since it gets me an error while I try to operate read.csv on my file. I can put them back to the file, but as I told you I get an error!

ADD REPLYlink modified 5 months ago • written 5 months ago by ali.hakimzadeh0
1

Is there any way through my codes to get a list of down and upregulated genes that I found?

Then down and up are the row numbers of your down and upregulated genes, no? Or you can just do deg[deg$logFC > 0,] and deg[deg$logFC < 0,].

ADD REPLYlink modified 5 months ago • written 5 months ago by SMK1.9k

yeah exactly I just get the numbers, here is what I get in R studio :

down

ADD REPLYlink modified 5 months ago • written 5 months ago by ali.hakimzadeh0

thank you so much i get what i want and sorry for delay in response ;)

ADD REPLYlink written 5 months ago by ali.hakimzadeh0
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1120 users visited in the last hour