phylocom instructions
Preamble: These instructions are written with Mac OS X in mind. I make no guarantees that every step will work on your computer, nor do I accept any responsibility for anything that might happen to your computer if you do follow these instructions. Obviously, you should thoroughly read the Phylocom manual before attempting these analyses.
1. Start with an Excel* file containing the following columns: Family, Genus, Genus_species, Trait 1, Trait 2, ... Trait n. If trait 1 is binary (as is often the case with my analyses), then convert values to “0”s and “1”s at this point. For the rest of these instructions, I will outline a two trait scenario (1 = binary, 2 = continuous).
* I expect that you would follow similar steps if you instead use NeoOffice or OpenOffice.org.
2. To begin to make the phylogeny in Phylomatic, select Family, Genus, Genus_species columns, copy and paste into Word. Edit --> Replacetabs with “/” character. I often copy and paste that list into TextWrangler, and save it as a “taxa” file, in the current data directory I am working with.
3. Copy and paste the community list into Phylomatic, making sure that there is a hard RET after the last line.
4. Phylogenize!
5. Select all, copy and paste the phylogeny into TextWrangler. As of the current tree, you may need to remove “euphyllophyte” from the end of the tree and a corresponding “(” from the beginning of the tree. Check that line endings are “Unix (LF)”. Save this as your “phylo” file (i.e., with no extension) in your current data directory.
6. Go back to Excel file, select the data in the Genus_species, Trait 1, and Trait 2 columns. Copy and paste into the third row of a new Excel file. In row 1, enter type, 0, and 3 in the first three columns (assuming that Trait 1 is binary and Trait 2 is continuous). In row 2, type name, name of Trait 1 data (e.g., “breedsys”), and name of Trait 2 data (e.g., “seedsize”) in the first three columns.
7. Save file as “traits.txt” using “File” --> “Save As...” --> “Text (Tab delimited)”. Hit OK twice (yes, Excel, I really want to do this!).
8. Open “traits.txt” in TextWrangler. Ensure that there is a hard RET after the last line of data, and that line endings are “Unix (LF)”. Now save this file as your “traits” file in your current data directory using “Save As...” and deleting the “.txt” ending.
9. Copy and paste “phylo” and “traits” files into your Phylocom directory (e.g., “/Applications/Phylocom/phylocom-3.41”). For subsequent runs of Phylocom, I like to first delete the preceding “phylo”, “traits”, and “results.txt” files.
10. Fire up Terminal or iTerm. Get into the directory that houses Phylocom; in my case, I would type “cd /Applications/Phylocom/phylocom-3.41” or simply drag the appropriate folder from Finder into my iTerm window.
11. Type “./phylocom”.
12. Now you're ready for your Phylocom analysis. Type “./phylocom aotf > results.txt” to run a full AOT (Analysis of Traits).
13. Once that is complete, type “open -a Microsoft\ Excel results.txt” to have the “results.txt” file open in Excel (much easier than importing the file into Excel manually).
14. In Excel, save the file as “results.xls” in your current data directory. This will facilitate opening it later in Excel just by clicking on the file name AND will prevent you from writing over the results file sitting in the Phylocom directory.
15. Soak up what the Phylocom analysis has output for you.