TreeSAK 1.34.4__tar.gz → 1.34.5__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 (98) hide show
  1. {TreeSAK-1.34.4/TreeSAK.egg-info → TreeSAK-1.34.5}/PKG-INFO +2 -2
  2. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/PB.py +38 -12
  3. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/VERSION +1 -1
  4. {TreeSAK-1.34.4 → TreeSAK-1.34.5/TreeSAK.egg-info}/PKG-INFO +2 -2
  5. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/bin/TreeSAK +5 -4
  6. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/LICENSE +0 -0
  7. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/MANIFEST.in +0 -0
  8. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/README.md +0 -0
  9. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/ALE.py +0 -0
  10. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/ALE1.py +0 -0
  11. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/ALE2.py +0 -0
  12. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/ALE2RTC.py +0 -0
  13. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/ALE3.py +0 -0
  14. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/ALE4.py +0 -0
  15. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/ALE5.py +0 -0
  16. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/ALE6.py +0 -0
  17. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/ALE_backup.py +0 -0
  18. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/AlignmentPruner.py +0 -0
  19. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/AssessCVG.py +0 -0
  20. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/AssessMarker.py +0 -0
  21. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/AssessMarkerDeltaLL.py +0 -0
  22. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/AssessMarkerPA.py +0 -0
  23. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/BMGE.jar +0 -0
  24. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/BMGE.py +0 -0
  25. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/CompareMCMC.py +0 -0
  26. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/ConcateMSA.py +0 -0
  27. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/ConvertMSA.py +0 -0
  28. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/Dir.rb +0 -0
  29. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/ExtractMarkerSeq.py +0 -0
  30. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/FastRoot.py +0 -0
  31. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/FastRoot_backup.py +0 -0
  32. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/GTDB_tree.py +0 -0
  33. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/KEGG_Luo17.py +0 -0
  34. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/LcaToLeaves.py +0 -0
  35. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/MCMCtreeR.py +0 -0
  36. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/MarkerRef2Tree.py +0 -0
  37. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/MarkerRef2Tree_backup.py +0 -0
  38. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/MarkerSeq2Tree.py +0 -0
  39. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/ModifyTopo.py +0 -0
  40. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/OMA.py +0 -0
  41. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/OMA2.py +0 -0
  42. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/OneLineAln.py +0 -0
  43. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/PMSF.py +0 -0
  44. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/PhyloBiAssoc.R +0 -0
  45. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/PhyloBiAssoc.py +0 -0
  46. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/PlotMcmcNode.py +0 -0
  47. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/RootTree.py +0 -0
  48. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/RootTreeGTDB214.py +0 -0
  49. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/RootTreeGTDB220.py +0 -0
  50. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/SequentialDating.py +0 -0
  51. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/SingleAleHGT.py +0 -0
  52. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/SingleLinePhy.py +0 -0
  53. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/SliceMSA.py +0 -0
  54. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/SplitScore.py +0 -0
  55. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/SplitScore1.py +0 -0
  56. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/SplitScore1OMA.py +0 -0
  57. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/SplitScore2.py +0 -0
  58. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/TaxaCountStats.R +0 -0
  59. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/TreeSAK_config.py +0 -0
  60. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/VisHPD95.R +0 -0
  61. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/VisHPD95.py +0 -0
  62. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/__init__.py +0 -0
  63. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/ale_parser.py +0 -0
  64. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/ale_splitter.py +0 -0
  65. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/compare_trees.R +0 -0
  66. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/compare_trees.py +0 -0
  67. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/dating.py +0 -0
  68. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/dating_ss.py +0 -0
  69. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/do_rrtc.rb +0 -0
  70. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/fa2phy.py +0 -0
  71. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/format_leaf_name.py +0 -0
  72. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/get_arCOG_seq.py +0 -0
  73. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/global_functions.py +0 -0
  74. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/merge_pdf.py +0 -0
  75. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/pRTC.py +0 -0
  76. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/parse_deltall_stdout.py +0 -0
  77. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/plot_distruibution_th.py +0 -0
  78. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/prep_mcmctree_ctl.py +0 -0
  79. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/print_leaves.py +0 -0
  80. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/rename_leaves.py +0 -0
  81. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/replace_clade.py +0 -0
  82. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/root_with_out_group.py +0 -0
  83. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/run_TaxaCountStats_R_s1.py +0 -0
  84. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/subsample_drep_gnms.py +0 -0
  85. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/subset.py +0 -0
  86. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/subset_tree_stupid_old_way.py +0 -0
  87. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/test_1.py +0 -0
  88. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/test_2.py +0 -0
  89. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/tmp_2.py +0 -0
  90. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/tmp_3.py +0 -0
  91. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/tmp_4.py +0 -0
  92. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK/weighted_rand.rb +0 -0
  93. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK.egg-info/SOURCES.txt +0 -0
  94. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK.egg-info/dependency_links.txt +0 -0
  95. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK.egg-info/requires.txt +0 -0
  96. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/TreeSAK.egg-info/top_level.txt +0 -0
  97. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/setup.cfg +0 -0
  98. {TreeSAK-1.34.4 → TreeSAK-1.34.5}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: TreeSAK
3
- Version: 1.34.4
3
+ Version: 1.34.5
4
4
  Summary: BioSAK
5
5
  Home-page: https://github.com/songweizhi/TreeSAK
6
6
  Author: Weizhi Song
@@ -24,4 +24,4 @@ Requires-Dist: kaleido
24
24
  Requires-Dist: PyPDF3
25
25
  Requires-Dist: dendropy
26
26
 
27
- TreeSAK v1.34.4
27
+ TreeSAK v1.34.5
@@ -1,6 +1,7 @@
1
1
  import os
2
2
  import argparse
3
3
  from Bio import AlignIO
4
+ import multiprocessing as mp
4
5
 
5
6
 
6
7
  PB_usage = '''
@@ -52,12 +53,14 @@ def fa2phy(fasta_in, phy_out):
52
53
 
53
54
  def PB(args):
54
55
 
55
- msa_in = args['i']
56
- op_prefix = args['p']
57
- fa_to_plp = args['fa2plp']
58
- num_of_threads = args['t']
56
+ msa_in = args['i']
57
+ op_prefix = args['p']
58
+ fa_to_plp = args['fa2plp']
59
+ num_of_threads = args['t']
60
+ num_of_chains = args['chain']
59
61
 
60
62
  settings_dombrowski = '-cat -gtr -x 10 -1 -dgam 4'
63
+ setting_to_use = settings_dombrowski
61
64
 
62
65
  msa_to_use = msa_in
63
66
  if fa_to_plp is True:
@@ -65,13 +68,35 @@ def PB(args):
65
68
  fa2phy(msa_in, msa_in_plp)
66
69
  msa_to_use = msa_in_plp
67
70
 
68
- pb_mpi_cmd = 'mpirun -np %s pb_mpi -d %s %s -s %s' % (num_of_threads, msa_to_use, settings_dombrowski, op_prefix)
69
- readpb_cmd = ''
70
- bpcomp_cmd = ''
71
-
72
- print(pb_mpi_cmd)
73
- os.system(pb_mpi_cmd)
74
-
71
+ pb_mpi_cmd_list = []
72
+ jobs_to_run_in_parallel = 0
73
+ if num_of_chains == 1:
74
+ jobs_to_run_in_parallel = 1
75
+ pb_mpi_cmd = 'mpirun -np %s pb_mpi -d %s %s -s %s' % (num_of_threads, msa_to_use, setting_to_use, op_prefix)
76
+ pb_mpi_cmd_list.append(pb_mpi_cmd)
77
+
78
+ elif num_of_threads <= num_of_chains:
79
+ jobs_to_run_in_parallel = num_of_threads
80
+ for chain_index in range(1, (num_of_chains + 1)):
81
+ pb_mpi_cmd = 'mpirun -np %s pb_mpi -d %s %s -s %s_chain%s' % (1, msa_to_use, setting_to_use, op_prefix, chain_index)
82
+ pb_mpi_cmd_list.append(pb_mpi_cmd)
83
+
84
+ else:
85
+ jobs_to_run_in_parallel = num_of_chains
86
+ cores_per_run = num_of_threads // num_of_chains
87
+ for chain_index in range(1, (num_of_chains + 1)):
88
+ pb_mpi_cmd = 'mpirun -np %s pb_mpi -d %s %s -s %s_chain%s' % (cores_per_run, msa_to_use, setting_to_use, op_prefix, chain_index)
89
+ pb_mpi_cmd_list.append(pb_mpi_cmd)
90
+
91
+ # run chains with mp
92
+ print('Running pb_mpi with multiprocessing')
93
+ pool = mp.Pool(processes=jobs_to_run_in_parallel)
94
+ pool.map(os.system, pb_mpi_cmd_list)
95
+ pool.close()
96
+ pool.join()
97
+
98
+ # readpb_cmd = ''
99
+ # bpcomp_cmd = ''
75
100
  # print(readpb_cmd)
76
101
  # print(bpcomp_cmd)
77
102
 
@@ -82,6 +107,7 @@ if __name__ == '__main__':
82
107
  parser.add_argument('-i', required=True, help='input MSA file')
83
108
  parser.add_argument('-p', required=True, help='output prefix')
84
109
  parser.add_argument('-fa2plp', required=False, action="store_true", help='convert MSA format from fasta to phylip')
85
- parser.add_argument('-t', required=False, type=int, default=1, help='num of threads, default 1')
110
+ parser.add_argument('-chain', required=False, type=int, default=4, help='num of chains to run in parallel, default: 4')
111
+ parser.add_argument('-t', required=False, type=int, default=4, help='num of cores, default: 4')
86
112
  args = vars(parser.parse_args())
87
113
  PB(args)
@@ -1,4 +1,4 @@
1
- 1.34.4
1
+ 1.34.5
2
2
  - fixed bugs
3
3
 
4
4
  1.34.0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: TreeSAK
3
- Version: 1.34.4
3
+ Version: 1.34.5
4
4
  Summary: BioSAK
5
5
  Home-page: https://github.com/songweizhi/TreeSAK
6
6
  Author: Weizhi Song
@@ -24,4 +24,4 @@ Requires-Dist: kaleido
24
24
  Requires-Dist: PyPDF3
25
25
  Requires-Dist: dendropy
26
26
 
27
- TreeSAK v1.34.4
27
+ TreeSAK v1.34.5
@@ -682,10 +682,11 @@ if __name__ == '__main__':
682
682
  elif sys.argv[1] in ['PB', 'Pb', 'pb']:
683
683
  from TreeSAK import PB
684
684
  PB_parser = subparsers.add_parser('PB', usage=PB.PB_usage)
685
- PB_parser.add_argument('-i', required=True, help='input MSA file')
686
- PB_parser.add_argument('-p', required=True, help='output prefix')
687
- PB_parser.add_argument('-fa2plp', required=False, action="store_true", help='convert MSA format from fasta to phylip')
688
- PB_parser.add_argument('-t', required=False, type=int, default=1, help='num of threads, default 1')
685
+ PB_parser.add_argument('-i', required=True, help='input MSA file')
686
+ PB_parser.add_argument('-p', required=True, help='output prefix')
687
+ PB_parser.add_argument('-fa2plp', required=False, action="store_true", help='convert MSA format from fasta to phylip')
688
+ PB_parser.add_argument('-chain', required=False, type=int, default=4, help='num of chains to run in parallel, default: 4')
689
+ PB_parser.add_argument('-t', required=False, type=int, default=4, help='num of cores, default: 4')
689
690
  args = vars(parser.parse_args())
690
691
  PB.PB(args)
691
692
 
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
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
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