bella-companion 0.0.11__py3-none-any.whl → 0.0.12__py3-none-any.whl

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.

@@ -22,9 +22,6 @@ def _get_migration_rates_init(types: list[str], init_rate: float = 1) -> str:
22
22
 
23
23
 
24
24
  def run_beast():
25
- from dotenv import load_dotenv
26
-
27
- load_dotenv()
28
25
  base_output_dir = Path(os.environ["BELLA_BEAST_OUTPUT_DIR"])
29
26
  output_dir = base_output_dir / "fbd-empirical"
30
27
  os.makedirs(output_dir, exist_ok=True)
@@ -42,18 +39,16 @@ def run_beast():
42
39
  change_times = (
43
40
  pl.read_csv(change_times_file, has_header=False).to_series().to_numpy()
44
41
  )
42
+ time_bins = [0, *change_times]
43
+ T = len(time_bins)
45
44
 
46
45
  types: list[str] = sorted(traits["type"].unique())
47
46
  types.remove("?")
48
47
  N = len(types)
49
48
 
50
- time_predictor = " ".join(list(map(str, np.repeat([0, *change_times], N))))
51
- log10BM_predictor = " ".join(
52
- [t.split("_")[0] for t in types] * (len(change_times) + 1)
53
- )
54
- midlat_predictor = " ".join(
55
- [t.split("_")[1] for t in types] * (len(change_times) + 1)
56
- )
49
+ time_predictor = " ".join(list(map(str, np.repeat(time_bins, N))))
50
+ log10BM_predictor = " ".join([t.split("_")[0] for t in types] * T)
51
+ midlat_predictor = " ".join([t.split("_")[1] for t in types] * T)
57
52
 
58
53
  job_ids = {}
59
54
  for i, tree in enumerate(tqdm(trees)):
@@ -66,19 +61,19 @@ def run_beast():
66
61
  f"-D birthRateUpper=5",
67
62
  f"-D deathRateUpper=5",
68
63
  f"-D samplingRateUpper=5",
69
- f'-D samplingRateInit="{" ".join(["2.5"] * N)}"',
64
+ f'-D samplingRateInit="{" ".join(["2.5"] * T)}"',
70
65
  f"-D migrationRateUpper=5",
71
66
  f'-D migrationRateInit="{_get_migration_rates_init(types, 2.5)}"',
72
67
  f'-D nodes="16 8"',
73
68
  f'-D layersRange="0,1,2"',
74
- f"-D tree_file={tree_file}",
69
+ f"-D treeFile={tree_file}",
75
70
  f"-D treeIndex={i}",
76
71
  f"-D changeTimesFile={change_times_file}",
77
72
  f"-D traitsFile={traits_file}",
78
73
  f"-D processLength={process_length}",
79
74
  f'-D timePredictor="{time_predictor}"',
80
- f'-D log10BM_predictor="{log10BM_predictor}"',
81
- f'-D midlat_predictor="{midlat_predictor}"',
75
+ f'-D log10BMPredictor="{log10BM_predictor}"',
76
+ f'-D midlatPredictor="{midlat_predictor}"',
82
77
  f"-prefix {output_dir}{os.sep}",
83
78
  str(Path(os.environ["BELLA_BEAST_CONFIGS_DIR"]) / "fbd-empirical.xml"),
84
79
  ]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: bella-companion
3
- Version: 0.0.11
3
+ Version: 0.0.12
4
4
  Summary:
5
5
  Author: gabriele-marino
6
6
  Author-email: gabmarino.8601@gmail.com
@@ -5,7 +5,7 @@ bella_companion/fbd_empirical/data/change_times.csv,sha256=tedobHbaY7-6M3V6F6HSq
5
5
  bella_companion/fbd_empirical/data/traits.csv,sha256=cxNKYmgtBCKHsm9qnOpS29Rkx9cQKe0oxpgaXSIukJg,5422
6
6
  bella_companion/fbd_empirical/data/trees.nwk,sha256=JAsdfGhTIzGmJz6g6-0s5SVfqNuxawOMc9gbt0srue4,539385
7
7
  bella_companion/fbd_empirical/results.py,sha256=0FENY5EpgNQ6rwPsEiOT2ZEO5oBbIAK6TzPvk11SDnk,3116
8
- bella_companion/fbd_empirical/run_beast.py,sha256=Vvh0xognC92tAI7GhUyzU901N1x6t8UjUDccvB2JcVA,3309
8
+ bella_companion/fbd_empirical/run_beast.py,sha256=MPW4A10NiXc8y3JS3ZN17DL-Oh8IoIdTv1Y5QLLrcxo,3229
9
9
  bella_companion/fbd_empirical/summarize_logs.py,sha256=OoT43DMjim9o4qsjYCgGKnBKp3dHXzVP6sVtzqR8lMQ,955
10
10
  bella_companion/simulations/__init__.py,sha256=ShYRdp1iSjnS_SzcsH-8jbqXz6P1nyRQZqAtPZJCMVE,454
11
11
  bella_companion/simulations/features.py,sha256=DZOBpJGlQ0UinqUZYbEtoemZ2eQGVLV_i-DfpW31qJI,104
@@ -35,7 +35,7 @@ bella_companion/utils/__init__.py,sha256=UtMwPK9dWf9NAl0ic8CSsgdW7aSm-5J49OqgvD7
35
35
  bella_companion/utils/beast.py,sha256=TBa0cLklX1_tXqoQE4LRYvds7mLg_9fS2-6U6OHENHo,2184
36
36
  bella_companion/utils/explain.py,sha256=uP7HPyn2YiykAI69BQV3RooDpC6qKoCLXfp3Uibp4zk,1475
37
37
  bella_companion/utils/slurm.py,sha256=v5DaG7YHVyK8KRFptgGDC6I8jxEhyJuMVK9N08pZSAI,1812
38
- bella_companion-0.0.11.dist-info/METADATA,sha256=NQPoh1JxQYhkfvNRr_CrdJx1_t46j5o8P6lHlnEy83k,577
39
- bella_companion-0.0.11.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
40
- bella_companion-0.0.11.dist-info/entry_points.txt,sha256=rSeKoAhmjnQqAYFcXBv0gAM2ViJfJe0D8_dD-fWrXeg,50
41
- bella_companion-0.0.11.dist-info/RECORD,,
38
+ bella_companion-0.0.12.dist-info/METADATA,sha256=0XKEli6E-1urNh-LiUEm9nqBm5FR6CWqZHXo4ow4rK4,577
39
+ bella_companion-0.0.12.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
40
+ bella_companion-0.0.12.dist-info/entry_points.txt,sha256=rSeKoAhmjnQqAYFcXBv0gAM2ViJfJe0D8_dD-fWrXeg,50
41
+ bella_companion-0.0.12.dist-info/RECORD,,