bella-companion 0.0.35__py3-none-any.whl → 0.0.37__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.

@@ -1,8 +1,12 @@
1
1
  import os
2
+ import shutil
3
+ from glob import glob
2
4
  from pathlib import Path
3
5
 
4
6
  import joblib
5
7
  import polars as pl
8
+ from phylogenie import Tree, load_nexus
9
+ from tqdm import tqdm
6
10
 
7
11
  from bella_companion.utils import read_weights_dir, summarize_logs_dir
8
12
 
@@ -28,3 +32,10 @@ def summarize_logs():
28
32
  os.makedirs(summaries_dir, exist_ok=True)
29
33
  summaries.write_csv(summaries_dir / "MLP.csv")
30
34
  joblib.dump(weights, summaries_dir / "MLP.weights.pkl")
35
+
36
+ trees: list[Tree] = []
37
+ for tree_file in tqdm(glob(str(logs_dir / "*.trees")), "Summarizing trees"):
38
+ trees.extend(list(load_nexus(tree_file).values())[:-10])
39
+ joblib.dump(trees, summaries_dir / "trees.pkl")
40
+
41
+ shutil.copy(logs_dir / "0.trees", summaries_dir / "0.trees")
@@ -89,9 +89,9 @@ SCENARIO = Scenario(
89
89
  features={
90
90
  f"{rate}Rate": {
91
91
  "timePredictor": Feature(is_binary=False, is_relevant=True),
92
+ "randomPredictor": Feature(is_binary=False, is_relevant=False),
92
93
  "trait1Predictor": Feature(is_binary=True, is_relevant=True),
93
94
  "trait2Predictor": Feature(is_binary=True, is_relevant=False),
94
- "randomPredictor": Feature(is_binary=False, is_relevant=False),
95
95
  }
96
96
  for rate in RATES
97
97
  },
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bella-companion
3
- Version: 0.0.35
3
+ Version: 0.0.37
4
4
  Summary: Add your description here
5
5
  Requires-Python: >=3.10
6
6
  Description-Content-Type: text/markdown
@@ -5,7 +5,7 @@ bella_companion/eucovid/run_beast.py,sha256=etaD_4SVdy_Pmz5s4jvDLzp2K_QV8leEY8Pe
5
5
  bella_companion/platyrrhine/__init__.py,sha256=dIx6exNz-vuKiG5FZumvq74QUWcIEFd3L6ErqnOa83c,274
6
6
  bella_companion/platyrrhine/results.py,sha256=qosxqstTy7uadHARRt1WqmxZzxnQ3hiTjtw6V-YWKGA,2556
7
7
  bella_companion/platyrrhine/run_beast.py,sha256=_9Ex2B65zu6I68uY6s3_dohPYPaFP3E7u-uyWuDLAJc,2477
8
- bella_companion/platyrrhine/summarize_logs.py,sha256=82N7rcmLthCyQqmP4Yub4KUsIjNzQl9vEuFLMvIv03o,951
8
+ bella_companion/platyrrhine/summarize_logs.py,sha256=w5Tw5AFzxFRvf2eui1YfrFUh3pebceydcK9LTwCTx-A,1341
9
9
  bella_companion/simulations/__init__.py,sha256=ShYRdp1iSjnS_SzcsH-8jbqXz6P1nyRQZqAtPZJCMVE,454
10
10
  bella_companion/simulations/features.py,sha256=DZOBpJGlQ0UinqUZYbEtoemZ2eQGVLV_i-DfpW31qJI,104
11
11
  bella_companion/simulations/generate_data.py,sha256=edfhXrs76hl30i_xizup4z6qgzXZyaDzX_PVC62Ytpw,849
@@ -27,15 +27,15 @@ bella_companion/simulations/scenarios/__init__.py,sha256=3Kl1lKcFpfb3vLX64DmSW4X
27
27
  bella_companion/simulations/scenarios/common.py,sha256=_ddaSuTvEVdttGkXB4HPc2B7IB1F_GBOCW3cVOPZ-ZM,807
28
28
  bella_companion/simulations/scenarios/epi_multitype.py,sha256=fTkFeGHxyV_1f2nX3g_Oyr_e6wkorhXEicJjIAgeZKA,2439
29
29
  bella_companion/simulations/scenarios/epi_skyline.py,sha256=JqnOVATECxBUqEbkR5lBlMI2O8k4hO6ipR8k9cHUsm0,2365
30
- bella_companion/simulations/scenarios/fbd_2traits.py,sha256=-amB3NX0GsVgYbFuHH71t93FuXUEnRUyhWf2Qpcpia4,3541
30
+ bella_companion/simulations/scenarios/fbd_2traits.py,sha256=5UmrDlxdCMWOF0v9_0c1Yh0TyaE_FKEdxhSzHNofwQY,3541
31
31
  bella_companion/simulations/scenarios/fbd_no_traits.py,sha256=R6CH0fVeQg-Iesl39pq2uY8ICVEO4VZbvUVUCGwauJU,2520
32
32
  bella_companion/simulations/scenarios/scenario.py,sha256=_FRWAyOFbw94lAzd3zCD-1ek4TrssoiXfXRQPShLiIA,620
33
33
  bella_companion/utils/__init__.py,sha256=UtMwPK9dWf9NAl0ic8CSsgdW7aSm-5J49OqgvD7UpYw,480
34
34
  bella_companion/utils/beast.py,sha256=TBa0cLklX1_tXqoQE4LRYvds7mLg_9fS2-6U6OHENHo,2184
35
35
  bella_companion/utils/explain.py,sha256=uP7HPyn2YiykAI69BQV3RooDpC6qKoCLXfp3Uibp4zk,1475
36
36
  bella_companion/utils/slurm.py,sha256=xEyf-Jxk8fy71t3fko_Ic9WtUFSdLFE3w4tR17gaBPw,1868
37
- bella_companion-0.0.35.dist-info/METADATA,sha256=ROPyDo412BNWLTMY7l-8w9xl9CQK_y0dbYP49BLT4O8,347
38
- bella_companion-0.0.35.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
39
- bella_companion-0.0.35.dist-info/entry_points.txt,sha256=SVEYDBrkBWPrOGwnEH2aO5TSVIAvfKE37sqm-9ut9jg,51
40
- bella_companion-0.0.35.dist-info/top_level.txt,sha256=q0loZYv4vf3zF_tOATyAJqeyLOEuPyLbObNqIGP7Fmc,16
41
- bella_companion-0.0.35.dist-info/RECORD,,
37
+ bella_companion-0.0.37.dist-info/METADATA,sha256=04BxMBn1lnATHpEtl0W9DNbY6G9SkS_3xaTr0OVZKv0,347
38
+ bella_companion-0.0.37.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
39
+ bella_companion-0.0.37.dist-info/entry_points.txt,sha256=SVEYDBrkBWPrOGwnEH2aO5TSVIAvfKE37sqm-9ut9jg,51
40
+ bella_companion-0.0.37.dist-info/top_level.txt,sha256=q0loZYv4vf3zF_tOATyAJqeyLOEuPyLbObNqIGP7Fmc,16
41
+ bella_companion-0.0.37.dist-info/RECORD,,