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.
Files changed (24) hide show
  1. {treesumstats-0.3 → treesumstats-0.4}/PKG-INFO +1 -1
  2. {treesumstats-0.3 → treesumstats-0.4}/setup.py +1 -1
  3. {treesumstats-0.3 → treesumstats-0.4}/treesumstats/help.py +2 -1
  4. {treesumstats-0.3 → treesumstats-0.4}/treesumstats/subtree_sumstats.py +7 -3
  5. {treesumstats-0.3 → treesumstats-0.4}/treesumstats.egg-info/PKG-INFO +1 -1
  6. {treesumstats-0.3 → treesumstats-0.4}/LICENSE +0 -0
  7. {treesumstats-0.3 → treesumstats-0.4}/README.md +0 -0
  8. {treesumstats-0.3 → treesumstats-0.4}/setup.cfg +0 -0
  9. {treesumstats-0.3 → treesumstats-0.4}/treesumstats/__init__.py +0 -0
  10. {treesumstats-0.3 → treesumstats-0.4}/treesumstats/balance_sumstats.py +0 -0
  11. {treesumstats-0.3 → treesumstats-0.4}/treesumstats/basic_sumstats.py +0 -0
  12. {treesumstats-0.3 → treesumstats-0.4}/treesumstats/branch_sumstats.py +0 -0
  13. {treesumstats-0.3 → treesumstats-0.4}/treesumstats/calculator.py +0 -0
  14. {treesumstats-0.3 → treesumstats-0.4}/treesumstats/event_time_sumstats.py +0 -0
  15. {treesumstats-0.3 → treesumstats-0.4}/treesumstats/ltt_sumstats.py +0 -0
  16. {treesumstats-0.3 → treesumstats-0.4}/treesumstats/resolution_sumstats.py +0 -0
  17. {treesumstats-0.3 → treesumstats-0.4}/treesumstats/sumstats.py +0 -0
  18. {treesumstats-0.3 → treesumstats-0.4}/treesumstats/transmission_chain_sumstats.py +0 -0
  19. {treesumstats-0.3 → treesumstats-0.4}/treesumstats/tree_manager.py +0 -0
  20. {treesumstats-0.3 → treesumstats-0.4}/treesumstats.egg-info/SOURCES.txt +0 -0
  21. {treesumstats-0.3 → treesumstats-0.4}/treesumstats.egg-info/dependency_links.txt +0 -0
  22. {treesumstats-0.3 → treesumstats-0.4}/treesumstats.egg-info/entry_points.txt +0 -0
  23. {treesumstats-0.3 → treesumstats-0.4}/treesumstats.egg-info/requires.txt +0 -0
  24. {treesumstats-0.3 → treesumstats-0.4}/treesumstats.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: treesumstats
3
- Version: 0.3
3
+ Version: 0.4
4
4
  Summary: Encoding phylogenetic trees with summary statistics.
5
5
  Home-page: https://github.com/evolbioinfo/treesumstats
6
6
  Author: Anna Zhukova
@@ -18,7 +18,7 @@ setup(
18
18
  'Topic :: Software Development',
19
19
  'Topic :: Software Development :: Libraries :: Python Modules',
20
20
  ],
21
- version='0.3',
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
- TOPOLOGY_LABELS = TIP_TOPOLOGY_LABELS + ['I']
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
- time_diffs = self.conf2time_diffs(TOPOLOGY_LABEL2KEY[conf], is_real='real' in feature_name)
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:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: treesumstats
3
- Version: 0.3
3
+ Version: 0.4
4
4
  Summary: Encoding phylogenetic trees with summary statistics.
5
5
  Home-page: https://github.com/evolbioinfo/treesumstats
6
6
  Author: Anna Zhukova
File without changes
File without changes
File without changes