Deseq2 and Metacoder on metagenomic count data

210 views
Skip to first unread message

jordan.e...@uhasselt.be

unread,
May 28, 2019, 11:19:51 AM5/28/19
to metacoder
Hi,

I'd like to use the Deseq2 method for testing differential abundance of my 16S metagenomic data and then use Metacoder to visualise the results as a heat tree. I think it should be possible, but I'm not sure how to make it work. Has anyone done something similar? Thanks!

Kind regards,

Jordan


Zachary Foster

unread,
May 31, 2019, 9:10:49 AM5/31/19
to metacoder
Hi Jordan,

Sorry for the delay. I have wanted to do this for a while, but I have not gotten around to it. I will look into it and try to get back to you in the next few days. 


Best,

Zach

Zachary Foster

unread,
Jun 7, 2019, 12:20:22 AM6/7/19
to metacoder-...@googlegroups.com
Hello Jordan,

I looked into this and I think I have a solution. The summary is that DESeq2 uses the same abundance matrix of raw counts that most tools for community analysis do. Each dataset in a taxmap object is just a table with a taxon_id column and can be accessed with `obj$data$my_table`. You can use those tables the same way the example data set is used in the DESeq2 tutorial here:


To plot information using metacoder, you need per-taxon information. There two ways I can think to get that from DESeq2: 1) run DESeq2 on per-taxon counts. 2) run DESeq2 on OTU/ASV counts and summarize the results per taxon (e.g. mean log fold change per taxon). I will try to demonstrate both in the example attached. I did this rather quickly, so keep an eye out for any mistakes I might have made. I will try to make a more official tutorial in the future when I get a chance.

You will need to download the HTML file and open it with a web browser to see it.

Let me know if you have questions.

Best,

Zach
example.html
example.Rmd
Reply all
Reply to author
Forward
0 new messages