deseq2 differential gene expression and fold change
1
0
Entering edit mode
Jitendra ▴ 10
@nabiyogesh-11718
Last seen 10 days ago
United Kingdom

Hi,

I have combined the three metadata cloumn into one and now extracting differential expressed genes using deseq2.

 I need to understand two things; here which one is acting as reference or control Aman_Ash_Root or Aman_farmer.pract._Root?

and how I can filter two fold above and down regulated genes from data? how should I modify below command to get both up and down regulated in single sheet with above two fold?

    up <- subset(res1, foldChange > 0)

SampleInfo$geno_treatment_tissue <- as.factor(paste(SampleInfo$Genotypes, SampleInfo$Treatment,SampleInfo$Tissue, sep="_"))
dds <- DESeqDataSetFromMatrix(countData = count, colData = SampleInfo, design = ~ geno_treatment_tissue)
keep <- rowSums(counts(dds)) >= 10
dds <- dds[keep,]
dds <- DESeq(dds)
resultsNames(dds)


res1 <- (dds, contrast=c("geno_treatment_tissue", "Aman_Ash_Root", "Aman_farmer.pract._Root"),alpha = 0.05)

summary (res1)

out of 29097 with nonzero total read count
adjusted p-value < 0.05
LFC > 0 (up)       : 10, 0.034%
LFC < 0 (down)     : 6, 0.021%
outliers [1]       : 19, 0.065%
low counts [2]     : 0, 0%

Many thanks nabiyogesh

deseq2 • 721 views
ADD COMMENT
0
Entering edit mode
@mikelove
Last seen 2 minutes ago
United States

Check out the vignette, there is an abundance of information there, including information about reference levels and about LFC thresholding.

ADD COMMENT
0
Entering edit mode

Hi Michael,

I had a view on vignette but not able to understand these queries: if I do head(res1); still not getting which one is reference?

> head(res1)
log2 fold change (MLE): geno_treatment_tissue Aman_ash_Root vs Aman_farmer.pract._Root 
Wald test p-value: geno_treatment_tissue Aman_ash_Root vs Aman_farmer.pract._Root 
DataFrame with 6 rows and 6 columns
                      baseMean      log2FoldChange              lfcSE
                     <numeric>           <numeric>          <numeric>
BGIOSGA000001 1006.67217012527 -0.0367741259366299  0.283483851941406
BGIOSGA000002 2456.48442016396   0.192271964335956  0.187651712093249
BGIOSGA000004 259.464253494322   -0.06051941277336  0.351927664354577
BGIOSGA000005 126.940060765981  0.0729248032762424  0.257683919030865
BGIOSGA000006 677.585528684196  -0.100184004221674 0.0991453473630914
BGIOSGA000007 212.488112055932   0.214651988657101  0.139080700083535
                            stat            pvalue      padj
                       <numeric>         <numeric> <numeric>
BGIOSGA000001 -0.129722118860692 0.896786282113985         1
BGIOSGA000002   1.02462142333351 0.305541851989458         1
BGIOSGA000004 -0.171965488659013 0.863464660829214         1
BGIOSGA000005  0.283000986443037 0.777176080830454         1
BGIOSGA000006   -1.0104761028753 0.312267242952508         1
BGIOSGA000007   1.54336287154275 0.122742756885547         1
ADD REPLY
0
Entering edit mode

Thanks for your quick response.

ADD REPLY
0
Entering edit mode

thanks Michael,

I need to do multiple comparison; I understand that I need to set reference level each time as I have three different conditions;

from your vignette: By default, R will choose a reference level for factors based on alphabetical order. Then, if you never tell the DESeq2 functions which level you want to compare against (e.g. which level represents the control group).

should I set reference level like this for above study:

dds$geno_treatment_tissue <- relevel(dds$geno_treatment_tissue, ref = "Aman_farmer.pract._Root")

and how to filter above and below 2 logfold genes?

thanks nabiyogesh

ADD REPLY
0
Entering edit mode

You don't need to relevel each time, that's not what the vignette says.

I'm sorry but a lot of these questions would be handled by just reading the documentation, and I'm pretty busy and don't have time to copy paste the relevant sections here. Literally searching the docs for "threshold" would have gotten you information. Please be more considerate of the time of the developers. I may not answer future questions here if they are directly answered by the documentation.

See also the per-function documentation, e.g. ?results.

ADD REPLY

Login before adding your answer.

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