DOI: 10.5061/dryad.n2z34tn16
title: Experimental and theoretical support for costs of plasticity and phenotype in a nematode cannibalistic trait

description: Developmental plasticity is the ability of a genotype to express multiple
 phenotypes under different environmental conditions and has been shown to
 facilitate the evolution of novel traits. However, while the associated
 cost of plasticity, i.e., the loss in fitness due to the ability to
 express plasticity in response to environmental change, and the cost of
 phenotype, i.e., the loss of fitness due to expressing a fixed phenotype
 across environments, have been theoretically predicted, empirically such
 costs remain poorly documented and little understood. Here, we use a
 plasticity model system, hermaphroditic nematode Pristionchus pacificus,
 to experimentally measure these costs in wild isolates under controlled
 laboratory conditions. P. pacificus can develop either a bacterial feeding
 or predatory mouth morph in response to different external stimuli, with
 natural variation of mouth-morph ratios between strains. We first
 demonstrated the cost of phenotype by analyzing fecundity and
 developmental speed in relation to mouth morphs across the P. pacificus
 phylogenetic tree. Then, we exposed P. pacificus strains to two distinct
 microbial diets that induce strain-specific mouth-form ratios. Our results
 indicate that the plastic strain does shoulder a cost of plasticity, i.e.,
 the diet-induced predatory mouth morph is associated with reduced
 fecundity and slower developmental speed. In contrast, the non-plastic
 strain suffers from the cost of phenotype since its phenotype does not
 change to match the unfavorable bacterial diet but shows increased fitness
 and higher developmental speed on the favorable diet. Furthermore, using a
 stage-structured population model based on empirically derived life
 history parameters, we show how population structure can alleviate the
 cost of plasticity in P. pacificus. The results of the model illustrate
 the extent to which the costs associated with plasticity and its effect on
 competition depend on ecological factors. This study provides support for
 costs of plasticity and phenotype based on empirical and modeling
 approaches.
description: This dataset contains the following scripts: 
 digital_worm.py: The model written in Python 3.10
 main_figs_model.ipynb: The code with instructions to generate
 the main modeling figures. main_figs_exp.ipynb: The
 code with instructions to generate the main experimental figures,
 including the Bayesian statistical analyses associated with these
 figures. raw_data.zip: The raw data required to
 generate main and supp figures.  supp_figs.ipynb: The
 code with instructions to generat the supp figures
 digital_worm_n_dev_dif.py: A verison of the model written in
 Python 3.10 in which the developmental speeds remain unchanged upon
 switching the diet. Used in supp_figs.ipynb.  
 The dataset can be found in raw_data.zip
description: Software required to run the scripts provided in this repository:
 Pyhton 3.10, IPython 8.4, Numpy 1.22.3, Matplotlib 3.5.1, Seaborn 0.11.2,
 Arviz 0.11.2, Pandas 1.4.3, Pymc3 3.11.4
description: # Experimental and theoretical support for costs of plasticity and
 phenotype in a nematode cannibalistic trait [Access this dataset on
 Dryad](10.5061/dryad.n2z34tn16) The software and data associated with
 Dardiry, Piscobulu, Kalirad & Sommer, Experimental and theoretical
 support for costs of plasticity and phenotype in a nematode predatory
 trait, Evolution Letters, Volume 7, Issue 1, 1 February 2023, Pages 48–57.
 This dataset contains the tabulated experimental data, the statistical
 analyses of the experimental data, and the computational model used in the
 manuscript. All the figures found in the manuscript can be generated using
 the code and the data found in this dataset. ## Description of the data
 and file structure The following scripts are included in this repository:
 1. **digital\_worm.py**: The model written in Python 3.10 2.
 **main\_figs\_model.ipynb**: The code with instructions to generate the
 main modeling figures. 3. **main\_figs\_exp.ipynb**: The code with
 instructions to generate the main experimental figures, including the
 Bayesian statistical analyses associated with these figures. 4.
 **supp\_figs.ipynb**: The code with instructions to generate the
 supplementary figures 5. **digital\_worm\_n\_dev\_dif.py**: A version of
 the model written in Python 3.10 in which the developmental speeds remain
 unchanged upon switching the diet. Used in **supp\_figs.ipynb**. The
 scripts above rely on the data found in **raw\_data.zip**. The
 **raw\_data.zip** includes the following datasets: 1. The developmental
 speed of the *Pristionchus pacificus* strains (RSC011,RSA076,RSC017, and
 RS5405) on the standard laboratory diet (*E. coli* OP50), measured as
 percentage of different developmental stages observed after 75 hours
 (raw\_data/fig2/dev\_speed\_OP50\_between\_clades.xlsx). 2. The fecundity
 of multiple *P. pacificus* strains from clade B and clade C on the
 standard laboratory diet (*E. coli* OP50). The fecundity was measured by
 counting the total number eggs laid by an adult worm during 7 days
 (raw\_data/fig2/fecundity\_between\_strains.xlsx). 3. The fecundity of
 multiple *P. pacificus* strains on the standard laboratory diet (*E. coli*
 OP50), where the mouth-form of the mother was assayed as well. The
 fecundity was measured by counting the total number eggs laid by an adult
 worm during 7 days (raw\_data/fig2/fecundity\_within\_strain.xlsx). 4. The
 percentage of adults with the predatory mouth form for multiple *P.
 pacificus* strains from clade B and clade C on the standard laboratory
 diet (*E. coli* OP50) (raw\_data/fig2/mf\_between\_strains.xlsx). 5. The
 percentage of adults with the predatory mouth form for multiple *P.
 pacificus* strains on the standard laboratory diet (*E. coli* OP50),
 including strains that only express the predatory mouth form
 (raw\_data/fig2/mf\_within\_strains.xlsx) 6. The developmental speed of
 the *P. pacificus* strains, RSC017, RS5405, and RSC019, on the standard
 laboratory diet (*E. coli* OP50) and the naturally
 *Pristionchus*-associated *Novosphingobium* sp. L76
 (raw\_data/fig3/dev\_speed\_novo\_op50.xlsx). 7. The fecundity of the *P.
 pacificus* strains, RSC017 and RS5405, on the standard laboratory diet
 (*E. coli* OP50) and the naturally *Pristionchus*-associated
 *Novosphingobium* sp. L76. The fecundity was measured by counting the
 total number eggs laid by an adult worm during 7 days
 (raw\_data/fig3/fecundity\_novo\_op50.xlsx). 8. The number of predatory
 adults of the *P. pacificus* strains, RSC017 and RS5405, on the standard
 laboratory diet (*E. coli* OP50) and the naturally
 *Pristionchus*-associated *Novosphingobium* sp. L76
 (raw\_data/fig3/MF\_on\_novo\_op50.csv). 9. The results of predation assay
 (the number of corpses observed at the end of the assay) for the *P.
 pacificus* strains, RSC017, RS5405, and RSC019, on the standard laboratory
 diet (*E. coli* OP50) (raw\_data/fig4/Ecoli\_killing.csv) 10. The results
 of predation assay (the number of corpses observed at the end of the
 assay) for the \\emph{P. pacifcus} strains, RSC017, RS5405, and RSC019, on
 the naturally *Pristionchus*-associated *Novosphingobium* sp. L76
 (raw\_data/fig4/Novo\_killing.csv) 11. The results of predation assay (the
 number of corpses observed at the end of the assay) and the percentage of
 predatory adults for multiple *P. pacificus* strains
 (raw\_data/Killing\_correlation.xlsx). 12. Summary table of the number of
 predatory adults observed for multiple *P. pacificus* strains on the
 standard laboratory diet (*E. coli* OP50) (raw\_data/MF\_count.csv). ###
 Variables used in the datasets The definitions of the variables used in
 each dataset, in the order described above: 1. **Strain**: the strain
 identifier for *P. pacificus*; **Stage**: the developmental stage of the
 observed worm; **Percentage**: the percentage of worms belonging to a
 specific stage after 75 hours of development; **Clade**: The phylogenetic
 clade of a worm. 2. **Progeny**: The total number of eggs laid by an adult
 worm during a 7-day period; **MF**: mouth-from of the adult worm,
 non-predatory (St) or predatory (Eu). **Clade**: The phylogenetic clade of
 a worm. 3. **Strain**: the strain identifier for *P. pacificus*; **MF**:
 mouth-from of the adult worm, non-predatory (St) or predatory (Eu);
 **Fecundity**: The total number of eggs laid by an adult worm during a
 7-day period. 4. **Strain**: the strain identifier for *P. pacificus*;
 **Count**: the number of predatory (Eu) adults observed out of 100;
 **Clade**: The phylogenetic clade of a worm. 5. **Strain**: the strain
 identifier for *P. pacificus*; **MF**: percentage of the predatory (Eu)
 adults observed. 6. **Strain**: the strain identifier for *P. pacificus*;
 **Stage**: the developmental stage of the observed worm; **Percentage**:
 the percentage of worms belonging to a specific stage after 75 hours of
 development; **Condition**: the bacterial diet on which the worms were
 grown. 7. **Strain**: the strain identifier for *P. pacificus*; **Total
 Progeny Count**: The total number of eggs laid by an adult worm during a
 7-day period; **Culture Condition**: the bacterial diet on which the worms
 were grown. 8. **Strain**: the strain identifier for *P. pacificus*;
 **Culture**: the bacterial diet on which the worms were grown; **Eu**:
 number of the predatory (Eu) adults observed; **Total**: total number of
 worms observed; **Prop**: proportion of Eu adults (Eu/Total). 9.
 **Corpses**: the number of corpses observed at the end of the killing
 assay on *E. coli* OP50. 10. **Corpses**: the number of corpses observed
 at the end of the killing assay on *Novosphingobium* sp. L76. 11.
 **Strain**: the strain identifier for *P. pacificus*; **MF**: proportion
 of Eu adults observed for a given strain; **Corpses**: the number of
 corpses observed at the end of the killing assay on *E. coli* OP50. 12.
 **Strain**: the strain identifier for *P. pacificus*; **Culture**: the
 bacterial diet on which the worms were grown; **Eu**: number of the
 predatory (Eu) adults observed; **Total**: total number of worms observed;
 **Prop**: proportion of Eu adults (Eu/Total). ## Sharing/Access
 information The results published based on this repository can be found in
 the manuscript associated with this repository: * [Evolution Letters,
 Volume 7, Issue 1, 1 February 2023, Pages
 48–57](https://doi.org/10.1093/evlett/qrac001) This dataset can also be
 found in a GitHub repository associated with the manuscript: * [Access the
 GitHub repository](https://github.com/Kalirad/cost_of_plasticity) ##
 Code/Software Software required to run the scripts provided in this
 repository: Python 3.10, IPython 8.4, Numpy 1.22.3, Matplotlib 3.5.1,
 Seaborn 0.11.2, Arviz 0.11.2, Pandas 1.4.3, Pymc3 3.11.4.