treesumstats 0.3__tar.gz → 0.4__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.
- {treesumstats-0.3 → treesumstats-0.4}/PKG-INFO +1 -1
- {treesumstats-0.3 → treesumstats-0.4}/setup.py +1 -1
- {treesumstats-0.3 → treesumstats-0.4}/treesumstats/help.py +2 -1
- {treesumstats-0.3 → treesumstats-0.4}/treesumstats/subtree_sumstats.py +7 -3
- {treesumstats-0.3 → treesumstats-0.4}/treesumstats.egg-info/PKG-INFO +1 -1
- {treesumstats-0.3 → treesumstats-0.4}/LICENSE +0 -0
- {treesumstats-0.3 → treesumstats-0.4}/README.md +0 -0
- {treesumstats-0.3 → treesumstats-0.4}/setup.cfg +0 -0
- {treesumstats-0.3 → treesumstats-0.4}/treesumstats/__init__.py +0 -0
- {treesumstats-0.3 → treesumstats-0.4}/treesumstats/balance_sumstats.py +0 -0
- {treesumstats-0.3 → treesumstats-0.4}/treesumstats/basic_sumstats.py +0 -0
- {treesumstats-0.3 → treesumstats-0.4}/treesumstats/branch_sumstats.py +0 -0
- {treesumstats-0.3 → treesumstats-0.4}/treesumstats/calculator.py +0 -0
- {treesumstats-0.3 → treesumstats-0.4}/treesumstats/event_time_sumstats.py +0 -0
- {treesumstats-0.3 → treesumstats-0.4}/treesumstats/ltt_sumstats.py +0 -0
- {treesumstats-0.3 → treesumstats-0.4}/treesumstats/resolution_sumstats.py +0 -0
- {treesumstats-0.3 → treesumstats-0.4}/treesumstats/sumstats.py +0 -0
- {treesumstats-0.3 → treesumstats-0.4}/treesumstats/transmission_chain_sumstats.py +0 -0
- {treesumstats-0.3 → treesumstats-0.4}/treesumstats/tree_manager.py +0 -0
- {treesumstats-0.3 → treesumstats-0.4}/treesumstats.egg-info/SOURCES.txt +0 -0
- {treesumstats-0.3 → treesumstats-0.4}/treesumstats.egg-info/dependency_links.txt +0 -0
- {treesumstats-0.3 → treesumstats-0.4}/treesumstats.egg-info/entry_points.txt +0 -0
- {treesumstats-0.3 → treesumstats-0.4}/treesumstats.egg-info/requires.txt +0 -0
- {treesumstats-0.3 → treesumstats-0.4}/treesumstats.egg-info/top_level.txt +0 -0
|
@@ -18,7 +18,7 @@ setup(
|
|
|
18
18
|
'Topic :: Software Development',
|
|
19
19
|
'Topic :: Software Development :: Libraries :: Python Modules',
|
|
20
20
|
],
|
|
21
|
-
version='0.
|
|
21
|
+
version='0.4',
|
|
22
22
|
description='Encoding phylogenetic trees with summary statistics.',
|
|
23
23
|
author='Anna Zhukova',
|
|
24
24
|
author_email='anna.zhukova@pasteur.fr',
|
|
@@ -30,7 +30,8 @@ def main():
|
|
|
30
30
|
params = parser.parse_args()
|
|
31
31
|
|
|
32
32
|
for feature_name in FeatureManager.available_features():
|
|
33
|
-
print(f'1. **{feature_name}:** {FeatureManager.help(feature_name)}')
|
|
33
|
+
# print(f'1. **{feature_name}:** {FeatureManager.help(feature_name)}')
|
|
34
|
+
print(feature_name)
|
|
34
35
|
|
|
35
36
|
|
|
36
37
|
if '__main__' == __name__:
|
|
@@ -10,7 +10,8 @@ from treesumstats.tree_manager import annotate_forest_with_time, TIME
|
|
|
10
10
|
OTHER_CONFIGURATION_LABEL = 'O'
|
|
11
11
|
|
|
12
12
|
TIP_TOPOLOGY_LABELS = ['2', '3U', '3L', '4U', '4U3U1', '4U211', '4L', '4B', 'O']
|
|
13
|
-
|
|
13
|
+
INODE_LABELS = ['I']
|
|
14
|
+
TOPOLOGY_LABELS = TIP_TOPOLOGY_LABELS + INODE_LABELS
|
|
14
15
|
|
|
15
16
|
TIP = 1
|
|
16
17
|
|
|
@@ -337,7 +338,9 @@ class SubtreeFeatureCalculator(FeatureCalculator):
|
|
|
337
338
|
|
|
338
339
|
if feature_name.startswith('time_diff_in_'):
|
|
339
340
|
conf = feature_name[feature_name.find('time_diff_in_') + len('time_diff_in_'):].split('_')[0]
|
|
340
|
-
|
|
341
|
+
is_real = 'real' in feature_name
|
|
342
|
+
time_diffs = self.conf2time_diffs(TOPOLOGY_LABEL2KEY[conf], is_real=is_real) \
|
|
343
|
+
if conf in TIP_TOPOLOGY_LABELS else self.sibling_inodes(is_real=is_real)
|
|
341
344
|
|
|
342
345
|
|
|
343
346
|
flavour = feature_name.split('_')[-1]
|
|
@@ -348,7 +351,8 @@ class SubtreeFeatureCalculator(FeatureCalculator):
|
|
|
348
351
|
perc = int(re.findall(r'\d+', flavour)[0])
|
|
349
352
|
return np.percentile(time_diffs, perc) if n else 0
|
|
350
353
|
else:
|
|
351
|
-
time_diffs_random = self.conf2time_diffs(TOPOLOGY_LABEL2KEY[conf], is_real=False)
|
|
354
|
+
time_diffs_random = self.conf2time_diffs(TOPOLOGY_LABEL2KEY[conf], is_real=False) \
|
|
355
|
+
if conf in TIP_TOPOLOGY_LABELS else self.sibling_inodes(is_real=False)
|
|
352
356
|
is_less = 'less' == feature_name.split('_')[-1]
|
|
353
357
|
n_random_vs_real = ((time_diffs_random < time_diffs) if is_less else (time_diffs_random > time_diffs)).sum()
|
|
354
358
|
if 'random_vs_real_n_' in feature_name:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|