Extension: Comparing OTU methods¶
Now that we’ve learned a quick method of building trees, we can use this knowledge to compare our OTUs from different methods.
Data
The input data for this extension is two or more FASTA files comprising OTUs generated by different methods. If you’re following along step-by-step, these would have been produced in the OTU delimitation tutorials. Alternatively, you can use the following files from the sectionD archive as example data:
- Greedy clustering:
otus_greedy_0.97.fasta
- Linkage delimitation:
otus_linkage_13.fasta
- Bayesian clustering:
otus_crop_s.fasta
- Phylogenetic delimitation:
otus_bPTP.fasta
First, let’s create a directory for this little side project, just to be organised
Second, we need to create copies of our OTU files with names added to the headers in order to differentiate OTUs from different methods. For each OTU file, run the following command, replacing method
with a description of the method used to create OTUS, e.g. greedy97
(text or numbers only, no spaces or other characters!):
sed -e "s/\(^>.*$\)/\1method/" input.fasta > newdirectory/output.fasta
Next, concatenate these OTU files into one file - you’ll need to be inside your new directory for this:
cat *.fasta > output.fasta
Exercise
- Run FastTree on this file, using the command from the previous tutorial.
- How do different OTUs match up with the different methods?