README

Data and Analytical Files for Bapst et al. 2016 Theropod Tip-Dating Manuscript

The supplementary data package for this study consists of several sets of files. 

The first two sets are input xml files for our two BEAST2 tip-dating analyses, and Nexus files containing the posterior tree sample, the maximum clade credibility (MCC; i.e. the phylogeny with the highest sampled posterior probability) tree (with a 30% burn-in) and the half-compatibility ('majority-rule') summary tree (with a 30% burn-in).

	B2noSA_inputFile.xml
	B2noSA_majrule_burn03.nex
	B2noSA_mcc_burn03.nex
	B2noSA_treelog.nex

	B2SA_inputFile.xml
	B2SA_majrule_burn03.nex
	B2SA_mcc_burn03.nex
	B2SA_treelog.nex

Summarizing BEAST2 tree samples as half-compatibility ('majority-rule') summary trees with posterior support values is not straightforward with typical software, so we wrote an R script to do this.
	
	makeBEAST2_majRule_02-05-16.R

The next set contains nexus files associated with the MrBayes tip-dating analysis, including the input script, a nexus file containing 100 trees randomly sampled from the posterior (post 30% burn-in), and the MCC and half-compatibility ('majority-rule') summary trees (both with 30% burn-in) in nexus format.

	MrBayesSA_100treeSample_burn03.nex
	MrBayesSA_input_script.nex
	MrBayesSA_majrule_burn03.nex
	MrBayesSA_mcc_burn03.nex

For comparing to tip-dating analyses, we conducted maximum-parsimony analyses using TNT and obtained 540 most-parsimonious topologies. These are provided in a Newick string format file, which can be read with function read.tree in R package ape:

	TNT_most_parsimonious_trees.tre

In doing our analyses, we also needed two topologies published previously by Xu et al. 2011 (a majority-rule tree from a maximum-parsimony analysis, provided in their Figure S6) and Lee and Worthy 2012 (a maximum-likelihood tree found using a RAXML analysis and figured in the main text of their paper) using this character matrix. These topologies don't seem to be available freely online, so we reproduced them from their figures and provide them here in Nexus format:

	theropod_tree_XuEtAll2011_FigS6_02-01-16.nex
	theropod_tree_LeeWorthy2011_RAXML_02-01-16.nex

We also needed a dataset of body mass estimates from theropods for comparative analyses, taken from Benson et al. 2014. The original format provided by Benson et al. was not immediately applicable to our dataset, so we reformatted the data as a plain-text table:

	mass_data_for_PCMs_BensonEtal14_10-27-14.txt

Age data for taxa in this analysis were formatted for use in R analyses as a 'timeList' object, which is an R 'list' object composed of two separate matrices: one indicating the start and end times of geologic intervals, and a second indicating the first and last intervals of taxa (by referencing the first matrix). This is saved as a ASCII text representation that can be read back into R via the function 'dget()'.
	
	timeList_sorted_asIs_theropods_DWB_11-05-14.txt

All post-inference analysis and visualization were done in R, via an Rmarkdown script in RStudio. The script (a .Rmd), the resulting markdown PDF with output and figures, and the saved workspace file are included in our supplemental data materials:
	
	birdtreecomparison_03-07-16.Rmd
	birdtreecomparison_03-07-16.pdf
	birdtree_workspace_03-07-2016.Rdata

Finally, all published figures were created entirely from within R, using the saved workspace from the Rmarkdown script and the following R script:
	
	figures_theropod_06-17-16.R

All analyses were performed with BEAST v2.3.1, MrBayes v3.2.6, TNT v11, and R v3.2.3 with R packages ape v3.4, geiger v2.06, paleotree v2.6, and phangorn v2.02.