bscampp 1.0.6__py3-none-any.whl → 1.0.7__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.
bscampp/__init__.py CHANGED
@@ -12,7 +12,7 @@ import logging, os
12
12
  # not really needed for BSCAMPP but safe to update here
13
13
  os.sys.setrecursionlimit(1000000)
14
14
 
15
- __version__ = "1.0.6"
15
+ __version__ = "1.0.7"
16
16
  _INSTALL_PATH = __path__[0]
17
17
 
18
18
  # global variables to store all loggers
bscampp/configs.py CHANGED
@@ -22,7 +22,6 @@ _LOG = get_logger(__name__)
22
22
  Configuration defined by users and by default values
23
23
  '''
24
24
  class Configs:
25
- global _root_dir
26
25
 
27
26
  # basic input paths
28
27
  info_path = None # info file for pplacer or EPA-ng
bscampp/functions.py CHANGED
@@ -11,6 +11,10 @@ import bscampp.utils as utils
11
11
 
12
12
  import concurrent.futures
13
13
 
14
+ # suppress userwarning when doing subtree suppress_unifurcations
15
+ import warnings
16
+ warnings.filterwarnings("ignore", category=UserWarning)
17
+
14
18
  _LOG = get_logger(__name__)
15
19
 
16
20
  ############################# helper functions ################################
@@ -405,7 +409,8 @@ def placeQueriesToSubtrees(tree, leaf_dict, new_subtree_dict, placed_query_list,
405
409
  aln, qaln, cmdline_args, workdir, qname_map, qname_map_rev,
406
410
  pool, lock, dry_run=False):
407
411
  t0 = time.perf_counter()
408
- _LOG.info('Performing placement on each subtree...')
412
+ _LOG.info("Performing placement on each subtree with {}...".format(
413
+ Configs.placement_method))
409
414
 
410
415
  if dry_run:
411
416
  return dict()
@@ -461,7 +466,7 @@ def placeQueriesToSubtrees(tree, leaf_dict, new_subtree_dict, placed_query_list,
461
466
  job = EPAngJob(path=Configs.epang_path,
462
467
  info_path=Configs.info_path, tree_path=tmp_tree,
463
468
  aln_path=tmp_aln, qaln_path=tmp_qaln,
464
- outdir=subtree_dir, num_cpus=Configs.num_cpus)
469
+ outdir=subtree_dir, num_cpus=Configs.cpus_per_job)
465
470
  jobs.append(job)
466
471
  ## for EPA-ng, ensure that outpath name is changed to the one we want
467
472
  #_outpath = job.run(logging=f'subtree_{final_subtree_count}')
@@ -481,7 +486,7 @@ def placeQueriesToSubtrees(tree, leaf_dict, new_subtree_dict, placed_query_list,
481
486
  job = PplacerTaxtasticJob(path=Configs.pplacer_path,
482
487
  refpkg_dir=refpkg_dir,
483
488
  #molecule=Configs.molecule, model=Configs.model,
484
- outpath=tmp_output, num_cpus=Configs.num_cpus,
489
+ outpath=tmp_output, num_cpus=Configs.cpus_per_job,
485
490
  qaln_path=tmp_qaln)
486
491
  #tmp_output = job.run(logging=f'subtree_{final_subtree_count}')
487
492
  jobs.append(job)
@@ -521,8 +526,16 @@ def placeQueriesToSubtrees(tree, leaf_dict, new_subtree_dict, placed_query_list,
521
526
 
522
527
  for tmp_place in place_json["placements"]:
523
528
  # convert qname back using qname_map_rev
524
- qname = qname_map_rev[tmp_place[tgt][0]]
525
- tmp_place[tgt][0] = qname
529
+ tmp_name = tmp_place[tgt][0]
530
+
531
+ # >EPA-ng: tgt=="n" --> qname is string
532
+ if isinstance(tmp_name, str):
533
+ qname = qname_map_rev[tmp_name]
534
+ tmp_place[tgt][0] = qname
535
+ # >pplacer: tgt=="nm" --> qname is a list of two fields
536
+ elif isinstance(tmp_name, list):
537
+ qname = qname_map_rev[tmp_name[0]]
538
+ tmp_place[tgt][0][0] = qname
526
539
  placed_query_list.append(qname)
527
540
 
528
541
  #placed_query_list.append(tmp_place[tgt][0])
bscampp/pipeline.py CHANGED
@@ -180,8 +180,6 @@ def clean_temp_files():
180
180
  _LOG.info(f'- Removed {temp}')
181
181
 
182
182
  def parseArguments(dry_run=False, method="BSCAMPP"):
183
- global _root_dir, main_config_path
184
-
185
183
  default_outdir = f"{method.lower()}_output"
186
184
  default_outname = f"{method.lower()}_result"
187
185
 
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: bscampp
3
- Version: 1.0.6
3
+ Version: 1.0.7
4
4
  Summary: BSCAMPP and SCAMPP - Scalable Phylogenetic Placement Tools
5
5
  Author-email: Eleanor Wedell <ewedell2@illinois.edu>, Chengze Shen <chengze5@illinois.edu>
6
6
  License: MIT License
@@ -49,12 +49,13 @@ Requires-Dist: ConfigParser>=5.0.0
49
49
  Requires-Dist: numpy>=1.21.6
50
50
  Requires-Dist: treeswift>=1.1.45
51
51
  Requires-Dist: taxtastic>=0.9.3
52
+ Dynamic: license-file
52
53
 
53
54
  # BSCAMPP and SCAMPP - Two Scalable Phylogenetic Placement Methods and Frameworks
55
+ [![PyPI - Version](https://img.shields.io/pypi/v/bscampp)](https://pypi.org/project/bscampp/#history)
54
56
  [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/bscampp)](https://pypi.org/project/bscampp/)
55
- [![PyPI - Version](https://img.shields.io/pypi/v/bscampp?color=blue)](https://pypi.org/project/bscampp/#history)
56
57
  [![Build Status](https://img.shields.io/github/actions/workflow/status/ewedell/BSCAMPP/python-package.yml?branch=main&label=build)](https://github.com/ewedell/BSCAMPP/)
57
- [![PyPI - License](https://img.shields.io/pypi/l/bscampp?color=blue)](https://github.com/ewedell/BSCAMPP/blob/main/LICENSE)
58
+ [![PyPI - License](https://img.shields.io/pypi/l/bscampp)](https://github.com/ewedell/BSCAMPP/blob/main/LICENSE)
58
59
  [![Changelog](https://img.shields.io/badge/CHANGELOG-grey)](https://github.com/ewedell/BSCAMPP/blob/main/CHANGELOG.md)
59
60
 
60
61
  **Table of Contents**
@@ -1,10 +1,10 @@
1
- bscampp/__init__.py,sha256=eDIMYifzKrFdtA3Ac7OvPTyIHUO1ZLgVaM0pKFxxEHE,2289
2
- bscampp/configs.py,sha256=perl6u5hto6J3JV1JMbsTQ6tqr2uGOk-Z9jfzflid0s,6122
1
+ bscampp/__init__.py,sha256=iWcT9i33I9mkOxFgfa7aRxjn_tRPYY7yW6zcuhbjTWk,2289
2
+ bscampp/configs.py,sha256=M53nndokxi3WczhpKGWpxOcI2nXIkgpQKhj5gYpee8w,6101
3
3
  bscampp/default.config,sha256=CEfsUHBy--vwJhEcUuJ0btfuGQWb_lKMVWUIP9f5YGw,112
4
- bscampp/functions.py,sha256=DGHQJLLzXSghDKbha0LW0YPip_45M6MI4t3zdDpzULI,22448
4
+ bscampp/functions.py,sha256=ywv3-h1l81YayioSTmNiciBZnbi56zyIGc-5Ni-jXG4,23016
5
5
  bscampp/init_configs.py,sha256=EA9sMN5jWj6zj2b-7tN19LhX2Ef61ByQLxQRLHAqLDM,3600
6
6
  bscampp/jobs.py,sha256=v7buZJs1AnNoXiILwu-W8fo3QjxAh3i9Mp7xfmlJvAY,7569
7
- bscampp/pipeline.py,sha256=IPZnXZmVxGGfbVUuGCQh5X9oBq48-6pA9QkuvMGPTag,14000
7
+ bscampp/pipeline.py,sha256=J-RQH54R27m6fhzIpGX0MJuE3ZFk5rcnsROpwC_n5CE,13960
8
8
  bscampp/utils.py,sha256=-wns6FaWMKD2wVqjxdBQvjTdagTjywBIaGfqb2mupe4,30039
9
9
  bscampp/tools/epa-ng,sha256=f3EVoZAAOXLN6l521qp-TrWDl5J2nqL3tGgjPaQE9WQ,3772096
10
10
  bscampp/tools/pplacer,sha256=p0H4eo9uuiYoWS_kJbPfauOV99i7BXJdZSiwXIuLxTw,7834576
@@ -17,9 +17,9 @@ bscampp/tools/hamming_distance/src/fragment_tree_hamming.cpp,sha256=xCmyAT-OZJOD
17
17
  bscampp/tools/hamming_distance/src/fragment_tree_hamming_new.cpp,sha256=eKxgODRlpf0hU84QjNhigvRhWCT9tiJZjA5oQFQ1bUk,7404
18
18
  bscampp/tools/hamming_distance/src/homology.cpp,sha256=ZE0uXZWQ-cN4U1Wk5kUr_KKHgzsgA6Sno-IViRa4tmI,6053
19
19
  bscampp/tools/hamming_distance/src/new_hamming.cpp,sha256=fBRm99RquBZgZjaLOn9xDI3cH9NchhrxKbL-11j8fmk,5342
20
- bscampp-1.0.6.dist-info/LICENSE,sha256=HEa4YQdOR0e2Gz-NiOwr9X6aJcZtY0AGmlJQDmfN0Iw,1064
21
- bscampp-1.0.6.dist-info/METADATA,sha256=0sWAKK30wlps8i0d1BdFqyv5MZVgefRnTn_-yMmO8lQ,12602
22
- bscampp-1.0.6.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
23
- bscampp-1.0.6.dist-info/entry_points.txt,sha256=4Ft83qHc39tNNpMLgSgFXDHM-vuAB99JtmczCQj5pq8,204
24
- bscampp-1.0.6.dist-info/top_level.txt,sha256=1loGRUAft6Tcdq0f3lHbVwWN7W_SW1srfhAVSpg9DWE,8
25
- bscampp-1.0.6.dist-info/RECORD,,
20
+ bscampp-1.0.7.dist-info/licenses/LICENSE,sha256=HEa4YQdOR0e2Gz-NiOwr9X6aJcZtY0AGmlJQDmfN0Iw,1064
21
+ bscampp-1.0.7.dist-info/METADATA,sha256=2Tk1eF72pNPIttqSsfwiNclB8H0bShbMhca0aAr8wKo,12602
22
+ bscampp-1.0.7.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
23
+ bscampp-1.0.7.dist-info/entry_points.txt,sha256=4Ft83qHc39tNNpMLgSgFXDHM-vuAB99JtmczCQj5pq8,204
24
+ bscampp-1.0.7.dist-info/top_level.txt,sha256=1loGRUAft6Tcdq0f3lHbVwWN7W_SW1srfhAVSpg9DWE,8
25
+ bscampp-1.0.7.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (76.0.0)
2
+ Generator: setuptools (78.1.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5