phyloseq to edgeR
1
0
Entering edit mode
Jitendra ▴ 10
@nabiyogesh-11718
Last seen 12 hours ago
United Kingdom

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 • 1.1k views
ADD COMMENT
0
Entering edit mode
@gordon-smyth
Last seen 7 hours ago
WEHI, Melbourne, Australia

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 COMMENT
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY

Login before adding your answer.

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