TreeSAK 1.33.2__tar.gz → 1.34.1__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 (99) hide show
  1. {TreeSAK-1.33.2/TreeSAK.egg-info → TreeSAK-1.34.1}/PKG-INFO +2 -2
  2. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/MarkerRef2Tree.py +2 -3
  3. TreeSAK-1.34.1/TreeSAK/PB.py +98 -0
  4. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/VERSION +4 -1
  5. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/tmp_3.py +3 -5
  6. {TreeSAK-1.33.2 → TreeSAK-1.34.1/TreeSAK.egg-info}/PKG-INFO +2 -2
  7. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK.egg-info/SOURCES.txt +1 -1
  8. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/bin/TreeSAK +19 -8
  9. TreeSAK-1.33.2/TreeSAK/pb_mpi.py +0 -58
  10. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/LICENSE +0 -0
  11. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/MANIFEST.in +0 -0
  12. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/README.md +0 -0
  13. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/ALE.py +0 -0
  14. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/ALE1.py +0 -0
  15. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/ALE2.py +0 -0
  16. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/ALE2RTC.py +0 -0
  17. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/ALE3.py +0 -0
  18. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/ALE4.py +0 -0
  19. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/ALE5.py +0 -0
  20. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/ALE6.py +0 -0
  21. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/ALE_backup.py +0 -0
  22. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/AlignmentPruner.py +0 -0
  23. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/AssessCVG.py +0 -0
  24. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/AssessMarker.py +0 -0
  25. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/AssessMarkerDeltaLL.py +0 -0
  26. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/AssessMarkerPA.py +0 -0
  27. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/BMGE.jar +0 -0
  28. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/BMGE.py +0 -0
  29. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/CompareMCMC.py +0 -0
  30. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/ConcateMSA.py +0 -0
  31. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/ConvertMSA.py +0 -0
  32. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/Dir.rb +0 -0
  33. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/ExtractMarkerSeq.py +0 -0
  34. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/FastRoot.py +0 -0
  35. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/FastRoot_backup.py +0 -0
  36. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/GTDB_tree.py +0 -0
  37. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/KEGG_Luo17.py +0 -0
  38. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/LcaToLeaves.py +0 -0
  39. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/MCMCtreeR.py +0 -0
  40. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/MarkerRef2Tree_backup.py +0 -0
  41. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/MarkerSeq2Tree.py +0 -0
  42. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/ModifyTopo.py +0 -0
  43. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/OMA.py +0 -0
  44. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/OMA2.py +0 -0
  45. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/OneLineAln.py +0 -0
  46. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/PMSF.py +0 -0
  47. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/PhyloBiAssoc.R +0 -0
  48. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/PhyloBiAssoc.py +0 -0
  49. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/PlotMcmcNode.py +0 -0
  50. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/RootTree.py +0 -0
  51. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/RootTreeGTDB214.py +0 -0
  52. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/RootTreeGTDB220.py +0 -0
  53. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/SequentialDating.py +0 -0
  54. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/SingleAleHGT.py +0 -0
  55. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/SingleLinePhy.py +0 -0
  56. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/SliceMSA.py +0 -0
  57. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/SplitScore.py +0 -0
  58. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/SplitScore1.py +0 -0
  59. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/SplitScore1OMA.py +0 -0
  60. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/SplitScore2.py +0 -0
  61. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/TaxaCountStats.R +0 -0
  62. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/TreeSAK_config.py +0 -0
  63. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/VisHPD95.R +0 -0
  64. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/VisHPD95.py +0 -0
  65. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/__init__.py +0 -0
  66. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/ale_parser.py +0 -0
  67. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/ale_splitter.py +0 -0
  68. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/compare_trees.R +0 -0
  69. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/compare_trees.py +0 -0
  70. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/dating.py +0 -0
  71. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/dating_ss.py +0 -0
  72. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/do_rrtc.rb +0 -0
  73. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/fa2phy.py +0 -0
  74. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/format_leaf_name.py +0 -0
  75. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/get_arCOG_seq.py +0 -0
  76. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/global_functions.py +0 -0
  77. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/merge_pdf.py +0 -0
  78. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/pRTC.py +0 -0
  79. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/parse_deltall_stdout.py +0 -0
  80. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/plot_distruibution_th.py +0 -0
  81. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/prep_mcmctree_ctl.py +0 -0
  82. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/print_leaves.py +0 -0
  83. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/rename_leaves.py +0 -0
  84. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/replace_clade.py +0 -0
  85. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/root_with_out_group.py +0 -0
  86. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/run_TaxaCountStats_R_s1.py +0 -0
  87. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/subsample_drep_gnms.py +0 -0
  88. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/subset.py +0 -0
  89. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/subset_tree_stupid_old_way.py +0 -0
  90. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/test_1.py +0 -0
  91. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/test_2.py +0 -0
  92. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/tmp_2.py +0 -0
  93. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/tmp_4.py +0 -0
  94. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK/weighted_rand.rb +0 -0
  95. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK.egg-info/dependency_links.txt +0 -0
  96. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK.egg-info/requires.txt +0 -0
  97. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/TreeSAK.egg-info/top_level.txt +0 -0
  98. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/setup.cfg +0 -0
  99. {TreeSAK-1.33.2 → TreeSAK-1.34.1}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: TreeSAK
3
- Version: 1.33.2
3
+ Version: 1.34.1
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.33.2
27
+ TreeSAK v1.34.1
@@ -348,9 +348,8 @@ def MarkerRef2Tree(args):
348
348
  else:
349
349
  group_to_gnm_dict[domain_name].add(gnm_id)
350
350
 
351
- #################### check file/folder name ####################
351
+ ############################################## check file/folder name ##############################################
352
352
 
353
- # define output dir
354
353
  blastp_cmd_txt = '%s/s01_blast_cmds_%s.txt' % (op_dir, (len(marker_seq_list)*len(faa_file_list)))
355
354
  pwd_combined_protein = '%s/combined.faa' % op_dir
356
355
  blast_op_dir = '%s/s01_blast' % op_dir
@@ -364,7 +363,7 @@ def MarkerRef2Tree(args):
364
363
  iqtree_dir = '%s/s08_iqtree_wd' % op_dir
365
364
  iqtree_cmd_txt = '%s/iqtree_cmds.txt' % iqtree_dir
366
365
 
367
- ############################################################
366
+ ####################################################################################################################
368
367
 
369
368
  # create folder
370
369
  if os.path.isdir(op_dir) is True:
@@ -0,0 +1,98 @@
1
+ import os
2
+ import argparse
3
+ from Bio import AlignIO
4
+
5
+
6
+ PB_usage = '''
7
+ ========================================== PB example commands ==========================================
8
+
9
+ # Dependency: mpirun, pb_mpi and readpb_mpi (from PhyloBayes-MPI)
10
+
11
+ export OMPI_MCA_btl=^openib
12
+ TreeSAK PB -i in.phylip -p chain_name -t 12
13
+
14
+ # Notes:
15
+ 1. This is a wrapper for: mpirun -np 12 pb_mpi -d in.phylip -cat -gtr -x 10 -1 -dgam 4 -s chain_name
16
+
17
+ 2. Input MSA need to be in phylip format.
18
+
19
+ 3. Settings used by Nina Dombrowski: -cat -gtr -x 10 -1 -dgam 4
20
+ For each marker protein family, four parallel chains were run until convergence was reached, unless stated
21
+ otherwise (maxdiff < 0.3; settings: bpcomp -x 25%_burnin chain1 chain2 chain3 chain4). Additionally, we
22
+ checked for the minimum effective size using tracecomp (minimum effective size > 50; settings: -x 25%_burnin
23
+ chain1 chain2 chain3 chain4).
24
+
25
+ 4. Settings used by Fan Lu:
26
+ Four chains were run for each consensus tree, and for each chain over 15,000 cycles (5,000 burn-in)
27
+ were conducted, until a maxdiff value lower than 0.3 was reached. Otherwise, non-converged chains were
28
+ continually run to over 20,000 cycles. Posterior predictive tests were conducted using PhyloBayes MPI
29
+ with the ‘readpb_mpi -x 5000 50 -allppred’ command.
30
+
31
+ =========================================================================================================
32
+ '''
33
+
34
+
35
+ def fa2phy(fasta_in, phy_out):
36
+
37
+ alignment = AlignIO.read(fasta_in, 'fasta')
38
+
39
+ max_seq_id_len = 0
40
+ for each_seq in alignment:
41
+ seq_id_len = len(each_seq.id)
42
+ if seq_id_len > max_seq_id_len:
43
+ max_seq_id_len = seq_id_len
44
+
45
+ with open(phy_out, 'w') as msa_out_handle:
46
+ msa_out_handle.write('%s %s\n' % (len(alignment), alignment.get_alignment_length()))
47
+ for each_seq in alignment:
48
+ seq_id = each_seq.id
49
+ seq_id_with_space = '%s%s' % (seq_id, ' ' * (max_seq_id_len + 2 - len(seq_id)))
50
+ msa_out_handle.write('%s%s\n' % (seq_id_with_space, str(each_seq.seq)))
51
+
52
+
53
+ def PB(args):
54
+
55
+ msa_in = args['i']
56
+ op_prefix = args['p']
57
+ fa_to_plp = args['fa2plp']
58
+ num_of_threads = args['t']
59
+
60
+ settings_dombrowski = '-cat -gtr -x 10 -1 -dgam 4'
61
+ settings_fan = ''
62
+
63
+ msa_to_use = msa_in
64
+ if fa_to_plp is True:
65
+ msa_in_plp = '%s.phylip' % msa_in
66
+ fa2phy(msa_in, msa_in_plp)
67
+ msa_to_use = msa_in_plp
68
+
69
+ pb_mpi_cmd = 'mpirun -np %s pb_mpi -d %s %s -s %s' % (num_of_threads, msa_to_use, settings_dombrowski, op_prefix)
70
+ print(pb_mpi_cmd)
71
+ os.system(pb_mpi_cmd)
72
+
73
+ readpb_cmd = ''
74
+ print(readpb_cmd)
75
+
76
+ bpcomp_cmd = ''
77
+ print(bpcomp_cmd)
78
+
79
+
80
+ if __name__ == '__main__':
81
+
82
+ parser = argparse.ArgumentParser()
83
+ parser.add_argument('-i', required=True, help='input MSA file')
84
+ parser.add_argument('-p', required=True, help='output prefix')
85
+ parser.add_argument('-fa2plp', required=False, action="store_true", help='convert MSA format from fasta to phylip')
86
+ parser.add_argument('-t', required=False, type=int, default=2, help='num of threads')
87
+ args = vars(parser.parse_args())
88
+ PB(args)
89
+
90
+
91
+ '''
92
+
93
+ export OMPI_MCA_btl=^openib
94
+ cd /scratch/PI/ocessongwz/Sponge_2023_12_01/MarkerRef2Tree_marker_set_4/s08_iqtree_wd/pb_test
95
+ mpirun -np 12 pb_mpi -d marker_pa85_pruner0.BMGE.phylip -cat -gtr -x 10 -1 -dgam 4 -s chain_test
96
+
97
+ '''
98
+
@@ -1,6 +1,9 @@
1
- 1.33.2
1
+ 1.34.1
2
2
  - fixed bugs
3
3
 
4
+ 1.34.0
5
+ - new module added: pb
6
+
4
7
  1.33.0
5
8
  - new module added: RootTreeGTDB214 and RootTreeGTDB220
6
9
 
@@ -1,5 +1,6 @@
1
1
  import operator
2
2
 
3
+
3
4
  def keep_highest_rrtc(rrtc_in, rrtc_out):
4
5
 
5
6
  rrtc_highest_prob_dict = dict()
@@ -29,11 +30,8 @@ rrtc_out = '/Users/songweizhi/Desktop/rrtc_out.txt'
29
30
  keep_highest_rrtc(rrtc_in, rrtc_out)
30
31
 
31
32
 
32
-
33
33
  demo_dict = { 'a': 6, 'b': 2, 'c': 2 }
34
-
35
- print()
36
-
37
34
  for each in sorted(demo_dict.items(), key=operator.itemgetter(1))[::-1]:
38
35
  print(each[0])
39
- print(each[1])
36
+ print(each[1])
37
+
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: TreeSAK
3
- Version: 1.33.2
3
+ Version: 1.34.1
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.33.2
27
+ TreeSAK v1.34.1
@@ -36,6 +36,7 @@ TreeSAK/ModifyTopo.py
36
36
  TreeSAK/OMA.py
37
37
  TreeSAK/OMA2.py
38
38
  TreeSAK/OneLineAln.py
39
+ TreeSAK/PB.py
39
40
  TreeSAK/PMSF.py
40
41
  TreeSAK/PhyloBiAssoc.R
41
42
  TreeSAK/PhyloBiAssoc.py
@@ -71,7 +72,6 @@ TreeSAK/global_functions.py
71
72
  TreeSAK/merge_pdf.py
72
73
  TreeSAK/pRTC.py
73
74
  TreeSAK/parse_deltall_stdout.py
74
- TreeSAK/pb_mpi.py
75
75
  TreeSAK/plot_distruibution_th.py
76
76
  TreeSAK/prep_mcmctree_ctl.py
77
77
  TreeSAK/print_leaves.py
@@ -54,6 +54,7 @@ def print_main_help():
54
54
  CS_trim -> (to be added) perform chi-squared trimming to reduce compositional heterogeneity
55
55
 
56
56
  Tree-related
57
+ PB -> Infer tree with PhyloBayes-MPI
57
58
  MarkerSeq2Tree -> Marker sequence to tree
58
59
  MarkerRef2Tree -> Marker (reference sequence) to Tree
59
60
  GTDB_tree -> get GTDB tree
@@ -172,7 +173,7 @@ if __name__ == '__main__':
172
173
  args = vars(parser.parse_args())
173
174
  rename_leaves.rename_leaves(args)
174
175
 
175
- elif sys.argv[1] == 'FLN':
176
+ elif sys.argv[1] in ['FLN', 'fln']:
176
177
  from TreeSAK import format_leaf_name
177
178
  format_leaf_name_parser = subparsers.add_parser('FLN', usage=format_leaf_name.format_leaf_name_usage)
178
179
  format_leaf_name_parser.add_argument('-i', required=True, help='input tree')
@@ -290,7 +291,7 @@ if __name__ == '__main__':
290
291
  args = vars(parser.parse_args())
291
292
  dating_ss.dating_ss(args)
292
293
 
293
- elif sys.argv[1] == 'Dating':
294
+ elif sys.argv[1] in ['Dating', 'dating']:
294
295
  from TreeSAK import dating
295
296
  dating_parser = subparsers.add_parser('Dating', usage=dating.dating_usage)
296
297
  dating_parser.add_argument('-tree', required=True, help='outgroup leaves, one id per line')
@@ -354,7 +355,7 @@ if __name__ == '__main__':
354
355
  args['plot_grouped_HPD95_R'] = config_dict['plot_grouped_HPD95_R']
355
356
  VisHPD95.VisHPD95(args)
356
357
 
357
- elif sys.argv[1] == 'PMSF':
358
+ elif sys.argv[1] in ['PMSF', 'pmsf']:
358
359
  from TreeSAK import PMSF
359
360
  PMSF_parser = subparsers.add_parser('PMSF', usage=PMSF.PMSF_usage)
360
361
  PMSF_parser.add_argument('-i', required=True, help='input MSA file')
@@ -456,7 +457,7 @@ if __name__ == '__main__':
456
457
  args = vars(parser.parse_args())
457
458
  ExtractMarkerSeq.ExtractMarkerSeq(args)
458
459
 
459
- elif sys.argv[1] == 'OMA':
460
+ elif sys.argv[1] in ['OMA', 'oma', 'Oma']:
460
461
  from TreeSAK import OMA
461
462
  OMA_parser = subparsers.add_parser('OMA', usage=OMA.OMA_usage)
462
463
  OMA_parser.add_argument('-i', required=True, help='genome folder')
@@ -469,7 +470,7 @@ if __name__ == '__main__':
469
470
  args = vars(parser.parse_args())
470
471
  OMA.OMA(args)
471
472
 
472
- elif sys.argv[1] == 'OMA2':
473
+ elif sys.argv[1] in ['OMA2', 'oma2', 'Oma2']:
473
474
  from TreeSAK import OMA2
474
475
  OMA2_parser = subparsers.add_parser('OMA2', usage=OMA2.OMA2_usage)
475
476
  OMA2_parser.add_argument('-i', required=True, help='OrthologousGroups.txt')
@@ -481,7 +482,7 @@ if __name__ == '__main__':
481
482
  args = vars(parser.parse_args())
482
483
  OMA2.OMA2(args)
483
484
 
484
- elif sys.argv[1] == 'ALE':
485
+ elif sys.argv[1] in ['ALE', 'ale', 'Ale']:
485
486
  from TreeSAK import ALE
486
487
  print(ALE.ALE_usage)
487
488
  exit()
@@ -575,7 +576,7 @@ if __name__ == '__main__':
575
576
  args = vars(parser.parse_args())
576
577
  AlignmentPruner.AlignmentPruner(args)
577
578
 
578
- elif sys.argv[1] == 'BMGE':
579
+ elif sys.argv[1] in ['BMGE', 'bmge']:
579
580
  from TreeSAK import BMGE
580
581
  BMGE_parser = subparsers.add_parser('BMGE', usage=BMGE.BMGE_usage)
581
582
  BMGE_parser.add_argument('-p', required=True, help='output prefix')
@@ -585,7 +586,7 @@ if __name__ == '__main__':
585
586
  args = vars(parser.parse_args())
586
587
  BMGE.BMGE(args)
587
588
 
588
- elif sys.argv[1] == 'pRTC':
589
+ elif sys.argv[1] in ['pRTC', 'prtc', 'PRTC']:
589
590
  from TreeSAK import pRTC
590
591
  pRTC_parser = subparsers.add_parser('pRTC', usage=pRTC.pRTC_usage)
591
592
  pRTC_parser.add_argument('-i', required=True, help='the file "out" generated by MCMCTree')
@@ -678,6 +679,16 @@ if __name__ == '__main__':
678
679
  args = vars(parser.parse_args())
679
680
  RootTreeGTDB220.RootTreeGTDB220(args)
680
681
 
682
+ elif sys.argv[1] in ['PB', 'Pb', 'pb']:
683
+ from TreeSAK import PB
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')
689
+ args = vars(parser.parse_args())
690
+ PB.PB(args)
691
+
681
692
  else:
682
693
  print('Unrecognized command: %s, program exited' % sys.argv[1])
683
694
  exit()
@@ -1,58 +0,0 @@
1
- import os
2
- import argparse
3
-
4
-
5
- pb_mpi_usage = '''
6
- ============================== pb_mpi example commands ==============================
7
-
8
- # Dependency: PhyloBayes-MPI
9
-
10
- export OMPI_MCA_btl=^openib
11
- TreeSAK pb_mpi -i in.phylip -p chain_name -t 12
12
-
13
- # It is a wrapper for:
14
- mpirun -np 12 pb_mpi -d in.phylip -cat -gtr -x 10 -1 -dgam 4 -s chain_name
15
-
16
- # Input MSA need to be in phylip format.
17
-
18
- # Settings used by Nina Dombrowski: -cat -gtr -x 10 -1 -dgam 4
19
- For each marker protein family, four parallel chains were run until convergence was reached,
20
- unless stated otherwise (maxdiff < 0.3; settings: bpcomp -x 25%_burnin chain1 chain2 chain3 chain4).
21
- Additionally, we checked for the minimum effective size using tracecomp
22
- (minimum effective size > 50; settings: -x 25%_burnin chain1 chain2 chain3 chain4).
23
-
24
- =====================================================================================
25
- '''
26
-
27
-
28
- def pb_mpi(args):
29
-
30
- msa_in = args['i']
31
- op_prefix = args['p']
32
- num_of_threads = args['t']
33
-
34
- dombrowski_settings = '-cat -gtr -x 10 -1 -dgam 4'
35
-
36
- pb_mpi_cmd = 'mpirun -np %s pb_mpi -d %s %s -s %s' % (num_of_threads, msa_in, dombrowski_settings, op_prefix)
37
- print(pb_mpi_cmd)
38
- os.system(pb_mpi_cmd)
39
-
40
-
41
- if __name__ == '__main__':
42
-
43
- parser = argparse.ArgumentParser()
44
- parser.add_argument('-i', required=True, help='input MSA file')
45
- parser.add_argument('-p', required=True, help='output prefix')
46
- parser.add_argument('-t', required=False, type=int, default=2, help='num of threads')
47
- args = vars(parser.parse_args())
48
- pb_mpi(args)
49
-
50
-
51
- '''
52
-
53
- export OMPI_MCA_btl=^openib
54
- cd /scratch/PI/ocessongwz/Sponge_2023_12_01/MarkerRef2Tree_marker_set_4/s08_iqtree_wd/pb_test
55
- mpirun -np 12 pb_mpi -d marker_pa85_pruner0.BMGE.phylip -cat -gtr -x 10 -1 -dgam 4 -s chain_test
56
-
57
- '''
58
-
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