TreeSAK 1.35.3__tar.gz → 1.36.0__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.35.3/TreeSAK.egg-info → TreeSAK-1.36.0}/PKG-INFO +2 -2
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/MarkerRef2Tree.py +19 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/MarkerSeq2Tree.py +19 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/SplitScore2.py +1 -1
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/VERSION +3 -0
- TreeSAK-1.36.0/TreeSAK/gap_stats.py +38 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0/TreeSAK.egg-info}/PKG-INFO +2 -2
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK.egg-info/SOURCES.txt +1 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/bin/TreeSAK +9 -1
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/LICENSE +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/MANIFEST.in +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/README.md +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/ALE.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/ALE1.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/ALE2.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/ALE2RTC.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/ALE3.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/ALE4.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/ALE5.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/ALE6.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/ALE_backup.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/AlignmentPruner.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/AssessCVG.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/AssessMarker.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/AssessMarkerDeltaLL.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/AssessMarkerPA.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/AssessPB.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/BMGE.jar +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/BMGE.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/CompareMCMC.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/ConcateMSA.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/ConvertMSA.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/Dir.rb +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/ExtractMarkerSeq.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/FastRoot.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/FastRoot_backup.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/GTDB_tree.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/KEGG_Luo17.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/LcaToLeaves.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/MCMCtreeR.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/MarkerRef2Tree_backup.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/ModifyTopo.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/OMA.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/OMA2.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/OneLineAln.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/PB.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/PMSF.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/PhyloBiAssoc.R +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/PhyloBiAssoc.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/PlotMcmcNode.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/RootTree.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/RootTreeGTDB214.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/RootTreeGTDB220.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/SequentialDating.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/SingleAleHGT.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/SingleLinePhy.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/SliceMSA.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/SplitScore.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/SplitScore1.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/SplitScore1OMA.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/TaxaCountStats.R +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/TreeSAK_config.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/VisHPD95.R +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/VisHPD95.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/__init__.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/ale_parser.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/ale_splitter.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/compare_trees.R +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/compare_trees.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/dating.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/dating_ss.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/do_rrtc.rb +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/fa2phy.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/format_leaf_name.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/get_arCOG_seq.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/global_functions.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/merge_pdf.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/pRTC.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/parse_deltall_stdout.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/plot_distruibution_th.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/prep_mcmctree_ctl.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/print_leaves.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/rename_leaves.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/replace_clade.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/root_with_out_group.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/run_TaxaCountStats_R_s1.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/subsample_drep_gnms.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/subset.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/subset_tree_stupid_old_way.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/test_1.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/test_2.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/tmp_2.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/tmp_3.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/tmp_4.py +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK/weighted_rand.rb +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK.egg-info/dependency_links.txt +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK.egg-info/requires.txt +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/TreeSAK.egg-info/top_level.txt +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/setup.cfg +0 -0
- {TreeSAK-1.35.3 → TreeSAK-1.36.0}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: TreeSAK
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.36.0
|
|
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.
|
|
27
|
+
TreeSAK v1.36.0
|
|
@@ -290,6 +290,25 @@ def AssessMarkerPA(trimmed_aln_dir, gnm_set, group_to_gnm_dict, present_pct_cuto
|
|
|
290
290
|
print('Assessment results exported to:\n%s\n%s' % (assess_summary_1_txt, assess_summary_2_txt))
|
|
291
291
|
|
|
292
292
|
|
|
293
|
+
def get_gap_stats(msa_in_fa, stats_txt):
|
|
294
|
+
|
|
295
|
+
gap_pct_dict = dict()
|
|
296
|
+
for each_seq in SeqIO.parse(msa_in_fa, 'fasta'):
|
|
297
|
+
seq_id = each_seq.id
|
|
298
|
+
seq_str = str(each_seq.seq)
|
|
299
|
+
gap_pct = seq_str.count('-')*100/len(seq_str)
|
|
300
|
+
gap_pct = float("{0:.2f}".format(gap_pct))
|
|
301
|
+
gap_pct_dict[seq_id] = gap_pct
|
|
302
|
+
|
|
303
|
+
gap_pct_sorted = sorted(gap_pct_dict.items(), key=lambda x:x[1])
|
|
304
|
+
|
|
305
|
+
stats_txt_handle = open(stats_txt, 'w')
|
|
306
|
+
stats_txt_handle.write('Sequence\tGap\n')
|
|
307
|
+
for each_seq in gap_pct_sorted:
|
|
308
|
+
stats_txt_handle.write('%s\t%s\n' % (each_seq[0], each_seq[1]))
|
|
309
|
+
stats_txt_handle.close()
|
|
310
|
+
|
|
311
|
+
|
|
293
312
|
def MarkerRef2Tree(args):
|
|
294
313
|
|
|
295
314
|
faa_file_dir = args['i']
|
|
@@ -94,6 +94,25 @@ def catfasta2phy(msa_dir, msa_ext, concatenated_msa_phy, partition_file):
|
|
|
94
94
|
AlignIO.convert(concatenated_msa_fasta, 'fasta', concatenated_msa_phy, 'phylip-relaxed')
|
|
95
95
|
|
|
96
96
|
|
|
97
|
+
def get_gap_stats(msa_in_fa, stats_txt):
|
|
98
|
+
|
|
99
|
+
gap_pct_dict = dict()
|
|
100
|
+
for each_seq in SeqIO.parse(msa_in_fa, 'fasta'):
|
|
101
|
+
seq_id = each_seq.id
|
|
102
|
+
seq_str = str(each_seq.seq)
|
|
103
|
+
gap_pct = seq_str.count('-')*100/len(seq_str)
|
|
104
|
+
gap_pct = float("{0:.2f}".format(gap_pct))
|
|
105
|
+
gap_pct_dict[seq_id] = gap_pct
|
|
106
|
+
|
|
107
|
+
gap_pct_sorted = sorted(gap_pct_dict.items(), key=lambda x:x[1])
|
|
108
|
+
|
|
109
|
+
stats_txt_handle = open(stats_txt, 'w')
|
|
110
|
+
stats_txt_handle.write('Sequence\tGap\n')
|
|
111
|
+
for each_seq in gap_pct_sorted:
|
|
112
|
+
stats_txt_handle.write('%s\t%s\n' % (each_seq[0], each_seq[1]))
|
|
113
|
+
stats_txt_handle.close()
|
|
114
|
+
|
|
115
|
+
|
|
97
116
|
def MarkerSeq2Tree(args):
|
|
98
117
|
|
|
99
118
|
marker_seq_dir = args['i']
|
|
@@ -586,7 +586,7 @@ def SplitScore2(args):
|
|
|
586
586
|
exit()
|
|
587
587
|
os.mkdir(step_2_op_dir)
|
|
588
588
|
|
|
589
|
-
print('Counting sister taxa')
|
|
589
|
+
print('Counting sister taxa with %s cores' % num_of_threads)
|
|
590
590
|
run_count_sister_taxa(gtdb_classification_txt, contree_ufboot_shared_sorted, qualified_og_seq_dir, qualified_og_seq_dir, gnm_group_txt, target_label, num_of_threads, count_sister_taxa_op_dir, force_overwrite)
|
|
591
591
|
|
|
592
592
|
print('Summarising sister taxa')
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import argparse
|
|
2
|
+
from Bio import SeqIO
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
gap_stats_usage = '''
|
|
6
|
+
======= gap_stats example commands =======
|
|
7
|
+
|
|
8
|
+
TreeSAK gap_stats -i msa.fasta
|
|
9
|
+
|
|
10
|
+
==========================================
|
|
11
|
+
'''
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def gap_stats(args):
|
|
15
|
+
|
|
16
|
+
msa_in_fa = args['i']
|
|
17
|
+
|
|
18
|
+
gap_pct_dict = dict()
|
|
19
|
+
for each_seq in SeqIO.parse(msa_in_fa, 'fasta'):
|
|
20
|
+
seq_id = each_seq.id
|
|
21
|
+
seq_str = str(each_seq.seq)
|
|
22
|
+
gap_pct = seq_str.count('-')*100/len(seq_str)
|
|
23
|
+
gap_pct = float("{0:.2f}".format(gap_pct))
|
|
24
|
+
gap_pct_dict[seq_id] = gap_pct
|
|
25
|
+
|
|
26
|
+
gap_pct_sorted = sorted(gap_pct_dict.items(), key=lambda x: x[1])
|
|
27
|
+
|
|
28
|
+
print('Sequence\tGap')
|
|
29
|
+
for each_seq in gap_pct_sorted:
|
|
30
|
+
print('%s\t%s' % (each_seq[0], each_seq[1]))
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
if __name__ == '__main__':
|
|
34
|
+
|
|
35
|
+
gap_stats_parser = argparse.ArgumentParser()
|
|
36
|
+
gap_stats_parser.add_argument('-i', required=True, help='MSA in fasta format')
|
|
37
|
+
args = vars(gap_stats_parser.parse_args())
|
|
38
|
+
gap_stats(args)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: TreeSAK
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.36.0
|
|
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.
|
|
27
|
+
TreeSAK v1.36.0
|
|
@@ -52,6 +52,7 @@ def print_main_help():
|
|
|
52
52
|
SingleLinePhy -> Put sequences in single line in phylip format
|
|
53
53
|
AlignmentPruner -> Remove heterogenous sites from MSA
|
|
54
54
|
CS_trim -> (to be added) perform chi-squared trimming to reduce compositional heterogeneity
|
|
55
|
+
gap_stats -> The percentage of gap in each sequence of a MSA
|
|
55
56
|
|
|
56
57
|
Tree-related
|
|
57
58
|
PB -> Infer tree with PhyloBayes-MPI
|
|
@@ -88,7 +89,7 @@ def print_main_help():
|
|
|
88
89
|
Phylo-related stats
|
|
89
90
|
PhyloBiAssoc -> A wrapper for binaryPGLMM test
|
|
90
91
|
|
|
91
|
-
# Upgrade with
|
|
92
|
+
# Upgrade with: pip3 install --upgrade TreeSAK
|
|
92
93
|
''' % version(config_dict)
|
|
93
94
|
|
|
94
95
|
print(help_message)
|
|
@@ -706,6 +707,13 @@ if __name__ == '__main__':
|
|
|
706
707
|
args = vars(parser.parse_args())
|
|
707
708
|
AssessPB.AssessPB(args)
|
|
708
709
|
|
|
710
|
+
elif sys.argv[1] == 'gap_stats':
|
|
711
|
+
from TreeSAK import gap_stats
|
|
712
|
+
gap_stats_parser = subparsers.add_parser('gap_stats', usage=gap_stats.gap_stats_usage)
|
|
713
|
+
gap_stats_parser.add_argument('-i', required=True, help='MSA in fasta format')
|
|
714
|
+
args = vars(parser.parse_args())
|
|
715
|
+
gap_stats.gap_stats(args)
|
|
716
|
+
|
|
709
717
|
else:
|
|
710
718
|
print('Unrecognized command: %s, program exited' % sys.argv[1])
|
|
711
719
|
exit()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|