TreeSAK 1.47.6__tar.gz → 1.47.8__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.47.6/TreeSAK.egg-info → TreeSAK-1.47.8}/PKG-INFO +2 -2
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/ALE.py +1 -1
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/GeneTree.py +2 -2
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/PlotMcmcNode.py +37 -55
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/VERSION +1 -1
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/iTOL.py +4 -1
- TreeSAK-1.47.8/TreeSAK/tmp_1.py +19 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8/TreeSAK.egg-info}/PKG-INFO +2 -2
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/bin/TreeSAK +15 -19
- TreeSAK-1.47.6/TreeSAK/tmp_1.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/LICENSE +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/MANIFEST.in +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/README.md +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/ALE1.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/ALE2.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/ALE2RTC.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/ALE3.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/ALE4.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/ALE5.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/ALE6.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/ALE7.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/ALE_backup.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/AssessCVG.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/AssessMarker.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/AssessMarkerDeltaLL.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/AssessMarkerPA.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/AssessPB.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/BMGE.jar +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/BMGE.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/CompareMCMC.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/ConcateMSA.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/ConvertMSA.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/Dir.rb +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/ExtractMarkerSeq.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/FastRoot.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/FastRoot_backup.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/FigTree.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/GTDB_tree.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/KEGG_Luo17.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/LcaToLeaves.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/MarkerRef2Tree.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/MarkerRef2Tree_backup.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/MarkerSeq2Tree.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/MarkerSeq2Tree_backup.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/ModifyTopo.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/Newick_tree_plotter.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/OMA.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/OMA2.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/OneLineAln.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/PB.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/PMSF.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/PhyloBiAssoc.R +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/PhyloBiAssoc.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/PlotMCMC.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/PlotMcmcNode_old.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/RootTree.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/RootTreeGTDB214.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/RootTreeGTDB220.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/SequentialDating.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/SingleAleHGT.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/SingleLinePhy.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/SliceMSA.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/SplitScore.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/SplitScore1.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/SplitScore1OMA.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/SplitScore2.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/TaxaCountStats.R +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/TaxonTree.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/TreeSAK_config.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/VisHPD95.R +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/VisHPD95.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/__init__.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/ale_parser.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/ale_splitter.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/alignment_pruner.pl +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/assessOG.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/catfasta2phy.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/cogTree.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/compare_trees.R +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/compare_trees.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/dating.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/dating_ss.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/deltall.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/do_rrtc.rb +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/fa2phy.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/format_leaf_name.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/gap_stats.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/get_SCG_tree.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/get_arCOG_seq.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/global_functions.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/gnm_leaves.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/iTOL_gene_tree.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/keep_highest_rrtc.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/koTree.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/label_tree.R +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/label_tree.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/mad.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/mcmc2tree.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/mcmcTC copy.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/mcmcTC.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/merge_pdf.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/pRTC.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/phy2fa.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/plot_distruibution_th.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/prep_mcmctree_ctl.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/print_leaves.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/pruneMSA.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/recode.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/remove_bias.R +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/rename_leaves.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/replace_clade.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/root_with_out_group.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/run_TaxaCountStats_R_s1.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/subsample_drep_gnms.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/subset.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/subset_tree_stupid_old_way.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/supertree.py +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK/weighted_rand.rb +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK.egg-info/SOURCES.txt +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK.egg-info/dependency_links.txt +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK.egg-info/requires.txt +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/TreeSAK.egg-info/top_level.txt +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/setup.cfg +0 -0
- {TreeSAK-1.47.6 → TreeSAK-1.47.8}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: TreeSAK
|
|
3
|
-
Version: 1.47.
|
|
3
|
+
Version: 1.47.8
|
|
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.47.
|
|
27
|
+
TreeSAK v1.47.8
|
|
@@ -5,7 +5,7 @@ ALE_usage = '''
|
|
|
5
5
|
# ALE modules
|
|
6
6
|
TreeSAK ALE1 -> Step 1: get gene tree
|
|
7
7
|
TreeSAK ALE2 -> Step 2: run ALE
|
|
8
|
-
TreeSAK ALE3 -> Step 3: parse ALE outputs (
|
|
8
|
+
TreeSAK ALE3 -> Step 3: parse ALE outputs (ancestral genome reconstruction, transfer propensity/verticality and gain/loss)
|
|
9
9
|
TreeSAK ALE4 -> Filter ALE identified HGTs
|
|
10
10
|
TreeSAK ALE5 -> Get RTC file based on ALE detected HGTs
|
|
11
11
|
TreeSAK SingleAleHGT -> Perform HGT analysis using ALE for single protein family
|
|
@@ -5,11 +5,11 @@ from distutils.spawn import find_executable
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
GeneTree_usage = '''
|
|
8
|
-
|
|
8
|
+
============= GeneTree example commands =============
|
|
9
9
|
|
|
10
10
|
TreeSAK GeneTree -i amoA.faa -o amoA_tree -t 36 -f
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
=====================================================
|
|
13
13
|
'''
|
|
14
14
|
|
|
15
15
|
|
|
@@ -10,16 +10,17 @@ PlotMcmcNode_usage = '''
|
|
|
10
10
|
|
|
11
11
|
TreeSAK PlotMcmcNode -i McmcTree_op_files -n topo123_nodes.txt -o topo123_age.pdf
|
|
12
12
|
|
|
13
|
-
# file format (-
|
|
14
|
-
# column 1: file
|
|
13
|
+
# txt file format (-i, tab separated, no header)
|
|
14
|
+
# column 1: mcmc file
|
|
15
15
|
# column 2: node id
|
|
16
|
-
# column 3: file
|
|
17
|
-
# column 4: node
|
|
18
|
-
|
|
19
|
-
topo1_clock3_mcmc
|
|
20
|
-
topo1_clock3_mcmc
|
|
21
|
-
|
|
22
|
-
topo2_clock3_mcmc t_n171
|
|
16
|
+
# column 3: mcmc file description
|
|
17
|
+
# column 4: node description
|
|
18
|
+
|
|
19
|
+
path/to/topo1_clock3_mcmc.txt t_n171 Topo1 Symbiosis_event_1
|
|
20
|
+
path/to/topo1_clock3_mcmc.txt t_n151 Topo1 Symbiosis_event_2
|
|
21
|
+
path/to/topo1_clock3_mcmc.txt t_n131 Topo1 Symbiosis_event_3
|
|
22
|
+
path/to/topo2_clock3_mcmc.txt t_n171 Topo2 Symbiosis_event_1
|
|
23
|
+
path/to/topo2_clock3_mcm.txtc t_n171 Topo3 Symbiosis_event_1
|
|
23
24
|
|
|
24
25
|
===================================================================================
|
|
25
26
|
'''
|
|
@@ -52,7 +53,7 @@ def plot_distribution(df_txt, output_plot):
|
|
|
52
53
|
if plot_height < 360:
|
|
53
54
|
plot_height = 360
|
|
54
55
|
|
|
55
|
-
fig = px.violin(df, x="Value", y="Setting", color="Node", points=False, orientation="h", width=plot_width, height=plot_height)
|
|
56
|
+
fig = px.violin(df, x="Value", y="Setting", color="Node", points=False, orientation="h", width=plot_width, height=plot_height).update_layout(xaxis_title="Age", yaxis_title="Settings")
|
|
56
57
|
if len(node_id_list) == 1:
|
|
57
58
|
fig.update_traces(side="positive", fillcolor='lightblue', width=1.6, opacity=0.75)
|
|
58
59
|
else:
|
|
@@ -69,73 +70,56 @@ def plot_distribution(df_txt, output_plot):
|
|
|
69
70
|
|
|
70
71
|
def PlotMcmcNode(args):
|
|
71
72
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
node_txt = args['n']
|
|
75
|
-
output_plot = args['o']
|
|
76
|
-
|
|
77
|
-
# check MCMCTree output file/dir
|
|
78
|
-
if os.path.isfile(mcmc_in) is True:
|
|
79
|
-
mcmc_file_list = [mcmc_in]
|
|
80
|
-
else:
|
|
81
|
-
mcmc_file_re = '%s/*.%s' % (mcmc_in, mcmc_file_ext)
|
|
82
|
-
mcmc_file_list = glob.glob(mcmc_file_re)
|
|
83
|
-
|
|
84
|
-
if len(mcmc_file_list) == 0:
|
|
85
|
-
print('mcmc file not found, program exited!')
|
|
86
|
-
exit()
|
|
73
|
+
node_txt = args['i']
|
|
74
|
+
output_plot = args['o']
|
|
87
75
|
|
|
88
76
|
if output_plot[-4:] not in ['.PDF', '.pdf']:
|
|
89
77
|
output_plot = output_plot + '.pdf'
|
|
90
78
|
op_df_tmp = output_plot + '.txt'
|
|
91
79
|
|
|
92
|
-
|
|
93
|
-
for each_mcmc_file in mcmc_file_list:
|
|
94
|
-
mcmc_path, mcmc_base, mcmc_ext = sep_path_basename_ext(each_mcmc_file)
|
|
95
|
-
mcmc_file_full_path_dict[mcmc_base] = each_mcmc_file
|
|
96
|
-
|
|
97
|
-
# read in nodes to plot
|
|
80
|
+
# read in txt file
|
|
98
81
|
file_to_node_dict = dict()
|
|
99
82
|
file_rename_dict = dict()
|
|
100
83
|
node_rename_dict = dict()
|
|
101
84
|
not_found_file_set = set()
|
|
102
85
|
for each_node in open(node_txt):
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
file_name = file_name.split('/')[-1]
|
|
86
|
+
line_split = each_node.strip().split()
|
|
87
|
+
mcmc_file = line_split[0]
|
|
88
|
+
node_id = line_split[1]
|
|
107
89
|
|
|
108
|
-
if
|
|
109
|
-
not_found_file_set.add(
|
|
90
|
+
if os.path.isfile(mcmc_file) is False:
|
|
91
|
+
not_found_file_set.add(mcmc_file)
|
|
110
92
|
|
|
111
|
-
|
|
112
|
-
node_id_with_file_name
|
|
93
|
+
_, mcmc_f_base, _ = sep_path_basename_ext(mcmc_file)
|
|
94
|
+
node_id_with_file_name = '%s_____%s' % (mcmc_file, node_id)
|
|
113
95
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
96
|
+
# get file_to_node_dict
|
|
97
|
+
if mcmc_file not in file_to_node_dict:
|
|
98
|
+
file_to_node_dict[mcmc_file] = set()
|
|
99
|
+
file_to_node_dict[mcmc_file].add(node_id)
|
|
117
100
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
101
|
+
# get file_rename_dict
|
|
102
|
+
if len(line_split) >= 3:
|
|
103
|
+
file_rename_on_plot = line_split[2]
|
|
104
|
+
file_rename_dict[mcmc_file] = file_rename_on_plot
|
|
121
105
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
106
|
+
# get node_rename_dict
|
|
107
|
+
if len(line_split) == 4:
|
|
108
|
+
node_rename_on_plot = line_split[3]
|
|
109
|
+
node_rename_dict[node_id_with_file_name] = node_rename_on_plot
|
|
125
110
|
|
|
126
|
-
# report not found files and exit
|
|
127
111
|
if len(not_found_file_set) > 0:
|
|
128
|
-
print('
|
|
112
|
+
print('The following files not found program exited!')
|
|
113
|
+
print('\n'.join(sorted(list(not_found_file_set))))
|
|
129
114
|
exit()
|
|
130
115
|
|
|
131
116
|
found_matched_node = False
|
|
132
117
|
op_df_tmp_handle = open(op_df_tmp, 'w')
|
|
133
118
|
op_df_tmp_handle.write('Value,Node,Setting\n')
|
|
134
119
|
for mcmc_file in file_to_node_dict:
|
|
135
|
-
pwd_mcmc_file = mcmc_file_full_path_dict[mcmc_file]
|
|
136
120
|
current_node_set = file_to_node_dict.get(mcmc_file, set())
|
|
137
121
|
file_name_to_plot = file_rename_dict.get(mcmc_file, mcmc_file)
|
|
138
|
-
mcmc_df = pd.read_table(
|
|
122
|
+
mcmc_df = pd.read_table(mcmc_file, index_col=0)
|
|
139
123
|
for each_col in mcmc_df:
|
|
140
124
|
if each_col in current_node_set:
|
|
141
125
|
node_desc_to_plot = node_rename_dict.get(('%s_____%s' % (mcmc_file, each_col)), each_col)
|
|
@@ -162,9 +146,7 @@ def PlotMcmcNode(args):
|
|
|
162
146
|
if __name__ == '__main__':
|
|
163
147
|
|
|
164
148
|
PlotMcmcNode_parser = argparse.ArgumentParser()
|
|
165
|
-
PlotMcmcNode_parser.add_argument('-i', required=True, help='
|
|
166
|
-
PlotMcmcNode_parser.add_argument('-x', required=False, default='txt', help='file extension, default is txt')
|
|
167
|
-
PlotMcmcNode_parser.add_argument('-n', required=True, help='nodes to plot')
|
|
149
|
+
PlotMcmcNode_parser.add_argument('-i', required=True, help='input txt file')
|
|
168
150
|
PlotMcmcNode_parser.add_argument('-o', required=True, help='output plot')
|
|
169
151
|
args = vars(PlotMcmcNode_parser.parse_args())
|
|
170
152
|
PlotMcmcNode(args)
|
|
@@ -385,14 +385,17 @@ def iTOL(args):
|
|
|
385
385
|
Binary_FileOut_handle.write('SHOW_LABELS\t1\nLABEL_ROTATION\t45\nLABEL_SHIFT\t5\n')
|
|
386
386
|
Binary_FileOut_handle.write('FIELD_LABELS\t%s\n' % '\t'.join(col_name_list))
|
|
387
387
|
Binary_FileOut_handle.write('FIELD_COLORS\t%s\n' % '\t'.join(col_color_list))
|
|
388
|
-
Binary_FileOut_handle.write('FIELD_SHAPES\t%s\n' % '\t'.join(['2'] * len(col_name_list)))
|
|
389
388
|
Binary_FileOut_handle.write('MARGIN\t10\n')
|
|
389
|
+
Binary_FileOut_handle.write('HORIZONTAL_GRID\t0\n')
|
|
390
|
+
Binary_FileOut_handle.write('VERTICAL_GRID\t0\n')
|
|
391
|
+
Binary_FileOut_handle.write('FIELD_SHAPES\t%s\n' % '\t'.join(['2'] * len(col_name_list)))
|
|
390
392
|
Binary_FileOut_handle.write('#1: rectangle\n')
|
|
391
393
|
Binary_FileOut_handle.write('#2: circle\n')
|
|
392
394
|
Binary_FileOut_handle.write('#3: star\n')
|
|
393
395
|
Binary_FileOut_handle.write('#4: right pointing triangle\n')
|
|
394
396
|
Binary_FileOut_handle.write('#5: left pointing triangle\n')
|
|
395
397
|
Binary_FileOut_handle.write('#6: check mark\n')
|
|
398
|
+
|
|
396
399
|
Binary_FileOut_handle.write('\nDATA\n')
|
|
397
400
|
else:
|
|
398
401
|
Binary_FileOut_handle.write(each_line)
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
|
|
2
|
+
def gene_gain_and_loss(TableEvents_tsv):
|
|
3
|
+
|
|
4
|
+
for each_line in open(TableEvents_tsv):
|
|
5
|
+
if not each_line.startswith('Family\tBranchType\tBranch'):
|
|
6
|
+
each_line_split = each_line.strip().split('\t')
|
|
7
|
+
protein_family_id = each_line_split[0]
|
|
8
|
+
node_id = each_line_split[2]
|
|
9
|
+
Losses = float(each_line_split[5])
|
|
10
|
+
Originations = float(each_line_split[6])
|
|
11
|
+
Extinctinonprob = float(each_line_split[9])
|
|
12
|
+
|
|
13
|
+
print('%s\t%s\t%s\t%s\t%s' % (protein_family_id, node_id, Losses, '', Extinctinonprob))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
TableEvents_tsv = '/Users/songweizhi/Desktop/Sponge_r220/10_dRep95_255_ALE_wd/dRep95_255_ALE3_op_dir_80/TableEvents.tsv'
|
|
17
|
+
|
|
18
|
+
gene_gain_and_loss(TableEvents_tsv)
|
|
19
|
+
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: TreeSAK
|
|
3
|
-
Version: 1.47.
|
|
3
|
+
Version: 1.47.8
|
|
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.47.
|
|
27
|
+
TreeSAK v1.47.8
|
|
@@ -113,8 +113,6 @@ if __name__ == '__main__':
|
|
|
113
113
|
# initialize the options parser
|
|
114
114
|
parser = argparse.ArgumentParser()
|
|
115
115
|
subparsers = parser.add_subparsers(help="--", dest='subparser_name')
|
|
116
|
-
|
|
117
|
-
# disable warning message
|
|
118
116
|
warnings.filterwarnings('ignore')
|
|
119
117
|
|
|
120
118
|
# parse options
|
|
@@ -188,7 +186,7 @@ if __name__ == '__main__':
|
|
|
188
186
|
args = vars(parser.parse_args())
|
|
189
187
|
rename_leaves.rename_leaves(args)
|
|
190
188
|
|
|
191
|
-
elif sys.argv[1]
|
|
189
|
+
elif sys.argv[1] == 'FLN':
|
|
192
190
|
from TreeSAK import format_leaf_name
|
|
193
191
|
format_leaf_name_parser = subparsers.add_parser('FLN', usage=format_leaf_name.format_leaf_name_usage)
|
|
194
192
|
format_leaf_name_parser.add_argument('-i', required=True, help='input tree')
|
|
@@ -309,7 +307,7 @@ if __name__ == '__main__':
|
|
|
309
307
|
args = vars(parser.parse_args())
|
|
310
308
|
dating_ss.dating_ss(args)
|
|
311
309
|
|
|
312
|
-
elif sys.argv[1]
|
|
310
|
+
elif sys.argv[1] == 'dating':
|
|
313
311
|
from TreeSAK import dating
|
|
314
312
|
dating_parser = subparsers.add_parser('dating', usage=dating.dating_usage)
|
|
315
313
|
dating_parser.add_argument('-i', required=True, help='tree file')
|
|
@@ -354,9 +352,7 @@ if __name__ == '__main__':
|
|
|
354
352
|
elif sys.argv[1] == 'PlotMcmcNode':
|
|
355
353
|
from TreeSAK import PlotMcmcNode
|
|
356
354
|
PlotMcmcNode_parser = subparsers.add_parser('PlotMcmcNode', usage=PlotMcmcNode.PlotMcmcNode_usage)
|
|
357
|
-
PlotMcmcNode_parser.add_argument('-i', required=True, help='
|
|
358
|
-
PlotMcmcNode_parser.add_argument('-x', required=False, default='txt', help='file extension, default is txt')
|
|
359
|
-
PlotMcmcNode_parser.add_argument('-n', required=True, help='nodes to plot')
|
|
355
|
+
PlotMcmcNode_parser.add_argument('-i', required=True, help='input txt file')
|
|
360
356
|
PlotMcmcNode_parser.add_argument('-o', required=True, help='output plot')
|
|
361
357
|
args = vars(parser.parse_args())
|
|
362
358
|
PlotMcmcNode.PlotMcmcNode(args)
|
|
@@ -374,7 +370,7 @@ if __name__ == '__main__':
|
|
|
374
370
|
args['plot_grouped_HPD95_R'] = config_dict['plot_grouped_HPD95_R']
|
|
375
371
|
VisHPD95.VisHPD95(args)
|
|
376
372
|
|
|
377
|
-
elif sys.argv[1]
|
|
373
|
+
elif sys.argv[1] == 'PMSF':
|
|
378
374
|
from TreeSAK import PMSF
|
|
379
375
|
PMSF_parser = subparsers.add_parser('PMSF', usage=PMSF.PMSF_usage)
|
|
380
376
|
PMSF_parser.add_argument('-i', required=True, help='input MSA file')
|
|
@@ -481,7 +477,7 @@ if __name__ == '__main__':
|
|
|
481
477
|
args = vars(parser.parse_args())
|
|
482
478
|
ExtractMarkerSeq.ExtractMarkerSeq(args)
|
|
483
479
|
|
|
484
|
-
elif sys.argv[1]
|
|
480
|
+
elif sys.argv[1] == 'OMA':
|
|
485
481
|
from TreeSAK import OMA
|
|
486
482
|
OMA_parser = subparsers.add_parser('OMA', usage=OMA.OMA_usage)
|
|
487
483
|
OMA_parser.add_argument('-i', required=True, help='genome folder')
|
|
@@ -494,7 +490,7 @@ if __name__ == '__main__':
|
|
|
494
490
|
args = vars(parser.parse_args())
|
|
495
491
|
OMA.OMA(args)
|
|
496
492
|
|
|
497
|
-
elif sys.argv[1]
|
|
493
|
+
elif sys.argv[1] == 'OMA2':
|
|
498
494
|
from TreeSAK import OMA2
|
|
499
495
|
OMA2_parser = subparsers.add_parser('OMA2', usage=OMA2.OMA2_usage)
|
|
500
496
|
OMA2_parser.add_argument('-i', required=True, help='OrthologousGroups.txt')
|
|
@@ -512,7 +508,7 @@ if __name__ == '__main__':
|
|
|
512
508
|
print(ALE.ALE_usage)
|
|
513
509
|
exit()
|
|
514
510
|
|
|
515
|
-
elif sys.argv[1]
|
|
511
|
+
elif sys.argv[1] == 'ALE1':
|
|
516
512
|
from TreeSAK import ALE1
|
|
517
513
|
ALE1_parser = subparsers.add_parser('ALE1', usage=ALE1.ALE1_usage)
|
|
518
514
|
ALE1_parser.add_argument('-i', required=False, default=None, help='orthologous groups, either from orthofinder or oma')
|
|
@@ -530,7 +526,7 @@ if __name__ == '__main__':
|
|
|
530
526
|
args = vars(parser.parse_args())
|
|
531
527
|
ALE1.ALE1(args)
|
|
532
528
|
|
|
533
|
-
elif sys.argv[1]
|
|
529
|
+
elif sys.argv[1] == 'ALE2':
|
|
534
530
|
from TreeSAK import ALE2
|
|
535
531
|
ALE2_parser = subparsers.add_parser('ALE2', usage=ALE2.ALE2_usage)
|
|
536
532
|
ALE2_parser.add_argument('-1', required=True, help='ALE1 output directory')
|
|
@@ -543,7 +539,7 @@ if __name__ == '__main__':
|
|
|
543
539
|
args = vars(parser.parse_args())
|
|
544
540
|
ALE2.ALE2(args)
|
|
545
541
|
|
|
546
|
-
elif sys.argv[1]
|
|
542
|
+
elif sys.argv[1] == 'ALE3':
|
|
547
543
|
from TreeSAK import ALE3
|
|
548
544
|
ALE3_parser = subparsers.add_parser('ALE3', usage=ALE3.ALE3_usage)
|
|
549
545
|
ALE3_parser.add_argument('-2', required=True, help='Folder with uml_rec files')
|
|
@@ -554,7 +550,7 @@ if __name__ == '__main__':
|
|
|
554
550
|
args = vars(parser.parse_args())
|
|
555
551
|
ALE3.ALE3(args)
|
|
556
552
|
|
|
557
|
-
elif sys.argv[1]
|
|
553
|
+
elif sys.argv[1] == 'ALE4':
|
|
558
554
|
from TreeSAK import ALE4
|
|
559
555
|
ALE4_parser = subparsers.add_parser('ALE4', usage=ALE4.ALE4_usage)
|
|
560
556
|
ALE4_parser.add_argument('-1', required=True, help='ALE1 output directory')
|
|
@@ -571,7 +567,7 @@ if __name__ == '__main__':
|
|
|
571
567
|
args = vars(parser.parse_args())
|
|
572
568
|
ALE4.ALE4(args)
|
|
573
569
|
|
|
574
|
-
elif sys.argv[1]
|
|
570
|
+
elif sys.argv[1] == 'ALE6':
|
|
575
571
|
from TreeSAK import ALE6
|
|
576
572
|
ALE6_parser = subparsers.add_parser('ALE6', usage=ALE6.ALE6_usage)
|
|
577
573
|
ALE6_parser.add_argument('-1', required=True, help='ALE1 output directory')
|
|
@@ -585,7 +581,7 @@ if __name__ == '__main__':
|
|
|
585
581
|
args = vars(parser.parse_args())
|
|
586
582
|
ALE6.ALE6(args)
|
|
587
583
|
|
|
588
|
-
elif sys.argv[1]
|
|
584
|
+
elif sys.argv[1] == 'ALE7':
|
|
589
585
|
from TreeSAK import ALE7
|
|
590
586
|
ALE7_parser = subparsers.add_parser('ALE7', usage=ALE7.ALE7_usage)
|
|
591
587
|
ALE7_parser.add_argument('-6', required=True, help='ALE6 output directory')
|
|
@@ -606,7 +602,7 @@ if __name__ == '__main__':
|
|
|
606
602
|
args = vars(parser.parse_args())
|
|
607
603
|
RootTree.RootTree(args)
|
|
608
604
|
|
|
609
|
-
elif sys.argv[1]
|
|
605
|
+
elif sys.argv[1] == 'BMGE':
|
|
610
606
|
from TreeSAK import BMGE
|
|
611
607
|
BMGE_parser = subparsers.add_parser('BMGE', usage=BMGE.BMGE_usage)
|
|
612
608
|
BMGE_parser.add_argument('-p', required=True, help='output prefix')
|
|
@@ -616,7 +612,7 @@ if __name__ == '__main__':
|
|
|
616
612
|
args = vars(parser.parse_args())
|
|
617
613
|
BMGE.BMGE(args)
|
|
618
614
|
|
|
619
|
-
elif sys.argv[1]
|
|
615
|
+
elif sys.argv[1] == 'pRTC':
|
|
620
616
|
from TreeSAK import pRTC
|
|
621
617
|
pRTC_parser = subparsers.add_parser('pRTC', usage=pRTC.pRTC_usage)
|
|
622
618
|
pRTC_parser.add_argument('-i', required=True, help='the file "out" generated by MCMCTree')
|
|
@@ -724,7 +720,7 @@ if __name__ == '__main__':
|
|
|
724
720
|
args = vars(parser.parse_args())
|
|
725
721
|
PB.PB(args)
|
|
726
722
|
|
|
727
|
-
elif sys.argv[1]
|
|
723
|
+
elif sys.argv[1] == 'AssessPB':
|
|
728
724
|
from TreeSAK import AssessPB
|
|
729
725
|
AssessPB_parser = subparsers.add_parser('AssessPB', usage=AssessPB.AssessPB_usage)
|
|
730
726
|
AssessPB_parser.add_argument('-c1', required=False, default=None, help='chain 1')
|
TreeSAK-1.47.6/TreeSAK/tmp_1.py
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|