TreeSAK 1.42.2__tar.gz → 1.42.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.
- {TreeSAK-1.42.2/TreeSAK.egg-info → TreeSAK-1.42.4}/PKG-INFO +2 -2
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/ALE2.py +25 -24
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/VERSION +1 -1
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/compare_trees.py +4 -6
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/dating.py +32 -28
- {TreeSAK-1.42.2 → TreeSAK-1.42.4/TreeSAK.egg-info}/PKG-INFO +2 -2
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/bin/TreeSAK +5 -4
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/LICENSE +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/MANIFEST.in +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/README.md +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/ALE.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/ALE1.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/ALE2RTC.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/ALE3.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/ALE4.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/ALE5.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/ALE6.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/ALE_backup.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/AssessCVG.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/AssessMarker.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/AssessMarkerDeltaLL.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/AssessMarkerPA.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/AssessPB.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/BMGE.jar +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/BMGE.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/CompareMCMC.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/ConcateMSA.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/ConvertMSA.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/Dir.rb +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/ExtractMarkerSeq.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/FastRoot.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/FastRoot_backup.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/GTDB_tree.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/KEGG_Luo17.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/LcaToLeaves.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/MarkerRef2Tree.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/MarkerRef2Tree_backup.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/MarkerSeq2Tree.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/ModifyTopo.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/Newick_tree_plotter.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/OMA.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/OMA2.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/OneLineAln.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/PB.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/PMSF.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/PhyloBiAssoc.R +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/PhyloBiAssoc.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/PlotMCMC.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/PlotMcmcNode.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/RootTree.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/RootTreeGTDB214.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/RootTreeGTDB220.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/SequentialDating.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/SingleAleHGT.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/SingleLinePhy.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/SliceMSA.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/SplitScore.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/SplitScore1.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/SplitScore1OMA.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/SplitScore2.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/TaxaCountStats.R +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/TaxonTree.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/TreeSAK_config.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/VisHPD95.R +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/VisHPD95.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/__init__.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/ale_parser.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/ale_splitter.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/alignment_pruner.pl +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/aster.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/catfasta2phy.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/compare_trees.R +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/dating_ss.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/deltall.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/do_rrtc.rb +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/fa2phy.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/format_leaf_name.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/gap_stats.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/get_SCG_tree.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/get_arCOG_seq.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/global_functions.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/iTOL.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/keep_highest_rrtc.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/label_tree.R +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/label_tree.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/mad.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/mcmc2tree.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/mcmcTC.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/merge_pdf.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/pRTC.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/plot_distruibution_th.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/prep_mcmctree_ctl.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/print_leaves.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/pruneMSA.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/recode.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/rename_leaves.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/replace_clade.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/root_with_out_group.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/run_TaxaCountStats_R_s1.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/subsample_drep_gnms.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/subset.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/subset_tree_stupid_old_way.py +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK/weighted_rand.rb +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK.egg-info/SOURCES.txt +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK.egg-info/dependency_links.txt +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK.egg-info/requires.txt +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/TreeSAK.egg-info/top_level.txt +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/setup.cfg +0 -0
- {TreeSAK-1.42.2 → TreeSAK-1.42.4}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: TreeSAK
|
|
3
|
-
Version: 1.42.
|
|
3
|
+
Version: 1.42.4
|
|
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.
|
|
27
|
+
TreeSAK v1.42.4
|
|
@@ -6,7 +6,7 @@ import multiprocessing as mp
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
ALE2_usage = '''
|
|
9
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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' %
|
|
79
|
+
run_ale_cmds_txt = '%s_cmds.txt' % ale2_op_dir
|
|
78
80
|
|
|
79
|
-
ufboot_file_re = '%s/*.ufboot' %
|
|
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
|
|
88
|
-
gnm_tree_leaf_rename_txt
|
|
89
|
-
gnm_tree_no_underscore_in_wd
|
|
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
|
|
93
|
+
# create ale2_op_dir
|
|
92
94
|
if force_create_ale_wd is True:
|
|
93
|
-
if os.path.isdir(
|
|
94
|
-
os.system('rm -r %s' %
|
|
95
|
-
os.system('mkdir %s' %
|
|
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' % (
|
|
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
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
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
|
|
129
|
-
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(
|
|
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()
|
|
@@ -7,13 +7,13 @@ from TreeSAK.TreeSAK_config import config_dict
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
compare_trees_usage = '''
|
|
10
|
-
|
|
10
|
+
==================== compare_trees example command ====================
|
|
11
11
|
|
|
12
12
|
module load R/3.5.3
|
|
13
|
-
|
|
14
|
-
|
|
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
|
-
|
|
8
|
+
========================== dating example commands ==========================
|
|
9
9
|
|
|
10
10
|
# Requirement: PAML
|
|
11
11
|
|
|
12
|
-
TreeSAK dating -tree tree
|
|
12
|
+
TreeSAK dating -tree gnm.tree -msa marker.phy -p topo1 -o dating_wd -f
|
|
13
|
+
TreeSAK dating -tree gnm.tree -msa marker.phy -p topo2 -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'])
|
|
@@ -129,10 +133,10 @@ def dating(args):
|
|
|
129
133
|
tree_f_name, tree_f_path, tree_f_base, tree_f_ext = sep_path_basename_ext(tree_file)
|
|
130
134
|
msa_f_name, msa_f_path, msa_f_base, msa_f_ext = sep_path_basename_ext(msa_file)
|
|
131
135
|
|
|
132
|
-
get_bv_wd = '%s/get_bv_wd'
|
|
133
|
-
mcmctree_ctl_bv = '%s/mcmctree.ctl'
|
|
134
|
-
get_BV_cmd_txt = '%s/get_BV_cmd.txt'
|
|
135
|
-
dating_cmds_txt = '%s/dating_cmds.txt'
|
|
136
|
+
get_bv_wd = '%s/get_bv_wd' % op_dir
|
|
137
|
+
mcmctree_ctl_bv = '%s/mcmctree.ctl' % get_bv_wd
|
|
138
|
+
get_BV_cmd_txt = '%s/get_BV_cmd.txt' % get_bv_wd
|
|
139
|
+
dating_cmds_txt = '%s/dating_cmds.txt' % op_dir
|
|
136
140
|
|
|
137
141
|
# create output folder
|
|
138
142
|
if os.path.isdir(op_dir) is True:
|
|
@@ -203,11 +207,8 @@ def dating(args):
|
|
|
203
207
|
current_para_dict_run1 = para_comb_dict[para_comb]
|
|
204
208
|
current_para_dict_run1['seqfile'] = msa_f_name
|
|
205
209
|
current_para_dict_run1['treefile'] = tree_f_name
|
|
206
|
-
current_para_dict_run1['mcmcfile'] = '%
|
|
207
|
-
current_para_dict_run1['outfile'] = '%
|
|
208
|
-
if op_prefix != '':
|
|
209
|
-
current_para_dict_run1['mcmcfile'] = '%s_%s_mcmc_run1.txt' % (op_prefix, para_comb)
|
|
210
|
-
current_para_dict_run1['outfile'] = '%s_%s_out_run1.txt' % (op_prefix, para_comb)
|
|
210
|
+
current_para_dict_run1['mcmcfile'] = '%s_%s_mcmc_run1.txt' % (op_prefix, para_comb)
|
|
211
|
+
current_para_dict_run1['outfile'] = '%s_%s_out_run1.txt' % (op_prefix, para_comb)
|
|
211
212
|
current_para_dict_run1['seqtype'] = seq_type
|
|
212
213
|
current_para_dict_run1['usedata'] = '2'
|
|
213
214
|
|
|
@@ -215,11 +216,8 @@ def dating(args):
|
|
|
215
216
|
current_para_dict_run2 = para_comb_dict[para_comb]
|
|
216
217
|
current_para_dict_run2['seqfile'] = msa_f_name
|
|
217
218
|
current_para_dict_run2['treefile'] = tree_f_name
|
|
218
|
-
current_para_dict_run2['mcmcfile'] = '%
|
|
219
|
-
current_para_dict_run2['outfile'] = '%
|
|
220
|
-
if op_prefix != '':
|
|
221
|
-
current_para_dict_run2['mcmcfile'] = '%s_%s_mcmc_run2.txt' % (op_prefix, para_comb)
|
|
222
|
-
current_para_dict_run2['outfile'] = '%s_%s_out_run2.txt' % (op_prefix, para_comb)
|
|
219
|
+
current_para_dict_run2['mcmcfile'] = '%s_%s_mcmc_run2.txt' % (op_prefix, para_comb)
|
|
220
|
+
current_para_dict_run2['outfile'] = '%s_%s_out_run2.txt' % (op_prefix, para_comb)
|
|
223
221
|
current_para_dict_run2['seqtype'] = seq_type
|
|
224
222
|
current_para_dict_run2['usedata'] = '2'
|
|
225
223
|
|
|
@@ -231,8 +229,13 @@ def dating(args):
|
|
|
231
229
|
os.system('cp %s/out.BV %s/in.BV' % (get_bv_wd, current_dating_wd_2))
|
|
232
230
|
|
|
233
231
|
# write out commands
|
|
234
|
-
|
|
235
|
-
|
|
232
|
+
cmd_run_1 = 'cd %s/%s/%s; mcmctree' % (current_pwd, op_dir, current_dating_wd_1.split('/')[-1])
|
|
233
|
+
cmd_run_2 = 'cd %s/%s/%s; mcmctree' % (current_pwd, op_dir, current_dating_wd_2.split('/')[-1])
|
|
234
|
+
if wrap_with_srun is True:
|
|
235
|
+
cmd_run_1 = 'BioSAK srun -c "%s"' % cmd_run_1
|
|
236
|
+
cmd_run_2 = 'BioSAK srun -c "%s"' % cmd_run_2
|
|
237
|
+
dating_cmds_txt_handle.write(cmd_run_1 + '\n')
|
|
238
|
+
dating_cmds_txt_handle.write(cmd_run_2 + '\n')
|
|
236
239
|
dating_cmds_txt_handle.close()
|
|
237
240
|
|
|
238
241
|
print('Job script for performing dating exported to: %s' % dating_cmds_txt)
|
|
@@ -240,13 +243,14 @@ def dating(args):
|
|
|
240
243
|
|
|
241
244
|
if __name__ == '__main__':
|
|
242
245
|
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
246
|
+
dating_parser = argparse.ArgumentParser()
|
|
247
|
+
dating_parser.add_argument('-tree', required=True, help='tree file')
|
|
248
|
+
dating_parser.add_argument('-msa', required=True, help='sequence alignments')
|
|
249
|
+
dating_parser.add_argument('-o', required=True, help='output directory')
|
|
250
|
+
dating_parser.add_argument('-p', required=True, help='output prefix')
|
|
251
|
+
dating_parser.add_argument('-s', required=True, help='settings to compare')
|
|
252
|
+
dating_parser.add_argument('-st', required=False, default='2', help='sequence type, 0 for nucleotides, 1 for codons, 2 for AAs, default: 2')
|
|
253
|
+
dating_parser.add_argument('-srun', required=False, action="store_true", help='wrap commands with BioSAK srun')
|
|
254
|
+
dating_parser.add_argument('-f', required=False, action="store_true", help='force overwrite')
|
|
255
|
+
args = vars(dating_parser.parse_args())
|
|
252
256
|
dating(args)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: TreeSAK
|
|
3
|
-
Version: 1.42.
|
|
3
|
+
Version: 1.42.4
|
|
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.
|
|
27
|
+
TreeSAK v1.42.4
|
|
@@ -305,12 +305,13 @@ if __name__ == '__main__':
|
|
|
305
305
|
elif sys.argv[1] in ['Dating', 'dating']:
|
|
306
306
|
from TreeSAK import dating
|
|
307
307
|
dating_parser = subparsers.add_parser('dating', usage=dating.dating_usage)
|
|
308
|
-
dating_parser.add_argument('-tree', required=True, help='
|
|
309
|
-
dating_parser.add_argument('-msa', required=True, help='
|
|
310
|
-
dating_parser.add_argument('-o', required=True, help='
|
|
311
|
-
dating_parser.add_argument('-p', required=
|
|
308
|
+
dating_parser.add_argument('-tree', required=True, help='tree file')
|
|
309
|
+
dating_parser.add_argument('-msa', required=True, help='sequence alignments')
|
|
310
|
+
dating_parser.add_argument('-o', required=True, help='output directory')
|
|
311
|
+
dating_parser.add_argument('-p', required=True, help='output prefix')
|
|
312
312
|
dating_parser.add_argument('-s', required=True, help='settings to compare')
|
|
313
313
|
dating_parser.add_argument('-st', required=False, default='2', help='sequence type, 0 for nucleotides, 1 for codons, 2 for AAs, default: 2')
|
|
314
|
+
dating_parser.add_argument('-srun', required=False, action="store_true", help='wrap commands with BioSAK srun')
|
|
314
315
|
dating_parser.add_argument('-f', required=False, action="store_true", help='force overwrite')
|
|
315
316
|
args = vars(parser.parse_args())
|
|
316
317
|
dating.dating(args)
|
|
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
|
|
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
|