TreeSAK 1.42.2__tar.gz → 1.42.3__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 (109) hide show
  1. {TreeSAK-1.42.2/TreeSAK.egg-info → TreeSAK-1.42.3}/PKG-INFO +2 -2
  2. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/ALE2.py +25 -24
  3. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/VERSION +1 -1
  4. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/compare_trees.py +4 -6
  5. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/dating.py +15 -5
  6. {TreeSAK-1.42.2 → TreeSAK-1.42.3/TreeSAK.egg-info}/PKG-INFO +2 -2
  7. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/LICENSE +0 -0
  8. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/MANIFEST.in +0 -0
  9. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/README.md +0 -0
  10. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/ALE.py +0 -0
  11. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/ALE1.py +0 -0
  12. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/ALE2RTC.py +0 -0
  13. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/ALE3.py +0 -0
  14. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/ALE4.py +0 -0
  15. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/ALE5.py +0 -0
  16. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/ALE6.py +0 -0
  17. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/ALE_backup.py +0 -0
  18. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/AssessCVG.py +0 -0
  19. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/AssessMarker.py +0 -0
  20. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/AssessMarkerDeltaLL.py +0 -0
  21. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/AssessMarkerPA.py +0 -0
  22. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/AssessPB.py +0 -0
  23. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/BMGE.jar +0 -0
  24. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/BMGE.py +0 -0
  25. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/CompareMCMC.py +0 -0
  26. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/ConcateMSA.py +0 -0
  27. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/ConvertMSA.py +0 -0
  28. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/Dir.rb +0 -0
  29. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/ExtractMarkerSeq.py +0 -0
  30. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/FastRoot.py +0 -0
  31. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/FastRoot_backup.py +0 -0
  32. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/GTDB_tree.py +0 -0
  33. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/KEGG_Luo17.py +0 -0
  34. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/LcaToLeaves.py +0 -0
  35. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/MarkerRef2Tree.py +0 -0
  36. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/MarkerRef2Tree_backup.py +0 -0
  37. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/MarkerSeq2Tree.py +0 -0
  38. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/ModifyTopo.py +0 -0
  39. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/Newick_tree_plotter.py +0 -0
  40. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/OMA.py +0 -0
  41. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/OMA2.py +0 -0
  42. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/OneLineAln.py +0 -0
  43. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/PB.py +0 -0
  44. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/PMSF.py +0 -0
  45. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/PhyloBiAssoc.R +0 -0
  46. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/PhyloBiAssoc.py +0 -0
  47. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/PlotMCMC.py +0 -0
  48. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/PlotMcmcNode.py +0 -0
  49. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/RootTree.py +0 -0
  50. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/RootTreeGTDB214.py +0 -0
  51. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/RootTreeGTDB220.py +0 -0
  52. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/SequentialDating.py +0 -0
  53. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/SingleAleHGT.py +0 -0
  54. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/SingleLinePhy.py +0 -0
  55. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/SliceMSA.py +0 -0
  56. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/SplitScore.py +0 -0
  57. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/SplitScore1.py +0 -0
  58. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/SplitScore1OMA.py +0 -0
  59. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/SplitScore2.py +0 -0
  60. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/TaxaCountStats.R +0 -0
  61. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/TaxonTree.py +0 -0
  62. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/TreeSAK_config.py +0 -0
  63. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/VisHPD95.R +0 -0
  64. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/VisHPD95.py +0 -0
  65. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/__init__.py +0 -0
  66. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/ale_parser.py +0 -0
  67. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/ale_splitter.py +0 -0
  68. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/alignment_pruner.pl +0 -0
  69. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/aster.py +0 -0
  70. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/catfasta2phy.py +0 -0
  71. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/compare_trees.R +0 -0
  72. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/dating_ss.py +0 -0
  73. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/deltall.py +0 -0
  74. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/do_rrtc.rb +0 -0
  75. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/fa2phy.py +0 -0
  76. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/format_leaf_name.py +0 -0
  77. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/gap_stats.py +0 -0
  78. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/get_SCG_tree.py +0 -0
  79. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/get_arCOG_seq.py +0 -0
  80. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/global_functions.py +0 -0
  81. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/iTOL.py +0 -0
  82. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/keep_highest_rrtc.py +0 -0
  83. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/label_tree.R +0 -0
  84. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/label_tree.py +0 -0
  85. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/mad.py +0 -0
  86. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/mcmc2tree.py +0 -0
  87. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/mcmcTC.py +0 -0
  88. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/merge_pdf.py +0 -0
  89. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/pRTC.py +0 -0
  90. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/plot_distruibution_th.py +0 -0
  91. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/prep_mcmctree_ctl.py +0 -0
  92. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/print_leaves.py +0 -0
  93. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/pruneMSA.py +0 -0
  94. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/recode.py +0 -0
  95. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/rename_leaves.py +0 -0
  96. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/replace_clade.py +0 -0
  97. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/root_with_out_group.py +0 -0
  98. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/run_TaxaCountStats_R_s1.py +0 -0
  99. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/subsample_drep_gnms.py +0 -0
  100. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/subset.py +0 -0
  101. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/subset_tree_stupid_old_way.py +0 -0
  102. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK/weighted_rand.rb +0 -0
  103. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK.egg-info/SOURCES.txt +0 -0
  104. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK.egg-info/dependency_links.txt +0 -0
  105. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK.egg-info/requires.txt +0 -0
  106. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/TreeSAK.egg-info/top_level.txt +0 -0
  107. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/bin/TreeSAK +0 -0
  108. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/setup.cfg +0 -0
  109. {TreeSAK-1.42.2 → TreeSAK-1.42.3}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: TreeSAK
3
- Version: 1.42.2
3
+ Version: 1.42.3
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.42.2
27
+ TreeSAK v1.42.3
@@ -6,7 +6,7 @@ import multiprocessing as mp
6
6
 
7
7
 
8
8
  ALE2_usage = '''
9
- ========================= ALE2 example commands =========================
9
+ ============================================ ALE2 example commands ===========================================
10
10
 
11
11
  TreeSAK ALE2 -1 ALE1_op_dir -s genome.treefile -t 10 -f -runALE -docker gregmich/alesuite_new -o ALE2_op_dir
12
12
 
@@ -16,7 +16,9 @@ Genome names should NOT contain "_", the program will tackle this automatically.
16
16
  # You can try to add this while building the docker images
17
17
  --platform linux/arm64/v8
18
18
 
19
- =========================================================================
19
+ # Only the ufboot files in ALE1_op_dir will be needed in this step.
20
+
21
+ ===============================================================================================================
20
22
  '''
21
23
 
22
24
 
@@ -67,16 +69,16 @@ def prepare_ale_ip_worker(arg_list):
67
69
 
68
70
  def ALE2(args):
69
71
 
70
- gene_tree_dir = args['1']
72
+ ale1_op_dir = args['1']
71
73
  genome_tree_file_rooted = args['s']
72
74
  force_create_ale_wd = args['f']
73
75
  num_threads = args['t']
74
- ale_wd = args['o']
76
+ ale2_op_dir = args['o']
75
77
  run_ale = args['runALE']
76
78
  docker_image = args['docker']
77
- run_ale_cmds_txt = '%s_cmds.txt' % ale_wd
79
+ run_ale_cmds_txt = '%s_cmds.txt' % ale2_op_dir
78
80
 
79
- ufboot_file_re = '%s/*.ufboot' % gene_tree_dir
81
+ ufboot_file_re = '%s/*.ufboot' % ale1_op_dir
80
82
  ufboot_file_list = glob.glob(ufboot_file_re)
81
83
  og_to_process_list = []
82
84
  for each_ufboot in ufboot_file_list:
@@ -84,15 +86,15 @@ def ALE2(args):
84
86
  og_to_process_list.append(ufboot_base)
85
87
 
86
88
  # define file name
87
- gnm_tree_no_underscore = 'genome_tree.newick'
88
- gnm_tree_leaf_rename_txt = 'genome_tree_leaf_rename.txt'
89
- gnm_tree_no_underscore_in_wd = '%s/%s' % (ale_wd, gnm_tree_no_underscore)
89
+ gnm_tree_no_underscore = 'genome_tree.newick'
90
+ gnm_tree_leaf_rename_txt = 'genome_tree_leaf_rename.txt'
91
+ gnm_tree_no_underscore_in_wd = '%s/%s' % (ale2_op_dir, gnm_tree_no_underscore)
90
92
 
91
- # create ale_wd
93
+ # create ale2_op_dir
92
94
  if force_create_ale_wd is True:
93
- if os.path.isdir(ale_wd) is True:
94
- os.system('rm -r %s' % ale_wd)
95
- os.system('mkdir %s' % ale_wd)
95
+ if os.path.isdir(ale2_op_dir) is True:
96
+ os.system('rm -r %s' % ale2_op_dir)
97
+ os.system('mkdir %s' % ale2_op_dir)
96
98
 
97
99
  # prepare genome tree for running ALE
98
100
  gnm_tree_leaf_rename_txt_handle = open(gnm_tree_leaf_rename_txt, 'w')
@@ -113,20 +115,19 @@ def ALE2(args):
113
115
  prepare_ale_ip_worker_arg_lol = []
114
116
  ale_cmd_list = []
115
117
  for qualified_og in og_to_process_list:
116
- pwd_gene_tree_ufboot = '%s/%s.ufboot' % (gene_tree_dir, qualified_og)
118
+ pwd_gene_tree_ufboot = '%s/%s.ufboot' % (ale1_op_dir, qualified_og)
117
119
  if os.path.isfile(pwd_gene_tree_ufboot) is False:
118
120
  print('%s not found, please build gene tree first!' % pwd_gene_tree_ufboot)
119
121
  else:
120
- gene_tree_ufboot = '%s.ufboot' % qualified_og
121
- ALEobserve_stdout = '%s.ALEobserve.log' % qualified_og
122
- ALEml_undated_stdout = '%s.ALEml_undated.log' % qualified_og
123
- pwd_gene_tree_ufboot_in = '%s/%s' % (gene_tree_dir, gene_tree_ufboot)
124
- pwd_gene_tree_ufboot_out = '%s/%s' % (ale_wd, gene_tree_ufboot)
125
- obtain_ale_file_cmd = 'ALEobserve %s > %s' % (gene_tree_ufboot, ALEobserve_stdout)
126
- reconciliation_cmd = 'ALEml_undated %s %s.ufboot.ale > %s' % (gnm_tree_no_underscore, qualified_og, ALEml_undated_stdout)
122
+ pwd_gene_tree_ufboot_in = '%s/%s.ufboot' % (ale1_op_dir, qualified_og)
123
+ pwd_gene_tree_ufboot_out = '%s/%s.ufboot' % (ale2_op_dir, qualified_og)
124
+
125
+ # get commands for ALEobserve and ALEml_undated
126
+ obtain_ale_file_cmd = 'ALEobserve %s.ufboot > %s.ALEobserve.log' % (qualified_og, qualified_og)
127
+ reconciliation_cmd = 'ALEml_undated %s %s.ufboot.ale > %s.ALEml_undated.log' % (gnm_tree_no_underscore, qualified_og, qualified_og)
127
128
  if docker_image is not None:
128
- obtain_ale_file_cmd = 'docker run -v $PWD:$PWD -w $PWD %s %s' % (docker_image, obtain_ale_file_cmd)
129
- reconciliation_cmd = 'docker run -v $PWD:$PWD -w $PWD %s %s' % (docker_image, reconciliation_cmd)
129
+ obtain_ale_file_cmd = 'docker run -v $PWD:$PWD -w $PWD %s %s' % (docker_image, obtain_ale_file_cmd)
130
+ reconciliation_cmd = 'docker run -v $PWD:$PWD -w $PWD %s %s' % (docker_image, reconciliation_cmd)
130
131
 
131
132
  current_arg_list = [pwd_gene_tree_ufboot_in, pwd_gene_tree_ufboot_out]
132
133
  run_ale_cmds_txt_handle.write('%s; %s\n' % (obtain_ale_file_cmd, reconciliation_cmd))
@@ -144,7 +145,7 @@ def ALE2(args):
144
145
  # run ALE
145
146
  if run_ale is True:
146
147
  print('running ALE with %s cores for %s OGs' % (num_threads, len(prepare_ale_ip_worker_arg_lol)))
147
- os.chdir(ale_wd)
148
+ os.chdir(ale2_op_dir)
148
149
  pool = mp.Pool(processes=num_threads)
149
150
  pool.map(os.system, ale_cmd_list)
150
151
  pool.close()
@@ -1,4 +1,4 @@
1
- 1.42.2
1
+ 1.42.3
2
2
  - fixed bugs
3
3
 
4
4
  1.42.0
@@ -7,13 +7,13 @@ from TreeSAK.TreeSAK_config import config_dict
7
7
 
8
8
 
9
9
  compare_trees_usage = '''
10
- ================ compare_trees example command ================
10
+ ==================== compare_trees example command ====================
11
11
 
12
12
  module load R/3.5.3
13
- BioSAK compare_trees -t1 tree_1.newick -t2 tree_2.newick
14
- BioSAK compare_trees -t1 tree_dir -t2 tree_dir -tx newick -dm -t 12
13
+ TreeSAK compare_trees -t1 tree_1.newick -t2 tree_2.newick
14
+ TreeSAK compare_trees -t1 tree_dir -t2 tree_dir -tx newick -dm -t 12
15
15
 
16
- ===============================================================
16
+ =======================================================================
17
17
  '''
18
18
 
19
19
 
@@ -159,7 +159,6 @@ def compare_trees_worker(arg_list):
159
159
  def compare_trees(args):
160
160
 
161
161
  compare_trees_R = config_dict['compare_trees_R']
162
- #output_prefix = args['p']
163
162
  tree_file_1 = args['t1']
164
163
  tree_file_2 = args['t2']
165
164
  tree_file_ext = args['tx']
@@ -230,7 +229,6 @@ def compare_trees(args):
230
229
  if __name__ == '__main__':
231
230
 
232
231
  compare_trees_parser = argparse.ArgumentParser(usage=compare_trees_usage)
233
- #compare_trees_parser.add_argument('-p', required=True, help='output prefix')
234
232
  compare_trees_parser.add_argument('-t1', required=True, help='tree (folder) 1')
235
233
  compare_trees_parser.add_argument('-t2', required=True, help='tree (folder) 2')
236
234
  compare_trees_parser.add_argument('-tx', required=False, default='newick', help='extention of tree files, default: newick')
@@ -5,15 +5,17 @@ from distutils.spawn import find_executable
5
5
 
6
6
 
7
7
  dating_usage = '''
8
- ========================= dating example commands =========================
8
+ ====================== dating example commands ======================
9
9
 
10
10
  # Requirement: PAML
11
11
 
12
- TreeSAK dating -tree tree.treefile -msa markers.phylip -o dating_wd -f
12
+ TreeSAK dating -tree gnm.tree -msa marker.phy -o dating_wd -f
13
+ TreeSAK dating -tree gnm.tree -msa marker.phy -o dating_wd -f -srun
13
14
 
14
- ===========================================================================
15
+ =====================================================================
15
16
  '''
16
17
 
18
+
17
19
  def check_dependencies(program_list):
18
20
 
19
21
  # check whether executables exist
@@ -27,6 +29,7 @@ def check_dependencies(program_list):
27
29
  print('%s not found, program exited!' % ','.join(not_detected_programs))
28
30
  exit()
29
31
 
32
+
30
33
  def sep_path_basename_ext(file_in):
31
34
 
32
35
  f_path, f_name = os.path.split(file_in)
@@ -112,6 +115,7 @@ def dating(args):
112
115
  op_prefix = args['p']
113
116
  seq_type = args['st']
114
117
  settings_to_compare = args['s']
118
+ wrap_with_srun = args['srun']
115
119
  force_overwrite = args['f']
116
120
 
117
121
  check_dependencies(['mcmctree'])
@@ -231,8 +235,13 @@ def dating(args):
231
235
  os.system('cp %s/out.BV %s/in.BV' % (get_bv_wd, current_dating_wd_2))
232
236
 
233
237
  # write out commands
234
- dating_cmds_txt_handle.write('cd %s/%s/%s; mcmctree\n' % (current_pwd, op_dir, current_dating_wd_1.split('/')[-1]))
235
- dating_cmds_txt_handle.write('cd %s/%s/%s; mcmctree\n' % (current_pwd, op_dir, current_dating_wd_2.split('/')[-1]))
238
+ cmd_run_1 = 'cd %s/%s/%s; mcmctree' % (current_pwd, op_dir, current_dating_wd_1.split('/')[-1])
239
+ cmd_run_2 = 'cd %s/%s/%s; mcmctree' % (current_pwd, op_dir, current_dating_wd_2.split('/')[-1])
240
+ if wrap_with_srun is True:
241
+ cmd_run_1 = 'BioSAK srun -c "%s"' % cmd_run_1
242
+ cmd_run_2 = 'BioSAK srun -c "%s"' % cmd_run_2
243
+ dating_cmds_txt_handle.write(cmd_run_1 + '\n')
244
+ dating_cmds_txt_handle.write(cmd_run_2 + '\n')
236
245
  dating_cmds_txt_handle.close()
237
246
 
238
247
  print('Job script for performing dating exported to: %s' % dating_cmds_txt)
@@ -247,6 +256,7 @@ if __name__ == '__main__':
247
256
  parser.add_argument('-p', required=False, default='', help='output prefix')
248
257
  parser.add_argument('-s', required=True, help='settings to compare')
249
258
  parser.add_argument('-st', required=False, default='2', help='sequence type, 0 for nucleotides, 1 for codons, 2 for AAs, default: 2')
259
+ parser.add_argument('-srun', required=False, action="store_true", help='wrap commands with BioSAK srun')
250
260
  parser.add_argument('-f', required=False, action="store_true", help='force overwrite')
251
261
  args = vars(parser.parse_args())
252
262
  dating(args)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: TreeSAK
3
- Version: 1.42.2
3
+ Version: 1.42.3
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.42.2
27
+ TreeSAK v1.42.3
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
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes