DOI: 10.5061/dryad.nzs7h4522
title: Data from: Origins and diversification of Myasis across blowflies

description: Parasitism represents a prevalent and successful ecological strategy that
 has evolved independently numerous times across metazoa. Understanding the
 origin and diversification of parasitism is a central question in
 evolutionary biology. This study investigated the evolutionary path
 leading to a specific form of parasitism in blowflies known as myiasis,
 where larvae develop on or within a vertebrate. We modeled
 myiasis-associated traits, including trophic specialization (obligatory
 parasitism, facultative parasitism and saprophagy), larval food substrate
 (necrotic, fresh or both) and developmental temperature (constant,
 variable or both), across the blowfly phylogeny. Our results suggested
 that the ancestral state of blowflies likely encompassed saprophagy or
 facultative parasitism, with larvae developing in corpses or necrotic
 tissues from wounds in either homeothermic or heterothermic hosts.
 Furthermore, our analysis highlights the role of facultative parasitism as
 an intermediate step for obligate parasitism in blowflies, indicating that
 pre-adaptations for a facultative parasitic lifestyle may serve as
 stepping stones for emerging obligate parasitism. These findings shed
 light on the complex evolutionary history of blowfly vertebrate
 parasitism, emphasizing the importance of facultative parasitism as a
 critical transitional stage in this evolutionary process.
description: # Origins and diversification of Myasis across blowflies
 [https://doi.org/10.5061/dryad.nzs7h4522](https://doi.org/10.5061/dryad.nzs7h4522) ## Description of the data and file structure This dataset contains the raw data, phylogenetic tree, and scripts required to replicate analyses in Cardoso and Cunha et al accepted in Ecology and Evolution. We investigated the tempo and mode of vertebrate parasitism (myiasis) evolution across blowflies (Diptera: Calliphoridae) by modeling the rate and direction of change individually for three categorical traits: (i) trophic specialization, (ii) larval food substrate, and (iii) larval developmental temperature. We used BayesTraits v4.0.1 to conduct a discrete multistate trait evolution analysis to estimate ancestral states and transition rates. ### Files and variables Below is a summary of the included files: 1. **Phylogenetic Tree File** * `Complete_tree.tre`: phylogenitic tree generated with comprising 61 calliphorid species and three Sarcophagidae species (*Oxysarcodexia thornax*, *Sarcophaga bullata* and *Peckia ingens*) as outgroups. * `trophic_tree.tre`: phylogenetic tree used in the trophic specialization analysis. * `tissue_tree.tre`: phylogenetic tree used in the larval food substrate analysis. * `temperature_tree.tre`: phylogenetic tree used in the developmental temperature analysis. 2. **Raw Data** * `trophic.txt`: Raw data for trophic specialization analysis. * `tissue.txt`: Raw data for larval food substrate analysis. * `temp.txt`: Raw data for developmental temperature analysis. 3. **Results** * `ml_trophic.Log.txt`: Results of the estimated transitions rates using Maximum Likelihood analysis on BayesTraits for trophic specialization. * `ml_tissue.Log.txt`: Results of the estimated transitions rates using Maximum Likelihood analysis on BayesTraits for larval food substrate. * `ml_temp.Log.txt`: Results of the estimated transitions rates using Maximum Likelihood analysis on BayesTraits for developmental temperature. * `LOG_trophic_gamma.Log.txt` Output 1 from the discrete multistate trait evolution analysis on BayesTraits to estimate ancestral states and transition rates for trophic specialization using reversible-jump Markov Chain Monte Carlo (rjMCMC) approach and a uniform hyperprior to determine the range and shape of the gamma prior distribution. * `LOG_tissue_gamma.Log.txt` Output 1 from the discrete multistate trait evolution analysis on BayesTraits to estimate ancestral states and transition rates for larval food substrate using reversible-jump Markov Chain Monte Carlo (rjMCMC) approach and a uniform hyperprior to determine the range and shape of the gamma prior distribution. * `LOG_temp_gamma.Log.txt` Output 1 from the discrete multistate trait evolution analysis on BayesTraits to estimate ancestral states and transition rates for developmental temperature using reversible-jump Markov Chain Monte Carlo (rjMCMC) approach and a uniform hyperprior to determine the range and shape of the gamma prior distribution. * `LOG_trophic_gamma.Schedule.txt` Output 2 from the discrete multistate trait evolution analysis on BayesTraits to estimate ancestral states and transition rates for trophic specialization using reversible-jump Markov Chain Monte Carlo (rjMCMC) approach and a uniform hyperprior to determine the range and shape of the gamma prior distribution. * `LOG_tissue_gamma.Schedule.txt` Output 2 from the discrete multistate trait evolution analysis on BayesTraits to estimate ancestral states and transition rates for larval food substrate using reversible-jump Markov Chain Monte Carlo (rjMCMC) approach and a uniform hyperprior to determine the range and shape of the gamma prior distribution. * `LOG_temp_gamma.Schedule.txt` Output 2 from the discrete multistate trait evolution analysis on BayesTraits to estimate ancestral states and transition rates for developmental temperature using reversible-jump Markov Chain Monte Carlo (rjMCMC) approach and a uniform hyperprior to determine the range and shape of the gamma prior distribution. ## Code/software 1. **Programs needed** * R version 4.3.3 * R Core Team. R: A Language and Environment for Statistical Computing [Internet]. Vienna, Austria: R Foundation for Statistical Computing; 2024. Disponível em: [https://www.R-project.org/](https://www.R-project.org/) * BayesTraits v4.0.1 * Pagel M, Meade A. Bayesian Analysis of Correlated Evolution of Discrete Characters by Reversible‐Jump Markov Chain Monte Carlo. Am Nat. 2006 Jun;167(6):808–25. 2. **Analysis Scripts** * `Origin_divers_myiasis_blowflies.Rmd`: R script in Markdown used for statistical analyses and visualizations. * `control_trophic.txt`: Script for BayesTraits analysis on larval food substrate. * `control_tissue.txt`: Script for BayesTraits analysis on larval food substrate. * `control_temp.txt`: Script for BayesTraits analysis on developmental temperature. 3. **Loaded packages for R scripts** * phytools * Revell LJ. phytools: an R package for phylogenetic comparative biology (and other things). Methods in Ecology and Evolution. 2012;3(2):217–23. * ape * Paradis E, Claude J, Strimmer K. APE: Analyses of Phylogenetics and Evolution in R language. Bioinformatics. 2004;20(2):289–90. * Paradis E, Schliep K. ape 5.0: an environment for modern phylogenetics and evolutionary analyses in R. Bioinformatics. 2019;35(3):526–8. * tidyr * Wickham H, Vaughan D, Girlich M. tidyr: Tidy Messy Data [Internet]. 2024. Available at: [https://tidyr.tidyverse.org](https://tidyr.tidyverse.org) * dplyr * Wickham H, François R, Henry L, Müller K, Vaughan D. dplyr: A Grammar of Data Manipulation [Internet]. 2023. Available at: [https://dplyr.tidyverse.org](https://dplyr.tidyverse.org) * readr * Wickham H, Hester J, Bryan J. readr: Read Rectangular Text Data [Internet]. 2024. Available at: [https://readr.tidyverse.org](https://readr.tidyverse.org) * ggtree * Yu G, Lam TTY, Zhu H, Guan Y. Two Methods for Mapping and Visualizing Associated Data on Phylogeny Using Ggtree. Molecular Biology and Evolution. 1o de dezembro de 2018;35(12):3041–3. * Yu G, Smith DK, Zhu H, Guan Y, Lam TTY. ggtree: an r package for visualization and annotation of phylogenetic trees with their covariates and other associated data. Methods in Ecology and Evolution. 2017;8(1):28–36. * tibble * Müller K, Wickham H. tibble: Simple Data Frames [Internet]. 2024. Available at: [https://tibble.tidyverse.org/](https://tibble.tidyverse.org/)