Question: phyloseq to edgeR
0
gravatar for nabiyogesh
6 months ago by
nabiyogesh0
nabiyogesh0 wrote:

Hi,

I do have three treatment condition (T1, T2 and T3), could you please suggest how I can improve below code to extract pairwise comparisons in edgeR after importing data from phyloseq object to edgeR.

dge = phyloseq_to_edgeR(kosticB, group="Treatment")
# Perform binary test
et = exactTest(dge)
# Extract values from test results
tt = topTags(et, n=nrow(dge$table), adjust.method="BH", sort.by="PValue")
res = tt@.Data[[1]]
alpha = 0.001
sigtab = res[(res$FDR < alpha), ]

I will be thankful for your time and help.

edger • 130 views
ADD COMMENTlink modified 6 months ago by Gordon Smyth39k • written 6 months ago by nabiyogesh0
Answer: phyloseq to edgeR
0
gravatar for Gordon Smyth
6 months ago by
Gordon Smyth39k
Walter and Eliza Hall Institute of Medical Research, Melbourne, Australia
Gordon Smyth39k wrote:

Just type help(exactTest) and use the pair argument.

exactTest(dge, pair = c(1,2)) compares T2 to T1.

exactTest(dge, pair = c(1,3)) compares T3 to T1.

exactTest(dge, pair = c(2,3)) compares T3 to T2.

ADD COMMENTlink modified 6 months ago • written 6 months ago by Gordon Smyth39k

Thanks a lot Smyth. I just want to add one more thing that these treatment were collected from 9 different locations so to ignore the location effect do I need to change group formula to location + Treatment?

location is also a part of metadata column as like treatment.

and then can I use the the same pair argument?

exactTest(dge, pair = c(1,2)) compares T2 to T1.

exactTest(dge, pair = c(1,3)) compares T3 to T1.

exactTest(dge, pair = c(2,3)) compares T3 to T2.

Thanks Yogesh

ADD REPLYlink written 6 months ago by nabiyogesh0

If you want to adjust for location then use the glm pipeline of edgeR rather than the classic exact tests. See the edgeR User's Guide or: https://bioconductor.org/packages/release/workflows/vignettes/RnaSeqGeneEdgeRQL/inst/doc/edgeRQL.html

ADD REPLYlink written 6 months ago by Gordon Smyth39k
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 16.09
Traffic: 201 users visited in the last hour