TreeSAK 1.40.4__tar.gz → 1.40.6__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.40.4/TreeSAK.egg-info → TreeSAK-1.40.6}/PKG-INFO +2 -2
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/MarkerRef2Tree.py +24 -23
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/VERSION +1 -1
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/dating.py +21 -7
- TreeSAK-1.40.6/TreeSAK/mcmctree.py +2 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/replace_clade.py +8 -8
- {TreeSAK-1.40.4 → TreeSAK-1.40.6/TreeSAK.egg-info}/PKG-INFO +2 -2
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK.egg-info/SOURCES.txt +1 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/bin/TreeSAK +6 -6
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/LICENSE +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/MANIFEST.in +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/README.md +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/ALE.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/ALE1.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/ALE2.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/ALE2RTC.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/ALE3.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/ALE4.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/ALE5.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/ALE6.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/ALE_backup.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/AssessCVG.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/AssessMarker.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/AssessMarkerDeltaLL.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/AssessMarkerPA.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/AssessPB.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/BMGE.jar +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/BMGE.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/CompareMCMC.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/ConcateMSA.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/ConvertMSA.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/Dir.rb +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/ExtractMarkerSeq.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/FastRoot.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/FastRoot_backup.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/GTDB_tree.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/KEGG_Luo17.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/LcaToLeaves.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/MCMCtreeR.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/MarkerRef2Tree_backup.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/MarkerSeq2Tree.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/ModifyTopo.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/Newick_tree_plotter.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/OMA.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/OMA2.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/OneLineAln.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/PB.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/PMSF.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/PhyloBiAssoc.R +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/PhyloBiAssoc.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/PlotMCMC.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/PlotMcmcNode.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/RootTree.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/RootTreeGTDB214.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/RootTreeGTDB220.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/SequentialDating.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/SingleAleHGT.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/SingleLinePhy.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/SliceMSA.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/SplitScore.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/SplitScore1.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/SplitScore1OMA.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/SplitScore2.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/TaxaCountStats.R +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/TaxonTree.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/TreeSAK_config.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/VisHPD95.R +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/VisHPD95.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/__init__.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/ale_parser.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/ale_splitter.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/alignment_pruner.pl +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/aster.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/catfasta2phy.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/compare_trees.R +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/compare_trees.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/dating_ss.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/deltall.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/do_rrtc.rb +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/fa2phy.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/format_leaf_name.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/gap_stats.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/get_SCG_tree.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/get_arCOG_seq.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/global_functions.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/iTOL.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/keep_highest_rrtc.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/label_tree.R +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/label_tree.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/mad.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/merge_pdf.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/pRTC.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/plot_distruibution_th.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/prep_mcmctree_ctl.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/print_leaves.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/pruneMSA.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/recode.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/rename_leaves.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/root_with_out_group.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/run_TaxaCountStats_R_s1.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/subsample_drep_gnms.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/subset.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/subset_tree_stupid_old_way.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/tmp_1.py +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK/weighted_rand.rb +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK.egg-info/dependency_links.txt +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK.egg-info/requires.txt +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/TreeSAK.egg-info/top_level.txt +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/setup.cfg +0 -0
- {TreeSAK-1.40.4 → TreeSAK-1.40.6}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: TreeSAK
|
|
3
|
-
Version: 1.40.
|
|
3
|
+
Version: 1.40.6
|
|
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.40.
|
|
27
|
+
TreeSAK v1.40.6
|
|
@@ -341,12 +341,17 @@ def MarkerRef2Tree(args):
|
|
|
341
341
|
minimal_marker_number = args['mmn']
|
|
342
342
|
run_psiblast = args['psiblast']
|
|
343
343
|
run_bmge = args['bmge']
|
|
344
|
+
trim_with_bmge = args['bmge']
|
|
344
345
|
bmge_trim_model = args['bmge_m']
|
|
345
346
|
bmge_entropy_score_cutoff = args['bmge_esc']
|
|
346
347
|
|
|
347
348
|
# check dependencies
|
|
348
349
|
check_dependencies(['java', 'psiblast', 'blastp', 'mafft-einsi', 'trimal', 'iqtree'])
|
|
349
350
|
|
|
351
|
+
# specify path to BMGE.jar
|
|
352
|
+
current_file_path = '/'.join(os.path.realpath(__file__).split('/')[:-1])
|
|
353
|
+
pwd_bmge_jar = '%s/BMGE.jar' % current_file_path
|
|
354
|
+
|
|
350
355
|
# get marker id set
|
|
351
356
|
marker_seq_re = '%s/*.%s' % (marker_seq_dir, marker_seq_ext)
|
|
352
357
|
marker_seq_list = [os.path.basename(file_name) for file_name in glob.glob(marker_seq_re)]
|
|
@@ -389,18 +394,20 @@ def MarkerRef2Tree(args):
|
|
|
389
394
|
|
|
390
395
|
############################################## check file/folder name ##############################################
|
|
391
396
|
|
|
392
|
-
blastp_cmd_txt
|
|
393
|
-
pwd_combined_protein
|
|
394
|
-
blast_op_dir
|
|
395
|
-
best_hit_id_by_marker_dir
|
|
396
|
-
best_hit_seq_by_marker_dir
|
|
397
|
-
best_hit_seq_by_marker_dir_renamed
|
|
398
|
-
best_hit_aln_by_marker_dir
|
|
399
|
-
best_hit_aln_by_marker_dir_trimmed
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
397
|
+
blastp_cmd_txt = '%s/s01_blast_cmds_%s.txt' % (op_dir, (len(marker_seq_list)*len(faa_file_list)))
|
|
398
|
+
pwd_combined_protein = '%s/combined.faa' % op_dir
|
|
399
|
+
blast_op_dir = '%s/s01_blast' % op_dir
|
|
400
|
+
best_hit_id_by_marker_dir = '%s/s02_marker_id' % op_dir
|
|
401
|
+
best_hit_seq_by_marker_dir = '%s/s03_marker_seq' % op_dir
|
|
402
|
+
best_hit_seq_by_marker_dir_renamed = '%s/s04_marker_seq_by_genome_name' % op_dir
|
|
403
|
+
best_hit_aln_by_marker_dir = '%s/s05_marker_aln' % op_dir
|
|
404
|
+
best_hit_aln_by_marker_dir_trimmed = '%s/s06_marker_aln_trimal' % op_dir
|
|
405
|
+
if trim_with_bmge is True:
|
|
406
|
+
best_hit_aln_by_marker_dir_trimmed = '%s/s06_marker_aln_BMGE' % op_dir
|
|
407
|
+
assess_marker_pa_dir = '%s/s07_assess_marker_PA' % op_dir
|
|
408
|
+
trimmed_msa_PA_concatenated_dir = '%s/s08_iqtree_wd' % op_dir
|
|
409
|
+
iqtree_dir = '%s/s08_iqtree_wd' % op_dir
|
|
410
|
+
iqtree_cmd_txt = '%s/iqtree_cmds.txt' % iqtree_dir
|
|
404
411
|
|
|
405
412
|
####################################################################################################################
|
|
406
413
|
|
|
@@ -520,13 +527,13 @@ def MarkerRef2Tree(args):
|
|
|
520
527
|
|
|
521
528
|
# run mafft-einsi
|
|
522
529
|
mafft_cmd = 'mafft-einsi --thread %s --quiet %s > %s' % (num_of_threads, marker_hits_seq_renamed, marker_hits_aln)
|
|
523
|
-
#print('running: ' + mafft_cmd)
|
|
524
530
|
os.system(mafft_cmd)
|
|
525
531
|
|
|
526
532
|
# trim msa
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
533
|
+
trim_cmd = 'trimal -in %s -out %s -automated1' % (marker_hits_aln, marker_hits_aln_trimmed)
|
|
534
|
+
if trim_with_bmge is False:
|
|
535
|
+
trim_cmd = 'java -jar %s -i %s -m %s -t AA -h %s -of %s' % (pwd_bmge_jar, marker_hits_aln, bmge_trim_model, bmge_entropy_score_cutoff, marker_hits_aln_trimmed)
|
|
536
|
+
os.system(trim_cmd)
|
|
530
537
|
|
|
531
538
|
########## Assess marker by PA ##########
|
|
532
539
|
|
|
@@ -561,10 +568,6 @@ def MarkerRef2Tree(args):
|
|
|
561
568
|
pwd_concatenated_marker_partition = '%s/marker_pa%s_partition.txt' % (trimmed_msa_PA_concatenated_dir, each_c)
|
|
562
569
|
catfasta2phy(current_cutoff_trimmed_msa_dir, 'aln', pwd_concatenated_marker_phy, pwd_concatenated_marker_fasta, pwd_concatenated_marker_partition)
|
|
563
570
|
|
|
564
|
-
if run_bmge is True:
|
|
565
|
-
bmge_op_prefix = '%s/marker_pa%s' % (trimmed_msa_PA_concatenated_dir, each_c)
|
|
566
|
-
BMGE(pwd_concatenated_marker_fasta, bmge_op_prefix, bmge_trim_model, bmge_entropy_score_cutoff)
|
|
567
|
-
|
|
568
571
|
########## get guide tree and C60+PMSF tree for each set of marker set ##########
|
|
569
572
|
|
|
570
573
|
iqtree_cmd_txt_handle = open(iqtree_cmd_txt, 'w')
|
|
@@ -574,8 +577,6 @@ def MarkerRef2Tree(args):
|
|
|
574
577
|
os.system('mkdir %s/PA%s_PMSF_C60_tree' % ((iqtree_dir, each_c)))
|
|
575
578
|
|
|
576
579
|
msa_to_use = 'marker_pa%s.fasta' % each_c
|
|
577
|
-
if run_bmge is True:
|
|
578
|
-
msa_to_use = 'marker_pa%s.BMGE.fasta' % each_c
|
|
579
580
|
|
|
580
581
|
get_guide_tree_cmd = 'iqtree2 --seqtype AA -B 1000 --alrt 1000 --quiet -T %s -s %s --prefix PA%s_guide_tree/PA%s_guide_tree -m LG' % (num_of_threads, msa_to_use, each_c, each_c)
|
|
581
582
|
get_c60_tree_cmd = 'iqtree2 --seqtype AA -B 1000 --alrt 1000 --quiet -T %s -s %s --prefix PA%s_PMSF_C60_tree/PA%s_PMSF_C60 -m LG+C60+F+G -ft PA%s_guide_tree/PA%s_guide_tree.treefile' % (num_of_threads, msa_to_use, each_c, each_c, each_c, each_c)
|
|
@@ -608,7 +609,7 @@ if __name__ == '__main__':
|
|
|
608
609
|
parser.add_argument('-t', required=True, type=int, help='num of threads')
|
|
609
610
|
parser.add_argument('-mmn', required=False, default=1, type=int, help='minimal marker number, default: 1')
|
|
610
611
|
parser.add_argument('-psiblast', required=False, action="store_true", help='run psiblast')
|
|
611
|
-
parser.add_argument('-bmge', required=False, action="store_true", help='
|
|
612
|
+
parser.add_argument('-bmge', required=False, action="store_true", help='trim MSA with BMGE, default is trimal')
|
|
612
613
|
parser.add_argument('-bmge_m', required=False, default='BLOSUM30', help='BMGE trim model, default: BLOSUM30')
|
|
613
614
|
parser.add_argument('-bmge_esc', required=False, default='0.55', help='BMGE entropy score cutoff, default: 0.55')
|
|
614
615
|
parser.add_argument('-f', required=False, action="store_true", help='force overwrite')
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import os
|
|
2
2
|
import argparse
|
|
3
3
|
import itertools
|
|
4
|
+
from distutils.spawn import find_executable
|
|
4
5
|
|
|
5
6
|
|
|
6
7
|
dating_usage = '''
|
|
7
8
|
======================== Dating example commands ========================
|
|
8
9
|
|
|
9
|
-
#
|
|
10
|
+
# Requirement: PAML
|
|
10
11
|
|
|
11
12
|
# example commands
|
|
12
13
|
TreeSAK Dating -tree tree.treefile -msa markers.phylip -o dating_wd -f
|
|
@@ -14,6 +15,18 @@ TreeSAK Dating -tree tree.treefile -msa markers.phylip -o dating_wd -f
|
|
|
14
15
|
=========================================================================
|
|
15
16
|
'''
|
|
16
17
|
|
|
18
|
+
def check_dependencies(program_list):
|
|
19
|
+
|
|
20
|
+
# check whether executables exist
|
|
21
|
+
not_detected_programs = []
|
|
22
|
+
for needed_program in program_list:
|
|
23
|
+
if find_executable(needed_program) is None:
|
|
24
|
+
not_detected_programs.append(needed_program)
|
|
25
|
+
|
|
26
|
+
# report
|
|
27
|
+
if not_detected_programs != []:
|
|
28
|
+
print('%s not found, program exited!' % ','.join(not_detected_programs))
|
|
29
|
+
exit()
|
|
17
30
|
|
|
18
31
|
def sep_path_basename_ext(file_in):
|
|
19
32
|
|
|
@@ -94,12 +107,14 @@ def get_parameter_combinations(para_to_test_dict):
|
|
|
94
107
|
|
|
95
108
|
def dating(args):
|
|
96
109
|
|
|
97
|
-
op_dir = args['o']
|
|
98
110
|
tree_file = args['tree']
|
|
99
111
|
msa_file = args['msa']
|
|
100
|
-
|
|
112
|
+
op_dir = args['o']
|
|
101
113
|
seq_type = args['st']
|
|
102
114
|
settings_to_compare = args['s']
|
|
115
|
+
force_overwrite = args['f']
|
|
116
|
+
|
|
117
|
+
check_dependencies(['mcmctree'])
|
|
103
118
|
|
|
104
119
|
para_to_test_dict = dict()
|
|
105
120
|
for each_para in open(settings_to_compare):
|
|
@@ -194,12 +209,11 @@ def dating(args):
|
|
|
194
209
|
if __name__ == '__main__':
|
|
195
210
|
|
|
196
211
|
parser = argparse.ArgumentParser()
|
|
197
|
-
parser.add_argument('-tree', required=True, help='
|
|
198
|
-
parser.add_argument('-msa', required=True, help='
|
|
199
|
-
parser.add_argument('-o', required=True, help='
|
|
212
|
+
parser.add_argument('-tree', required=True, help='tree file')
|
|
213
|
+
parser.add_argument('-msa', required=True, help='sequence alignments')
|
|
214
|
+
parser.add_argument('-o', required=True, help='output directory')
|
|
200
215
|
parser.add_argument('-s', required=True, help='settings to compare')
|
|
201
216
|
parser.add_argument('-st', required=False, default='2', help='sequence type, 0 for nucleotides, 1 for codons, 2 for AAs, default: 2')
|
|
202
217
|
parser.add_argument('-f', required=False, action="store_true", help='force overwrite')
|
|
203
218
|
args = vars(parser.parse_args())
|
|
204
219
|
dating(args)
|
|
205
|
-
|
|
@@ -3,11 +3,11 @@ from ete3 import Tree
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
replace_clade_usage = '''
|
|
6
|
-
|
|
6
|
+
===================== replace_clade example commands =====================
|
|
7
7
|
|
|
8
|
-
TreeSAK replace_clade -m main.tree -s sub.tree -l leaves.txt -o out.tree
|
|
8
|
+
TreeSAK replace_clade -m main.tree -s sub.tree -l leaves.txt -o out.tree
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
==========================================================================
|
|
11
11
|
'''
|
|
12
12
|
|
|
13
13
|
|
|
@@ -44,10 +44,10 @@ def replace_clade(args):
|
|
|
44
44
|
if __name__ == '__main__':
|
|
45
45
|
|
|
46
46
|
replace_clade_parser = argparse.ArgumentParser()
|
|
47
|
-
replace_clade_parser.add_argument('-m', required=True,
|
|
48
|
-
replace_clade_parser.add_argument('-s', required=True,
|
|
49
|
-
replace_clade_parser.add_argument('-l', required=True,
|
|
50
|
-
replace_clade_parser.add_argument('-o', required=True,
|
|
51
|
-
replace_clade_parser.add_argument('-of', required=False, default=
|
|
47
|
+
replace_clade_parser.add_argument('-m', required=True, help='main tree file')
|
|
48
|
+
replace_clade_parser.add_argument('-s', required=True, help='subtree file')
|
|
49
|
+
replace_clade_parser.add_argument('-l', required=True, help='leaves on main tree to be replaced')
|
|
50
|
+
replace_clade_parser.add_argument('-o', required=True, help='output tree')
|
|
51
|
+
replace_clade_parser.add_argument('-of', required=False, default=9, type=int, help='output tree format, default is 9')
|
|
52
52
|
args = vars(replace_clade_parser.parse_args())
|
|
53
53
|
replace_clade(args)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: TreeSAK
|
|
3
|
-
Version: 1.40.
|
|
3
|
+
Version: 1.40.6
|
|
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.40.
|
|
27
|
+
TreeSAK v1.40.6
|
|
@@ -248,7 +248,7 @@ if __name__ == '__main__':
|
|
|
248
248
|
MarkerRef2Tree_parser.add_argument('-t', required=True, type=int, help='num of threads')
|
|
249
249
|
MarkerRef2Tree_parser.add_argument('-mmn', required=False, default=1, type=int, help='minimal marker number, default: 1')
|
|
250
250
|
MarkerRef2Tree_parser.add_argument('-psiblast', required=False, action="store_true", help='run psiblast')
|
|
251
|
-
MarkerRef2Tree_parser.add_argument('-bmge', required=False, action="store_true", help='
|
|
251
|
+
MarkerRef2Tree_parser.add_argument('-bmge', required=False, action="store_true", help='trim MSA with BMGE, default is trimal')
|
|
252
252
|
MarkerRef2Tree_parser.add_argument('-bmge_m', required=False, default='BLOSUM30', help='BMGE trim model, default: BLOSUM30')
|
|
253
253
|
MarkerRef2Tree_parser.add_argument('-bmge_esc', required=False, default='0.55', help='BMGE entropy score cutoff, default: 0.55')
|
|
254
254
|
MarkerRef2Tree_parser.add_argument('-f', required=False, action="store_true", help='force overwrite')
|
|
@@ -654,11 +654,11 @@ if __name__ == '__main__':
|
|
|
654
654
|
elif sys.argv[1] == 'replace_clade':
|
|
655
655
|
from TreeSAK import replace_clade
|
|
656
656
|
replace_clade_parser = subparsers.add_parser('replace_clade', usage=replace_clade.replace_clade_usage)
|
|
657
|
-
replace_clade_parser.add_argument('-m',
|
|
658
|
-
replace_clade_parser.add_argument('-s',
|
|
659
|
-
replace_clade_parser.add_argument('-l',
|
|
660
|
-
replace_clade_parser.add_argument('-o',
|
|
661
|
-
replace_clade_parser.add_argument('-of',
|
|
657
|
+
replace_clade_parser.add_argument('-m', required=True, help='main tree file')
|
|
658
|
+
replace_clade_parser.add_argument('-s', required=True, help='subtree file')
|
|
659
|
+
replace_clade_parser.add_argument('-l', required=True, help='leaves on main tree to be replaced')
|
|
660
|
+
replace_clade_parser.add_argument('-o', required=True, help='output tree')
|
|
661
|
+
replace_clade_parser.add_argument('-of', required=False, default=9, type=int, help='output tree format, default is 9')
|
|
662
662
|
args = vars(parser.parse_args())
|
|
663
663
|
replace_clade.replace_clade(args)
|
|
664
664
|
|
|
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
|