bella-companion 0.0.17__tar.gz → 0.0.19__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of bella-companion might be problematic. Click here for more details.

Files changed (112) hide show
  1. {bella_companion-0.0.17 → bella_companion-0.0.19}/PKG-INFO +2 -2
  2. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/cli.py +16 -11
  3. bella_companion-0.0.19/bella_companion/eucovid/__init__.py +3 -0
  4. bella_companion-0.0.19/bella_companion/eucovid/beast_configs/GLM.xml +201 -0
  5. bella_companion-0.0.19/bella_companion/eucovid/beast_configs/MLP.xml +200 -0
  6. bella_companion-0.0.19/bella_companion/eucovid/beast_configs/Nonparametric.xml +214 -0
  7. bella_companion-0.0.19/bella_companion/eucovid/data/case_data.tsv +346 -0
  8. bella_companion-0.0.19/bella_companion/eucovid/data/change_dates.tsv +8 -0
  9. bella_companion-0.0.19/bella_companion/eucovid/data/msa.fasta +79500 -0
  10. bella_companion-0.0.19/bella_companion/eucovid/data/osi.tsv +376 -0
  11. bella_companion-0.0.19/bella_companion/eucovid/data/predictors/all/closedborders_7e_nt.tsv +35 -0
  12. bella_companion-0.0.19/bella_companion/eucovid/data/predictors/all/dist_7e_ls.tsv +35 -0
  13. bella_companion-0.0.19/bella_companion/eucovid/data/predictors/all/flight_7e_ls.tsv +35 -0
  14. bella_companion-0.0.19/bella_companion/eucovid/data/predictors/all/flight_pop_x_7e_ls.tsv +35 -0
  15. bella_companion-0.0.19/bella_companion/eucovid/data/predictors/all/osi_x_7e_ls.tsv +35 -0
  16. bella_companion-0.0.19/bella_companion/eucovid/data/predictors/all/osi_y_7e_ls.tsv +35 -0
  17. bella_companion-0.0.19/bella_companion/eucovid/data/predictors/all/pop_x_7e_ls.tsv +35 -0
  18. bella_companion-0.0.19/bella_companion/eucovid/data/predictors/all/pop_y_7e_ls.tsv +35 -0
  19. bella_companion-0.0.19/bella_companion/eucovid/data/predictors/all/sharedborders_7e_nt.tsv +35 -0
  20. bella_companion-0.0.19/bella_companion/eucovid/data/predictors/changetimes_all_7e.tsv +6 -0
  21. bella_companion-0.0.19/bella_companion/eucovid/data/predictors/changetimes_flights_4e.tsv +3 -0
  22. bella_companion-0.0.19/bella_companion/eucovid/data/predictors/flight_pop_x_4e_ls.tsv +20 -0
  23. bella_companion-0.0.19/bella_companion/eucovid/run_beast.py +111 -0
  24. bella_companion-0.0.19/bella_companion/platyrrhine/__init__.py +5 -0
  25. {bella_companion-0.0.17/bella_companion/fbd_empirical → bella_companion-0.0.19/bella_companion/platyrrhine}/results.py +3 -3
  26. {bella_companion-0.0.17/bella_companion/fbd_empirical → bella_companion-0.0.19/bella_companion/platyrrhine}/run_beast.py +3 -3
  27. {bella_companion-0.0.17/bella_companion/fbd_empirical → bella_companion-0.0.19/bella_companion/platyrrhine}/summarize_logs.py +2 -2
  28. {bella_companion-0.0.17 → bella_companion-0.0.19}/pyproject.toml +2 -2
  29. bella_companion-0.0.17/bella_companion/fbd_empirical/__init__.py +0 -5
  30. bella_companion-0.0.17/bella_companion/fbd_empirical/__pycache__/run_beast.cpython-311.pyc +0 -0
  31. bella_companion-0.0.17/bella_companion/fbd_empirical/__pycache__/run_mlp.cpython-311.pyc +0 -0
  32. bella_companion-0.0.17/bella_companion/fbd_empirical/__pycache__/run_nonparametric.cpython-311.pyc +0 -0
  33. bella_companion-0.0.17/bella_companion/fbd_empirical/__pycache__/summarize_logs.cpython-311.pyc +0 -0
  34. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/__init__.py +0 -0
  35. {bella_companion-0.0.17/bella_companion/fbd_empirical → bella_companion-0.0.19/bella_companion/platyrrhine}/beast_config.xml +0 -0
  36. {bella_companion-0.0.17/bella_companion/fbd_empirical → bella_companion-0.0.19/bella_companion/platyrrhine}/data/change_times.csv +0 -0
  37. {bella_companion-0.0.17/bella_companion/fbd_empirical → bella_companion-0.0.19/bella_companion/platyrrhine}/data/traits.csv +0 -0
  38. {bella_companion-0.0.17/bella_companion/fbd_empirical → bella_companion-0.0.19/bella_companion/platyrrhine}/data/trees.nwk +0 -0
  39. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/__init__.py +0 -0
  40. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/__pycache__/__init__.cpython-310.pyc +0 -0
  41. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/__pycache__/__init__.cpython-311.pyc +0 -0
  42. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/__pycache__/features.cpython-310.pyc +0 -0
  43. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/__pycache__/features.cpython-311.pyc +0 -0
  44. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/__pycache__/generate_data.cpython-310.pyc +0 -0
  45. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/__pycache__/generate_data.cpython-311.pyc +0 -0
  46. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/__pycache__/run_beast.cpython-311.pyc +0 -0
  47. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/__pycache__/summarize_logs.cpython-311.pyc +0 -0
  48. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/beast_configs/epi-multitype/GLM.xml +0 -0
  49. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/beast_configs/epi-multitype/MLP.xml +0 -0
  50. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/beast_configs/epi-multitype/Nonparametric.xml +0 -0
  51. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/beast_configs/epi-skyline/GLM.xml +0 -0
  52. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/beast_configs/epi-skyline/MLP.xml +0 -0
  53. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/beast_configs/epi-skyline/Nonparametric.xml +0 -0
  54. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/beast_configs/fbd-2traits/GLM.xml +0 -0
  55. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/beast_configs/fbd-2traits/MLP.xml +0 -0
  56. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/beast_configs/fbd-2traits/Nonparametric.xml +0 -0
  57. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/beast_configs/fbd-no-traits/GLM.xml +0 -0
  58. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/beast_configs/fbd-no-traits/MLP.xml +0 -0
  59. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/beast_configs/fbd-no-traits/Nonparametric.xml +0 -0
  60. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/features.py +0 -0
  61. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/figures/__init__.py +0 -0
  62. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/figures/__pycache__/__init__.cpython-311.pyc +0 -0
  63. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/figures/__pycache__/epi_explainations.cpython-311.pyc +0 -0
  64. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/figures/__pycache__/epi_predictions.cpython-311.pyc +0 -0
  65. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/figures/__pycache__/epi_simulations.cpython-311.pyc +0 -0
  66. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/figures/__pycache__/fbd_explainations.cpython-311.pyc +0 -0
  67. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/figures/__pycache__/fbd_predictions.cpython-311.pyc +0 -0
  68. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/figures/__pycache__/fbd_simulations.cpython-311.pyc +0 -0
  69. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/figures/__pycache__/figure1.cpython-311.pyc +0 -0
  70. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/figures/__pycache__/plot.cpython-311.pyc +0 -0
  71. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/figures/__pycache__/scenarios.cpython-311.pyc +0 -0
  72. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/figures/__pycache__/utils.cpython-311.pyc +0 -0
  73. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/figures/epi_multitype_results.py +0 -0
  74. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/figures/epi_skyline_results.py +0 -0
  75. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/figures/explain/__init__.py +0 -0
  76. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/figures/explain/pdp.py +0 -0
  77. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/figures/explain/shap.py +0 -0
  78. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/figures/fbd_2traits_results.py +0 -0
  79. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/figures/fbd_no_traits_results.py +0 -0
  80. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/figures/scenarios.py +0 -0
  81. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/figures/utils.py +0 -0
  82. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/generate_data.py +0 -0
  83. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/generate_figures.py +0 -0
  84. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/metrics.py +0 -0
  85. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/run_beast.py +0 -0
  86. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/scenarios/__init__.py +0 -0
  87. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/scenarios/__pycache__/__init__.cpython-310.pyc +0 -0
  88. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/scenarios/__pycache__/__init__.cpython-311.pyc +0 -0
  89. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/scenarios/__pycache__/common.cpython-310.pyc +0 -0
  90. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/scenarios/__pycache__/common.cpython-311.pyc +0 -0
  91. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/scenarios/__pycache__/epi_multitype.cpython-310.pyc +0 -0
  92. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/scenarios/__pycache__/epi_multitype.cpython-311.pyc +0 -0
  93. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/scenarios/__pycache__/epi_skyline.cpython-310.pyc +0 -0
  94. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/scenarios/__pycache__/epi_skyline.cpython-311.pyc +0 -0
  95. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/scenarios/__pycache__/fbd_2traits.cpython-310.pyc +0 -0
  96. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/scenarios/__pycache__/fbd_2traits.cpython-311.pyc +0 -0
  97. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/scenarios/__pycache__/fbd_no_traits.cpython-310.pyc +0 -0
  98. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/scenarios/__pycache__/fbd_no_traits.cpython-311.pyc +0 -0
  99. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/scenarios/__pycache__/scenario.cpython-310.pyc +0 -0
  100. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/scenarios/__pycache__/scenario.cpython-311.pyc +0 -0
  101. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/scenarios/__pycache__/utils.cpython-311.pyc +0 -0
  102. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/scenarios/common.py +0 -0
  103. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/scenarios/epi_multitype.py +0 -0
  104. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/scenarios/epi_skyline.py +0 -0
  105. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/scenarios/fbd_2traits.py +0 -0
  106. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/scenarios/fbd_no_traits.py +0 -0
  107. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/scenarios/scenario.py +0 -0
  108. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/simulations/summarize_logs.py +0 -0
  109. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/utils/__init__.py +0 -0
  110. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/utils/beast.py +0 -0
  111. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/utils/explain.py +0 -0
  112. {bella_companion-0.0.17 → bella_companion-0.0.19}/bella_companion/utils/slurm.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: bella-companion
3
- Version: 0.0.17
3
+ Version: 0.0.19
4
4
  Summary:
5
5
  Author: gabriele-marino
6
6
  Author-email: gabmarino.8601@gmail.com
@@ -12,5 +12,5 @@ Classifier: Programming Language :: Python :: 3.12
12
12
  Requires-Dist: arviz (>=0.22.0,<0.23.0)
13
13
  Requires-Dist: bella-lumiere (>=0.0.14,<0.0.15)
14
14
  Requires-Dist: dotenv (>=0.9.9,<0.10.0)
15
- Requires-Dist: phylogenie (>=3.1.1,<4.0.0)
15
+ Requires-Dist: phylogenie (>=3.1.2,<4.0.0)
16
16
  Requires-Dist: seaborn (>=0.13.2,<0.14.0)
@@ -4,9 +4,10 @@ from pathlib import Path
4
4
 
5
5
  from dotenv import load_dotenv
6
6
 
7
- from bella_companion.fbd_empirical import plot_fbd_empirical_results
8
- from bella_companion.fbd_empirical import run_beast as run_fbd_empirical
9
- from bella_companion.fbd_empirical import summarize_logs as summarize_fbd_empirical
7
+ from bella_companion.eucovid import run_beast as run_eucovid_beast
8
+ from bella_companion.platyrrhine import plot_platyrrhine_results
9
+ from bella_companion.platyrrhine import run_beast as run_platyrrhine
10
+ from bella_companion.platyrrhine import summarize_logs as summarize_platyrrhine
10
11
  from bella_companion.simulations import generate_data, generate_figures, print_metrics
11
12
  from bella_companion.simulations import run_beast as run_simulations
12
13
  from bella_companion.simulations import summarize_logs as summarize_simulations
@@ -43,18 +44,22 @@ def main():
43
44
  ).set_defaults(func=generate_figures)
44
45
 
45
46
  subparsers.add_parser(
46
- "fbd-empirical-run", help="Run BEAST2 analyses on empirical FBD datasets."
47
- ).set_defaults(func=run_fbd_empirical)
47
+ "platyrrhine-run", help="Run BEAST2 analyses on empirical platyrrhine datasets."
48
+ ).set_defaults(func=run_platyrrhine)
48
49
 
49
50
  subparsers.add_parser(
50
- "fbd-empirical-summarize",
51
- help="Summarize BEAST2 log outputs for empirical FBD datasets.",
52
- ).set_defaults(func=summarize_fbd_empirical)
51
+ "platyrrhine-summarize",
52
+ help="Summarize BEAST2 log outputs for empirical platyrrhine datasets.",
53
+ ).set_defaults(func=summarize_platyrrhine)
53
54
 
54
55
  subparsers.add_parser(
55
- "fbd-empirical-figures",
56
- help="Generate plots and figures from empirical FBD results.",
57
- ).set_defaults(func=plot_fbd_empirical_results)
56
+ "platyrrhine-figures",
57
+ help="Generate plots and figures from empirical platyrrhine results.",
58
+ ).set_defaults(func=plot_platyrrhine_results)
59
+
60
+ subparsers.add_parser(
61
+ "eucovid-run", help="Run BEAST2 analyses on empirical eucovid datasets."
62
+ ).set_defaults(func=run_eucovid_beast)
58
63
 
59
64
  args = parser.parse_args()
60
65
  args.func()
@@ -0,0 +1,3 @@
1
+ from bella_companion.eucovid.run_beast import run_beast
2
+
3
+ __all__ = ["run_beast"]
@@ -0,0 +1,201 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <beast
3
+ namespace="
4
+ beast.base.inference
5
+ :beast.base.inference.parameter
6
+ :beast.base.evolution.branchratemodel
7
+ :beast.base.evolution.substitutionmodel
8
+ :beast.base.evolution.sitemodel
9
+ :beast.base.evolution.tree.coalescent
10
+ :beast.base.evolution.tree
11
+ :beast.base.evolution.likelihood
12
+ :beast.base.evolution.alignment
13
+ :beast.base.evolution.operator
14
+ :beast.base.evolution.operator.kernel
15
+ :beast.base.inference.operator.kernel
16
+ :beast.base.inference.operator
17
+ :beast.base.math.distributions
18
+ :beast.base.evolution
19
+ :bdmmprime.util.operators
20
+ :bdmmprime.util.priors
21
+ :bdmmprime.distribution
22
+ :bdmmprime.parameterization
23
+ :bdmmprime.mapping
24
+ :bdmmprime.util
25
+ :bdmmprime.trajectories
26
+ :feast
27
+ :feast.parameter
28
+ :feast.fileio
29
+ :feast.function
30
+ :feast.expressions
31
+ :glmprior.util"
32
+ required="BEAST.base v2.7.7:BDMM-Prime v2.2.2"
33
+ version="2.7"
34
+ >
35
+ <map name="Uniform">beast.base.inference.distribution.Uniform</map>
36
+ <map name="Exponential">beast.base.inference.distribution.Exponential</map>
37
+ <map name="LogNormal">beast.base.inference.distribution.LogNormalDistributionModel</map>
38
+ <map name="Normal">beast.base.inference.distribution.Normal</map>
39
+ <map name="prior">beast.base.inference.distribution.Prior</map>
40
+
41
+ <map name="AlignmentFromFasta">feast.fileio.AlignmentFromFasta</map>
42
+ <map name="TraitSetFromTaxonSet">feast.fileio.TraitSetFromTaxonSet</map>
43
+ <map name="TypeSet">bdmmprime.parameterization.TypeSet</map>
44
+
45
+ <alignment id="alignment" spec="AlignmentFromFasta" fileName="$(msa_file)"/>
46
+ <TaxonSet id="TaxonSet" spec="TaxonSet" alignment="@alignment"/>
47
+ <TraitSetFromTaxonSet id="typeTraitSet" traitname="type" delimiter="|" takeGroup="1" taxa="@TaxonSet"/>
48
+ <TraitSetFromTaxonSet id="dateTraitSet" traitname="date" dateFormat="yyyy-M-dd" delimiter= "|" everythingAfterLast="true" taxa="@TaxonSet"/>
49
+ <typeSet id="typeSet" spec="TypeSet" typeTraitSet="@typeTraitSet"/>
50
+
51
+ <parameter id="processLength" spec="RealParameter" value="1.0"/>
52
+
53
+ <Re id="ReSP" spec="SkylineVectorParameter" timesAreAges="true" processLength="@processLength" typeSet="@typeSet">
54
+ <skylineValues id="Re" spec="RealParameter" dimension="$(ReDimension)" value="1.0"/>
55
+ <changeTimes spec="RealParameterFromXSV" fileName="$(changeTimesFile)"/>
56
+ </Re>
57
+
58
+ <samplingProportion id="samplingProportionSP" spec="SkylineVectorParameter" timesAreAges="true" processLength="@processLength" typeSet="@typeSet" changeTimes="0.123 0.205">
59
+ <skylineValues id="samplingProportion" spec="RealParameter" value="1.11E-5 1.2E-5 1.3E-5 1.4E-5 1.5E-5 1.1E-5 1.2E-5 1.3E-5 1.4E-5 1.5E-5 0.0 0.0 0.0 0.0 0.0"/>
60
+ </samplingProportion>
61
+
62
+ <becomeUninfectiousRate id="becomeUninfectiousRateSP" spec="SkylineVectorParameter" typeSet="@typeSet" skylineValues="36.5"/>
63
+
64
+ <migrationRate id="migrationRateSP" spec="SkylineMatrixParameter" timesAreAges="true" processLength="@processLength" typeSet="@typeSet">
65
+ <skylineValues spec="glmprior.util.GLMLogLinear" transform="false">
66
+ <plate var="predictorFile" range="$(predictorFiles)">
67
+ <predictor spec="RealParameterFromXSV" fileName="$(predictorFile)"/>
68
+ </plate>
69
+ <coefficients id="coefficientsGLM" spec="RealParameter" value="0.1"/>
70
+ <scaleFactor id="scaleFactorGLM" spec="RealParameter" value="1"/>
71
+ <indicators spec="BooleanParameter" value="1"/>
72
+ </skylineValues>
73
+ <changeTimes spec="RealParameterFromXSV" fileName="$(changeTimesFile)"/>
74
+ </migrationRate>
75
+
76
+ <removalProb id="removalProbSP" spec="SkylineVectorParameter" skylineValues="1.0" processLength="@processLength" typeSet="@typeSet"/>
77
+
78
+ <startTypePriorProbs id="typeFrequencies" spec="RealParameter" value="1.0 0.0 0.0 0.0 0.0"/>
79
+
80
+ <siteModel id="siteModel" spec="SiteModel" gammaCategoryCount="4" proportionInvariant="0.0">
81
+ <parameter id="gammaShape" name="shape" value="1.0"/>
82
+ <substModel spec="HKY">
83
+ <kappa id="kappa" spec="RealParameter" value="2.0"/>
84
+ <frequencies spec="Frequencies" data="@alignment"/>
85
+ </substModel>
86
+ </siteModel>
87
+
88
+ <branchRateModel id="branchRateModel" spec="StrictClockModel" clock.rate="8.0E-4"/>
89
+
90
+ <popFunc id="popFunc" spec="ConstantPopulation" popSize="0.1"/>
91
+
92
+ <run spec="MCMC" chainLength="10000000" numInitializationAttempts="100">
93
+
94
+ <state spec="State" storeEvery="5000">
95
+ <stateNode id="treeBDMMPrime" spec="RandomTree" taxa="@alignment" populationModel="@popFunc" trait="@dateTraitSet"/>
96
+ <stateNode idref="processLength"/>
97
+ <stateNode idref="Re"/>
98
+ <stateNode idref="samplingProportion"/>
99
+ <stateNode idref="coefficientsGLM"/>
100
+ <stateNode idref="scaleFactorGLM"/>
101
+ <stateNode idref="kappa"/>
102
+ <stateNode idref="gammaShape"/>
103
+ </state>
104
+
105
+ <distribution id="posterior" spec="CompoundDistribution">
106
+ <distribution id="likelihood" spec="CompoundDistribution" useThreads="true">
107
+ <distribution id="treeLikelihood" spec="ThreadedTreeLikelihood" data="@alignment" tree="@treeBDMMPrime" siteModel="@siteModel" branchRateModel="@branchRateModel"/>
108
+ </distribution>
109
+
110
+ <distribution id="prior" spec="CompoundDistribution">
111
+ <distribution id="BDMMPrime" spec="BirthDeathMigrationDistribution" tree="@treeBDMMPrime" conditionOnSurvival="true" finalSampleOffset="0.0" typeTraitSet="@typeTraitSet" startTypePriorProbs="@typeFrequencies">
112
+ <parameterization id="EpiBDMMPrimeParameterization" spec="EpiParameterization" processLength="@processLength" Re="@ReSP" samplingProportion="@samplingProportionSP" becomeUninfectiousRate="@becomeUninfectiousRateSP" migrationRate="@migrationRateSP" removalProb="@removalProbSP" typeSet="@typeSet"/>
113
+ </distribution>
114
+
115
+ <prior name="distribution" x="@processLength">
116
+ <LogNormal name="distr" M="-1.0" S="0.2"/>
117
+ </prior>
118
+ <distribution spec="SmartZeroExcludingPrior" x="@Re">
119
+ <LogNormal name="distr" M="0.8" S="0.5"/>
120
+ </distribution>
121
+ <distribution spec="SmartZeroExcludingPrior" x="@samplingProportion" classesToExclude="1.2E-5 1.3E-5 1.4E-5 1.5E-5">
122
+ <Uniform name="distr" lower="0" upper="0.15"/>
123
+ </distribution>
124
+ <distribution spec="SmartZeroExcludingPrior" x="@samplingProportion" classesToExclude="1.1E-5 1.3E-5 1.4E-5 1.5E-5">
125
+ <Uniform name="distr" lower="0" upper="0.093"/>
126
+ </distribution>
127
+ <distribution spec="SmartZeroExcludingPrior" x="@samplingProportion" classesToExclude="1.1E-5 1.2E-5 1.4E-5 1.5E-5">
128
+ <Uniform name="distr" lower="0" upper="0.10"/>
129
+ </distribution>
130
+ <distribution spec="SmartZeroExcludingPrior" x="@samplingProportion" classesToExclude="1.1E-5 1.2E-5 1.3E-5 1.5E-5">
131
+ <Uniform name="distr" lower="0" upper="0.005"/>
132
+ </distribution>
133
+ <distribution spec="SmartZeroExcludingPrior" x="@samplingProportion" classesToExclude="1.1E-5 1.2E-5 1.3E-5 1.4E-5">
134
+ <Uniform name="distr" lower="0" upper="0.057"/>
135
+ </distribution>
136
+ <prior name="distribution" x="@coefficientsGLM">
137
+ <Normal name="distr" mean="0.0" sigma="1.0"/>
138
+ </prior>
139
+ <prior name="distribution" x="@scaleFactorGLM">
140
+ <LogNormal name="distr" M="0.0" S="0.8"/>
141
+ </prior>
142
+ <prior name="distribution" x="@gammaShape">
143
+ <Exponential name="distr" mean="0.5"/>
144
+ </prior>
145
+ <prior name="distribution" x="@kappa">
146
+ <LogNormal name="distr" M="1.0" S="1.25"/>
147
+ </prior>
148
+ </distribution>
149
+ </distribution>
150
+
151
+ <operator spec="BactrianScaleOperator" tree="@treeBDMMPrime" rootOnly="true" scaleFactor="0.25" weight="5.0"/>
152
+ <operator spec="BactrianNodeOperator" tree="@treeBDMMPrime" weight="30.0"/>
153
+ <operator spec="BactrianSubtreeSlide" tree="@treeBDMMPrime" weight="15.0"/>
154
+ <operator spec="Exchange" tree="@treeBDMMPrime" weight="15.0"/>
155
+ <operator spec="Exchange" tree="@treeBDMMPrime" isNarrow="false" weight="3.0"/>
156
+ <operator spec="WilsonBalding" tree="@treeBDMMPrime" weight="3.0"/>
157
+ <operator spec="EpochFlexOperator" tree="@treeBDMMPrime" scaleFactor="0.1" weight="2.0"/>
158
+ <operator spec="EpochFlexOperator" tree="@treeBDMMPrime" fromOldestTipOnly="false" scaleFactor="0.1" weight="2.0"/>
159
+ <operator spec="TreeStretchOperator" tree="@treeBDMMPrime" scaleFactor="0.01" weight="2.0"/>
160
+ <operator spec="BactrianScaleOperator" parameter="@processLength" scaleFactor="0.25" weight="3.0"/>
161
+ <operator spec="BactrianScaleOperator" parameter="@Re" scaleFactor="0.25" weight="10.0"/>
162
+ <operator spec="SmartScaleOperator" parameter="@samplingProportion" weight="3.0"/>
163
+ <operator spec="BactrianRandomWalkOperator" parameter="@coefficientsGLM" weight="5.0" scaleFactor="0.1"/>
164
+ <operator spec="AdaptableVarianceMultivariateNormalOperator" weight="5.0" coefficient="1.0" scaleFactor="0.5" beta="0.05" initial="800" burnin="400" every="1">
165
+ <transformations spec="Transform$NoTransform" f="@coefficientsGLM"/>
166
+ </operator>
167
+ <operator id="scaleFactorGLMScaler" spec="BactrianScaleOperator" parameter="@scaleFactorGLM" scaleFactor="0.25" weight="3.0" />
168
+ <operator spec="BactrianScaleOperator" parameter="@gammaShape" weight="1.0"/>
169
+ <operator spec="BactrianScaleOperator" parameter="@kappa" weight="1.0"/>
170
+ <operatorschedule spec="OperatorSchedule"/>
171
+
172
+ <logger spec="Logger" fileName="MCMC.log" logEvery="1000" model="@posterior" sanitiseHeaders="true" sort="smart">
173
+ <log idref="posterior"/>
174
+ <log idref="likelihood"/>
175
+ <log idref="prior"/>
176
+ <log idref="BDMMPrime"/>
177
+ <log idref="ReSP"/>
178
+ <log idref="samplingProportionSP"/>
179
+ <log idref="migrationRateSP"/>
180
+ <log idref="coefficientsGLM"/>
181
+ <log idref="scaleFactorGLM"/>
182
+ <log spec="TypedTreeStatsLogger" includeRootEdge="true" typeLabel="type" typeSet="@typeSet">
183
+ <typedTree id="typeMappedTree" spec="TypeMappedTree" bdmmDistrib="@BDMMPrime" startTypePriorProbs="@typeFrequencies" mapOnInit="false" remapOnLog="true" typeLabel="type" typeTraitSet="@typeTraitSet" untypedTree="@treeBDMMPrime"/>
184
+ </log>
185
+ </logger>
186
+
187
+ <logger spec="OptionalLogger" enableLogger="true" fileName="TypedTree.trees" logEvery="10000" mode="tree">
188
+ <log idref="typeMappedTree"/>
189
+ </logger>
190
+
191
+ <logger spec="OptionalLogger" enableLogger="true" fileName="TypedNodeTree.trees" logEvery="10000" mode="tree">
192
+ <log spec="TypedNodeTreeLogger" typedTree="@typeMappedTree"/>
193
+ </logger>
194
+
195
+ <logger spec="OptionalLogger" enableLogger="true" fileName="trajectory.traj" logEvery="10000">
196
+ <log spec="SampledTrajectory" bdmmDistrib="@BDMMPrime" startTypePriorProbs="@typeFrequencies" typeMappedTree="@typeMappedTree" useTauLeaping="true"/>
197
+ </logger>
198
+
199
+ </run>
200
+
201
+ </beast>
@@ -0,0 +1,200 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <beast
3
+ namespace="
4
+ beast.base.inference
5
+ :beast.base.inference.parameter
6
+ :beast.base.evolution.branchratemodel
7
+ :beast.base.evolution.substitutionmodel
8
+ :beast.base.evolution.sitemodel
9
+ :beast.base.evolution.tree.coalescent
10
+ :beast.base.evolution.tree
11
+ :beast.base.evolution.likelihood
12
+ :beast.base.evolution.alignment
13
+ :beast.base.evolution.operator
14
+ :beast.base.evolution.operator.kernel
15
+ :beast.base.inference.operator.kernel
16
+ :beast.base.inference.operator
17
+ :beast.base.math.distributions
18
+ :beast.base.evolution
19
+ :bdmmprime.util.operators
20
+ :bdmmprime.util.priors
21
+ :bdmmprime.distribution
22
+ :bdmmprime.parameterization
23
+ :bdmmprime.mapping
24
+ :bdmmprime.util
25
+ :bdmmprime.trajectories
26
+ :feast
27
+ :feast.parameter
28
+ :feast.fileio
29
+ :feast.function
30
+ :feast.expressions"
31
+ required="BEAST.base v2.7.7:BDMM-Prime v2.2.2"
32
+ version="2.7"
33
+ >
34
+ <map name="Uniform">beast.base.inference.distribution.Uniform</map>
35
+ <map name="Exponential">beast.base.inference.distribution.Exponential</map>
36
+ <map name="LogNormal">beast.base.inference.distribution.LogNormalDistributionModel</map>
37
+ <map name="Normal">beast.base.inference.distribution.Normal</map>
38
+ <map name="prior">beast.base.inference.distribution.Prior</map>
39
+
40
+ <map name="AlignmentFromFasta">feast.fileio.AlignmentFromFasta</map>
41
+ <map name="TraitSetFromTaxonSet">feast.fileio.TraitSetFromTaxonSet</map>
42
+ <map name="TypeSet">bdmmprime.parameterization.TypeSet</map>
43
+
44
+ <alignment id="alignment" spec="AlignmentFromFasta" fileName="$(msa_file)"/>
45
+ <TaxonSet id="TaxonSet" spec="TaxonSet" alignment="@alignment"/>
46
+ <TraitSetFromTaxonSet id="typeTraitSet" traitname="type" delimiter="|" takeGroup="1" taxa="@TaxonSet"/>
47
+ <TraitSetFromTaxonSet id="dateTraitSet" traitname="date" dateFormat="yyyy-M-dd" delimiter= "|" everythingAfterLast="true" taxa="@TaxonSet"/>
48
+ <typeSet id="typeSet" spec="TypeSet" typeTraitSet="@typeTraitSet"/>
49
+
50
+ <parameter id="processLength" spec="RealParameter" value="1.0"/>
51
+
52
+ <Re id="ReSP" spec="SkylineVectorParameter" timesAreAges="true" processLength="@processLength" typeSet="@typeSet">
53
+ <skylineValues id="Re" spec="RealParameter" dimension="$(ReDimension)" value="1.0"/>
54
+ <changeTimes spec="RealParameterFromXSV" fileName="$(changeTimesFile)"/>
55
+ </Re>
56
+
57
+ <samplingProportion id="samplingProportionSP" spec="SkylineVectorParameter" timesAreAges="true" processLength="@processLength" typeSet="@typeSet" changeTimes="0.123 0.205">
58
+ <skylineValues id="samplingProportion" spec="RealParameter" value="1.11E-5 1.2E-5 1.3E-5 1.4E-5 1.5E-5 1.1E-5 1.2E-5 1.3E-5 1.4E-5 1.5E-5 0.0 0.0 0.0 0.0 0.0"/>
59
+ </samplingProportion>
60
+
61
+ <becomeUninfectiousRate id="becomeUninfectiousRateSP" spec="SkylineVectorParameter" typeSet="@typeSet" skylineValues="36.5"/>
62
+
63
+ <migrationRate id="migrationRateSP" spec="SkylineMatrixParameter" timesAreAges="true" processLength="@processLength" typeSet="@typeSet">
64
+ <skylineValues id="migrationRate" spec="bella.BayesMLP" nodes="$(nodes)">
65
+ <plate var="predictorFile" range="$(predictorFiles)">
66
+ <predictor spec="RealParameterFromXSV" fileName="$(predictorFile)"/>
67
+ </plate>
68
+ <plate var="n" range="$(layersRange)">
69
+ <weights idref="migrationW$(n)"/>
70
+ </plate>
71
+ </skylineValues>
72
+ <changeTimes spec="RealParameterFromXSV" fileName="$(changeTimes)"/>
73
+ </migrationRate>
74
+
75
+ <removalProb id="removalProbSP" spec="SkylineVectorParameter" skylineValues="1.0" processLength="@processLength" typeSet="@typeSet"/>
76
+
77
+ <startTypePriorProbs id="typeFrequencies" spec="RealParameter" value="1.0 0.0 0.0 0.0 0.0"/>
78
+
79
+ <siteModel id="siteModel" spec="SiteModel" gammaCategoryCount="4" proportionInvariant="0.0">
80
+ <parameter id="gammaShape" name="shape" value="1.0"/>
81
+ <substModel spec="HKY">
82
+ <kappa id="kappa" spec="RealParameter" value="2.0"/>
83
+ <frequencies id="empiricalFreqs" spec="Frequencies" data="@alignment"/>
84
+ </substModel>
85
+ </siteModel>
86
+
87
+ <branchRateModel id="branchRateModel" spec="StrictClockModel" clock.rate="8.0E-4"/>
88
+
89
+ <popFunc id="popFunc" spec="ConstantPopulation" popSize="0.1"/>
90
+
91
+ <run spec="MCMC" chainLength="10000000" numInitializationAttempts="100">
92
+
93
+ <state spec="State" storeEvery="5000">
94
+ <stateNode id="treeBDMMPrime" spec="RandomTree" taxa="@alignment" populationModel="@popFunc" trait="@dateTraitSet"/>
95
+ <stateNode idref="processLength"/>
96
+ <stateNode idref="samplingProportion"/>
97
+ <plate var="n" range="$(layersRange)">
98
+ <stateNode spec="RealParameter" id="migrationW$(n)" value="0"/>
99
+ </plate>
100
+ <stateNode idref="kappa"/>
101
+ <stateNode idref="gammaShape"/>
102
+ </state>
103
+
104
+ <distribution id="posterior" spec="CompoundDistribution">
105
+ <distribution id="likelihood" spec="CompoundDistribution" useThreads="true">
106
+ <distribution id="treeLikelihood" spec="ThreadedTreeLikelihood" data="@alignment" tree="@treeBDMMPrime" siteModel="@siteModel" branchRateModel="@branchRateModel"/>
107
+ </distribution>
108
+
109
+ <distribution id="prior" spec="CompoundDistribution">
110
+ <distribution id="BDMMPrime" spec="BirthDeathMigrationDistribution" tree="@treeBDMMPrime" conditionOnSurvival="true" finalSampleOffset="0.0" typeTraitSet="@typeTraitSet" startTypePriorProbs="@typeFrequencies">
111
+ <parameterization id="EpiBDMMPrimeParameterization" spec="EpiParameterization" processLength="@processLength" Re="@ReSP" samplingProportion="@samplingProportionSP" becomeUninfectiousRate="@becomeUninfectiousRateSP" migrationRate="@migrationRateSP" removalProb="@removalProbSP" typeSet="@typeSet"/>
112
+ </distribution>
113
+
114
+ <prior name="distribution" x="@processLength">
115
+ <LogNormal name="distr" M="-1.0" S="0.2"/>
116
+ </prior>
117
+ <distribution spec="SmartZeroExcludingPrior" x="@Re">
118
+ <LogNormal name="distr" M="0.8" S="0.5"/>
119
+ </distribution>
120
+ <distribution spec="SmartZeroExcludingPrior" x="@samplingProportion" classesToExclude="1.2E-5 1.3E-5 1.4E-5 1.5E-5">
121
+ <Uniform name="distr" lower="0" upper="0.15"/>
122
+ </distribution>
123
+ <distribution spec="SmartZeroExcludingPrior" x="@samplingProportion" classesToExclude="1.1E-5 1.3E-5 1.4E-5 1.5E-5">
124
+ <Uniform name="distr" lower="0" upper="0.093"/>
125
+ </distribution>
126
+ <distribution spec="SmartZeroExcludingPrior" x="@samplingProportion" classesToExclude="1.1E-5 1.2E-5 1.4E-5 1.5E-5">
127
+ <Uniform name="distr" lower="0" upper="0.10"/>
128
+ </distribution>
129
+ <distribution spec="SmartZeroExcludingPrior" x="@samplingProportion" classesToExclude="1.1E-5 1.2E-5 1.3E-5 1.5E-5">
130
+ <Uniform name="distr" lower="0" upper="0.005"/>
131
+ </distribution>
132
+ <distribution spec="SmartZeroExcludingPrior" x="@samplingProportion" classesToExclude="1.1E-5 1.2E-5 1.3E-5 1.4E-5">
133
+ <Uniform name="distr" lower="0" upper="0.057"/>
134
+ </distribution>
135
+ <plate var="n" range="$(layersRange)">
136
+ <prior name="distribution" x="@migrationW$(n)">
137
+ <Normal name="distr" mean="0.0" sigma="1.0"/>
138
+ </prior>
139
+ </plate>
140
+ <prior name="distribution" x="@gammaShape">
141
+ <Exponential name="distr" mean="0.5"/>
142
+ </prior>
143
+ <prior name="distribution" x="@kappa">
144
+ <LogNormal name="distr" M="1.0" S="1.25"/>
145
+ </prior>
146
+ </distribution>
147
+ </distribution>
148
+
149
+ <operator spec="BactrianScaleOperator" tree="@treeBDMMPrime" rootOnly="true" scaleFactor="0.25" weight="5.0"/>
150
+ <operator spec="BactrianNodeOperator" tree="@treeBDMMPrime" weight="30.0"/>
151
+ <operator spec="BactrianSubtreeSlide" tree="@treeBDMMPrime" weight="15.0"/>
152
+ <operator spec="Exchange" tree="@treeBDMMPrime" weight="15.0"/>
153
+ <operator spec="Exchange" tree="@treeBDMMPrime" isNarrow="false" weight="3.0"/>
154
+ <operator spec="WilsonBalding" tree="@treeBDMMPrime" weight="3.0"/>
155
+ <operator spec="EpochFlexOperator" tree="@treeBDMMPrime" scaleFactor="0.1" weight="2.0"/>
156
+ <operator spec="EpochFlexOperator" tree="@treeBDMMPrime" fromOldestTipOnly="false" scaleFactor="0.1" weight="2.0"/>
157
+ <operator spec="TreeStretchOperator" tree="@treeBDMMPrime" scaleFactor="0.01" weight="2.0"/>
158
+ <operator spec="BactrianScaleOperator" parameter="@processLength" scaleFactor="0.25" weight="3.0" />
159
+ <operator spec="BactrianScaleOperator" parameter="@Re" scaleFactor="0.25" weight="10.0"/>
160
+ <operator spec="SmartScaleOperator" parameter="@samplingProportion" weight="3.0" />
161
+ <plate var="n" range="$(layersRange)">
162
+ <operator spec="BactrianRandomWalkOperator" parameter="@migrationW$(n)" weight="5.0"/>
163
+ </plate>
164
+ <operator id="gammaShapeScaler" spec="BactrianScaleOperator" parameter="@gammaShape" weight="1.0"/>
165
+ <operator id="KappaScaler" spec="BactrianScaleOperator" parameter="@kappa" weight="1.0"/>
166
+ <operatorschedule spec="OperatorSchedule"/>
167
+
168
+ <logger spec="Logger" fileName="MCMC.log" logEvery="1000" model="@posterior" sanitiseHeaders="true" sort="smart">
169
+ <log idref="posterior"/>
170
+ <log idref="likelihood"/>
171
+ <log idref="prior"/>
172
+ <log idref="BDMMPrime"/>
173
+ <log idref="ReSP"/>
174
+ <log idref="samplingProportionSP"/>
175
+ <log idref="migrationRateSP"/>
176
+ <log idref="migrationRate"/>
177
+ <plate var="n" range="$(layersRange)">
178
+ <log idref="migrationW$(n)"/>
179
+ </plate>
180
+
181
+ <log spec="TypedTreeStatsLogger" includeRootEdge="true" typeLabel="type" typeSet="@typeSet">
182
+ <typedTree id="typeMappedTree" spec="TypeMappedTree" bdmmDistrib="@BDMMPrime" startTypePriorProbs="@typeFrequencies" mapOnInit="false" remapOnLog="true" typeLabel="type" typeTraitSet="@typeTraitSet" untypedTree="@treeBDMMPrime"/>
183
+ </log>
184
+ </logger>
185
+
186
+ <logger spec="OptionalLogger" enableLogger="true" fileName="TypedTree.trees" logEvery="10000" mode="tree">
187
+ <log idref="typeMappedTree"/>
188
+ </logger>
189
+
190
+ <logger spec="OptionalLogger" enableLogger="true" fileName="TypedNodeTree.trees" logEvery="10000" mode="tree">
191
+ <log spec="TypedNodeTreeLogger" typedTree="@typeMappedTree"/>
192
+ </logger>
193
+
194
+ <logger spec="OptionalLogger" enableLogger="true" fileName="trajectory.traj" logEvery="10000">
195
+ <log spec="SampledTrajectory" bdmmDistrib="@BDMMPrime" startTypePriorProbs="@typeFrequencies" typeMappedTree="@typeMappedTree" useTauLeaping="true"/>
196
+ </logger>
197
+
198
+ </run>
199
+
200
+ </beast>