TreeSAK 1.46.1__tar.gz → 1.46.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 (116) hide show
  1. {TreeSAK-1.46.1/TreeSAK.egg-info → TreeSAK-1.46.3}/PKG-INFO +2 -2
  2. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/ALE6.py +41 -22
  3. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/ALE7.py +20 -1
  4. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/PlotMcmcNode.py +1 -2
  5. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/VERSION +1 -1
  6. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/cogTree.py +3 -2
  7. {TreeSAK-1.46.1 → TreeSAK-1.46.3/TreeSAK.egg-info}/PKG-INFO +2 -2
  8. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/bin/TreeSAK +2 -2
  9. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/LICENSE +0 -0
  10. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/MANIFEST.in +0 -0
  11. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/README.md +0 -0
  12. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/ALE.py +0 -0
  13. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/ALE1.py +0 -0
  14. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/ALE2.py +0 -0
  15. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/ALE2RTC.py +0 -0
  16. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/ALE3.py +0 -0
  17. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/ALE4.py +0 -0
  18. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/ALE5.py +0 -0
  19. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/ALE_backup.py +0 -0
  20. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/AssessCVG.py +0 -0
  21. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/AssessMarker.py +0 -0
  22. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/AssessMarkerDeltaLL.py +0 -0
  23. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/AssessMarkerPA.py +0 -0
  24. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/AssessPB.py +0 -0
  25. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/BMGE.jar +0 -0
  26. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/BMGE.py +0 -0
  27. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/CompareMCMC.py +0 -0
  28. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/ConcateMSA.py +0 -0
  29. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/ConvertMSA.py +0 -0
  30. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/Dir.rb +0 -0
  31. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/ExtractMarkerSeq.py +0 -0
  32. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/FastRoot.py +0 -0
  33. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/FastRoot_backup.py +0 -0
  34. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/FigTree.py +0 -0
  35. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/GTDB_tree.py +0 -0
  36. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/KEGG_Luo17.py +0 -0
  37. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/LcaToLeaves.py +0 -0
  38. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/MarkerRef2Tree.py +0 -0
  39. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/MarkerRef2Tree_backup.py +0 -0
  40. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/MarkerSeq2Tree.py +0 -0
  41. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/ModifyTopo.py +0 -0
  42. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/Newick_tree_plotter.py +0 -0
  43. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/OMA.py +0 -0
  44. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/OMA2.py +0 -0
  45. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/OneLineAln.py +0 -0
  46. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/PB.py +0 -0
  47. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/PMSF.py +0 -0
  48. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/PhyloBiAssoc.R +0 -0
  49. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/PhyloBiAssoc.py +0 -0
  50. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/PlotMCMC.py +0 -0
  51. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/PlotMcmcNode_old.py +0 -0
  52. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/RootTree.py +0 -0
  53. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/RootTreeGTDB214.py +0 -0
  54. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/RootTreeGTDB220.py +0 -0
  55. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/SequentialDating.py +0 -0
  56. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/SingleAleHGT.py +0 -0
  57. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/SingleLinePhy.py +0 -0
  58. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/SliceMSA.py +0 -0
  59. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/SplitScore.py +0 -0
  60. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/SplitScore1.py +0 -0
  61. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/SplitScore1OMA.py +0 -0
  62. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/SplitScore2.py +0 -0
  63. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/TaxaCountStats.R +0 -0
  64. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/TaxonTree.py +0 -0
  65. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/TreeSAK_config.py +0 -0
  66. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/VisHPD95.R +0 -0
  67. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/VisHPD95.py +0 -0
  68. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/__init__.py +0 -0
  69. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/ale_parser.py +0 -0
  70. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/ale_splitter.py +0 -0
  71. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/alignment_pruner.pl +0 -0
  72. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/catfasta2phy.py +0 -0
  73. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/compare_trees.R +0 -0
  74. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/compare_trees.py +0 -0
  75. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/dating.py +0 -0
  76. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/dating_ss.py +0 -0
  77. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/deltall.py +0 -0
  78. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/do_rrtc.rb +0 -0
  79. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/fa2phy.py +0 -0
  80. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/format_leaf_name.py +0 -0
  81. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/gap_stats.py +0 -0
  82. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/get_SCG_tree.py +0 -0
  83. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/get_arCOG_seq.py +0 -0
  84. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/global_functions.py +0 -0
  85. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/gnm_leaves.py +0 -0
  86. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/iTOL.py +0 -0
  87. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/iTOL_gene_tree.py +0 -0
  88. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/keep_highest_rrtc.py +0 -0
  89. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/koTree.py +0 -0
  90. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/label_tree.R +0 -0
  91. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/label_tree.py +0 -0
  92. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/mad.py +0 -0
  93. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/mcmc2tree.py +0 -0
  94. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/mcmcTC.py +0 -0
  95. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/merge_pdf.py +0 -0
  96. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/pRTC.py +0 -0
  97. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/plot_distruibution_th.py +0 -0
  98. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/prep_mcmctree_ctl.py +0 -0
  99. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/print_leaves.py +0 -0
  100. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/pruneMSA.py +0 -0
  101. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/recode.py +0 -0
  102. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/rename_leaves.py +0 -0
  103. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/replace_clade.py +0 -0
  104. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/root_with_out_group.py +0 -0
  105. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/run_TaxaCountStats_R_s1.py +0 -0
  106. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/subsample_drep_gnms.py +0 -0
  107. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/subset.py +0 -0
  108. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/subset_tree_stupid_old_way.py +0 -0
  109. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/supertree.py +0 -0
  110. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK/weighted_rand.rb +0 -0
  111. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK.egg-info/SOURCES.txt +0 -0
  112. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK.egg-info/dependency_links.txt +0 -0
  113. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK.egg-info/requires.txt +0 -0
  114. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/TreeSAK.egg-info/top_level.txt +0 -0
  115. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/setup.cfg +0 -0
  116. {TreeSAK-1.46.1 → TreeSAK-1.46.3}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: TreeSAK
3
- Version: 1.46.1
3
+ Version: 1.46.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.46.1
27
+ TreeSAK v1.46.3
@@ -15,8 +15,8 @@ TreeSAK ALE6 -1 ALE1_op_dir -3 ALE3_op_dir_30 -s species_tree.rooted.treefile -o
15
15
 
16
16
  # Needed input files:
17
17
  -1: faa files
18
- -3: GeneContent.txt and SpeciesTreeRef.newick
19
- -s: the tree used as input for ALE2
18
+ -3: GeneContent.txt, SpeciesTreeRef.newick and Transfer_propensity.txt
19
+ -s: the tree used as input for ALE2, to rename leafs back
20
20
 
21
21
  # To be added:
22
22
  1. A dereplication step to the produced faa file.
@@ -47,6 +47,15 @@ def get_internal_node_leaves(ale_species_tree_file, internal_node_id):
47
47
  return internal_node_leaf_set
48
48
 
49
49
 
50
+ def rename_leaves(tree_file_in, rename_dict, tree_format, tree_file_out):
51
+
52
+ t = Tree(tree_file_in, format=tree_format)
53
+ for leaf in t:
54
+ leaf_name_new = rename_dict.get(leaf.name, leaf.name)
55
+ leaf.name = leaf_name_new
56
+ t.write(format=tree_format, outfile=tree_file_out)
57
+
58
+
50
59
  def ALE6(args):
51
60
 
52
61
  ale1_op_dir = args['1']
@@ -58,23 +67,33 @@ def ALE6(args):
58
67
  cog_annotation_wd = args['cog']
59
68
  kegg_annotation_wd = args['kegg']
60
69
 
61
- GeneContent_txt = '%s/GeneContent.txt' % ale3_op_dir
62
- SpeciesTreeRef = '%s/SpeciesTreeRef.newick' % ale3_op_dir
63
- transfer_propensity_txt = '%s/Transfer_propensity.txt' % ale3_op_dir
70
+ GeneContent_txt = '%s/GeneContent.txt' % ale3_op_dir
71
+ SpeciesTreeRef = '%s/SpeciesTreeRef.newick' % ale3_op_dir
72
+ transfer_propensity_txt = '%s/Transfer_propensity.txt' % ale3_op_dir
64
73
 
65
74
  ################################################## define op files #################################################
66
75
 
67
- faa_dir = '%s/faa_files' % op_dir
68
- cog_dir = '%s/annotation_COG' % op_dir
69
- kegg_dir = '%s/annotation_KEGG' % op_dir
70
- cog_df_txt = '%s/annotation_COG.txt' % op_dir
71
- cog_df_desc_txt = '%s/annotation_COG_desc.txt' % op_dir
72
- kegg_df_txt = '%s/annotation_KEGG.txt' % op_dir
73
- kegg_df_desc_txt = '%s/annotation_KEGG_desc.txt' % op_dir
74
- fun_transfer_propensity_txt = '%s/function_transfer_propensity_weighted.txt' % op_dir
76
+ _, _, tree_base, tree_ext = sep_path_basename_ext(genome_tree_file_rooted)
77
+
78
+ faa_dir = '%s/faa_files' % op_dir
79
+ cog_dir = '%s/annotation_COG' % op_dir
80
+ kegg_dir = '%s/annotation_KEGG' % op_dir
81
+ cog_df_txt = '%s/annotation_COG.txt' % op_dir
82
+ cog_df_desc_txt = '%s/annotation_COG_desc.txt' % op_dir
83
+ kegg_df_txt = '%s/annotation_KEGG.txt' % op_dir
84
+ kegg_df_desc_txt = '%s/annotation_KEGG_desc.txt' % op_dir
85
+ fun_transfer_propensity_txt = '%s/function_transfer_propensity_weighted.txt' % op_dir
86
+ genome_tree_file_rooted_with_ale_internal_node = '%s/%s_with_ALE_internal_nodes.%s' % (op_dir, tree_base, tree_ext)
75
87
 
76
88
  ########################################## get the id of nodes to process ##########################################
77
89
 
90
+ gnm_name_dict_ale_fmt_to_original_fmt = dict()
91
+ for leaf in Tree(genome_tree_file_rooted, format=1):
92
+ leaf_name = leaf.name
93
+ leaf_name_new = leaf_name.replace('_', '')
94
+ leaf.name = leaf_name_new
95
+ gnm_name_dict_ale_fmt_to_original_fmt[leaf_name_new] = leaf_name
96
+
78
97
  overall_internal_node_set = set()
79
98
  line_num_index = 0
80
99
  for each_line in open(GeneContent_txt):
@@ -98,20 +117,18 @@ def ALE6(args):
98
117
  for each_node in open(interested_internal_nodes):
99
118
  internal_nodes_to_process.add(each_node.strip())
100
119
 
101
- ####################################################################################################################
102
-
103
- gnm_name_dict_new_to_old = dict()
104
- for leaf in Tree(genome_tree_file_rooted, format=1):
105
- leaf_name = leaf.name
106
- leaf_name_new = leaf_name.replace('_', '')
107
- leaf.name = leaf_name_new
108
- gnm_name_dict_new_to_old[leaf_name_new] = leaf_name
120
+ #################### an addiitonal step (add ALE added internal node names to the rooted tree) #####################
109
121
 
110
122
  # create output directory
111
123
  if force_create_op_dir is True:
112
124
  if os.path.isdir(op_dir) is True:
113
125
  os.system('rm -r %s' % op_dir)
114
126
  os.system('mkdir %s' % op_dir)
127
+
128
+ rename_leaves(SpeciesTreeRef, gnm_name_dict_ale_fmt_to_original_fmt, 1, genome_tree_file_rooted_with_ale_internal_node)
129
+
130
+ ####################################################################################################################
131
+
115
132
  os.system('mkdir %s' % faa_dir)
116
133
 
117
134
  if cog_annotation_wd is not None:
@@ -144,7 +161,7 @@ def ALE6(args):
144
161
  branch_faa = '%s/%s.faa' % (faa_dir, each_branch)
145
162
  branch_content = branch_to_content_dict[each_branch]
146
163
  branch_child_set = branch_to_leaf_dict[each_branch]
147
- branch_child_set_original_name = {gnm_name_dict_new_to_old[i] for i in branch_child_set}
164
+ branch_child_set_original_name = {gnm_name_dict_ale_fmt_to_original_fmt[i] for i in branch_child_set}
148
165
  branch_faa_handle = open(branch_faa, 'w')
149
166
  branch_to_gene_dict[each_branch] = set()
150
167
  for each_prot_family in branch_content:
@@ -158,6 +175,8 @@ def ALE6(args):
158
175
  branch_to_gene_dict[each_branch].add(each_seq.id)
159
176
  branch_faa_handle.close()
160
177
 
178
+ ####################################################################################################################
179
+
161
180
  # Read in COG annotation results
162
181
  fun_to_gene_dict = dict()
163
182
  annotation_dict_cog = dict()
@@ -18,6 +18,16 @@ TreeSAK ALE7 -6 ALE6_op_dir -fun arCOG07811,K01995 -node 359,466,470 -o Fun_PA.t
18
18
  '''
19
19
 
20
20
 
21
+ def sep_path_basename_ext(file_in):
22
+
23
+ f_path, f_name = os.path.split(file_in)
24
+ if f_path == '':
25
+ f_path = '.'
26
+ f_base, f_ext = os.path.splitext(f_name)
27
+
28
+ return f_name, f_path, f_base, f_ext[1:]
29
+
30
+
21
31
  def ALE7(args):
22
32
 
23
33
  ale6_op_dir = args['6']
@@ -25,6 +35,9 @@ def ALE7(args):
25
35
  interested_gnm_txt = args['node']
26
36
  op_txt = args['o']
27
37
 
38
+ op_txt_name, op_txt_path, op_txt_base, op_txt_ext = sep_path_basename_ext(op_txt)
39
+ op_txt_pct = '%s/%s_percentage.%s' % (op_txt_path, op_txt_base, op_txt_ext)
40
+
28
41
  if os.path.isdir(ale6_op_dir) is False:
29
42
  print('%s not found, program exited!' % ale6_op_dir)
30
43
  exit()
@@ -54,6 +67,8 @@ def ALE7(args):
54
67
 
55
68
  op_txt_handle = open(op_txt, 'w')
56
69
  op_txt_handle.write('ID\t' + '\t'.join(interested_fun_list_sorted) + '\n')
70
+ op_txt_pct_handle = open(op_txt_pct, 'w')
71
+ op_txt_pct_handle.write('ID\tPercentage\n')
57
72
  for each_node in interested_gnm_list_sorted:
58
73
  node_annotation_cog = '%s/annotation_COG/%s_COG.txt' % (ale6_op_dir, each_node)
59
74
  node_annotation_kegg = '%s/annotation_KEGG/%s_KEGG.txt' % (ale6_op_dir, each_node)
@@ -74,9 +89,13 @@ def ALE7(args):
74
89
  fun_pa_list.append('0')
75
90
 
76
91
  op_txt_handle.write('\t'.join(fun_pa_list) + '\n')
92
+ fun_presence_pct = fun_pa_list.count('1')*100/(len(fun_pa_list) - 1)
93
+ fun_presence_pct = float("{0:.2f}".format(fun_presence_pct))
94
+ op_txt_pct_handle.write('%s\t%s\n' % (each_node, fun_presence_pct))
77
95
  op_txt_handle.close()
96
+ op_txt_pct_handle.close()
78
97
 
79
- print('Results exported to %s' % op_txt)
98
+ print('Results exported to %s and %s' % (op_txt, op_txt_pct))
80
99
  print('Done!')
81
100
 
82
101
 
@@ -82,7 +82,7 @@ def PlotMcmcNode(args):
82
82
  mcmc_file_list = glob.glob(mcmc_file_re)
83
83
 
84
84
  if len(mcmc_file_list) == 0:
85
- print('*mcmc.txt file not found, program exited!')
85
+ print('mcmc file not found, program exited!')
86
86
  exit()
87
87
 
88
88
  if output_plot[-4:] not in ['.PDF', '.pdf']:
@@ -101,7 +101,6 @@ def PlotMcmcNode(args):
101
101
  not_found_file_set = set()
102
102
  for each_node in open(node_txt):
103
103
  each_node_split = each_node.strip().split()
104
- print(each_node_split)
105
104
  file_name = each_node_split[0]
106
105
  if '/' in file_name:
107
106
  file_name = file_name.split('/')[-1]
@@ -1,4 +1,4 @@
1
- 1.46.1
1
+ 1.46.3
2
2
  - fixed bugs
3
3
 
4
4
  1.46.0
@@ -86,7 +86,7 @@ def cogTree(args):
86
86
  print('Reading in COG annotation results')
87
87
  file_re = '%s/*COG_wd/*_query_to_cog.txt' % (cog_annotation_wd)
88
88
  file_list = glob.glob(file_re)
89
-
89
+ print(file_list)
90
90
  if len(file_list) == 0:
91
91
  print('COG annotation file not detected, program exited!')
92
92
  exit()
@@ -98,7 +98,8 @@ def cogTree(args):
98
98
  each_line_split = each_line.strip().split('\t')
99
99
  if len(each_line_split) == 4:
100
100
  gene_id = each_line_split[0]
101
- cog_id = each_line_split[4][2:]
101
+ print(each_line_split)
102
+ cog_id = each_line_split[1]
102
103
  if cog_id in interested_fun_set:
103
104
  if cog_id not in fun_to_gene_dict:
104
105
  fun_to_gene_dict[cog_id] = set()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: TreeSAK
3
- Version: 1.46.1
3
+ Version: 1.46.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.46.1
27
+ TreeSAK v1.46.3
@@ -59,7 +59,7 @@ def print_main_help():
59
59
  iTOL -> Prepare iTOL files
60
60
  iTOL_gene_tree -> Genome metadata to gene metadata
61
61
  PB -> Infer tree with PhyloBayes-MPI
62
- supertree -> Infer species tree from gene trees
62
+ supertree -> Infer species tree from multiple gene trees
63
63
  AssessPB -> Compare PhyloBayes chains
64
64
  MarkerSeq2Tree -> Marker sequence to tree
65
65
  MarkerRef2Tree -> Marker (reference sequence) to Tree
@@ -870,7 +870,7 @@ if __name__ == '__main__':
870
870
  iTOL_gene_tree.iTOL_gene_tree(args)
871
871
 
872
872
  else:
873
- print('Unrecognized module: %s, program exited' % sys.argv[1])
873
+ print('Unrecognized module: %s, program exited!' % sys.argv[1])
874
874
  exit()
875
875
 
876
876
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes