t-SNE for microbiome analysis
1
0
Entering edit mode
3.1 years ago
ymj ▴ 10

Hi

I wondered whether there is a good tutorial on how to make t-SNE plot on microbiome samples. I have a phyloseq object for which I have metadata age and gender. Ideally I want something like this: enter image description here

So different shapes for gender, and in my case (instead of species) the different timepoints as colors.

Thank you !

microbiome t-sne phyloseq • 1.2k views
ADD COMMENT
0
Entering edit mode
3.1 years ago
Mensur Dlakic ★ 28k

t-SNE doesn't care about your labels, and in fact it should not even see them. Labeling comes in post-processing steps after the embedding has been done.

A complete solution:

It boils down to determining tetranucleotide frequencies for all contigs in your metagenome, though you probably want to apply some kind of lower-boundary cutoff. Typically people throw away contigs smaller than 1-2 kb, and sometimes going to 3-5 kB is warranted. CheckM can calculate 4n frequencies, and then you feed those into one of many t-SNE implementations. I suggest openTSNE because it is multithreaded and easy to use.

I have a custom script that will automate what I just described. From a large metagenome it will produce something like the embedding shown below, but unfortunately it is not yet ready for sharing.

enter image description here

ADD COMMENT

Login before adding your answer.

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