TreeSAK 1.43.3__tar.gz → 1.44.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.
Files changed (111) hide show
  1. {TreeSAK-1.43.3/TreeSAK.egg-info → TreeSAK-1.44.0}/PKG-INFO +2 -2
  2. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/ALE7.py +4 -4
  3. TreeSAK-1.44.0/TreeSAK/FunTree.py +191 -0
  4. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/VERSION +3 -0
  5. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/supertree.py +1 -1
  6. {TreeSAK-1.43.3 → TreeSAK-1.44.0/TreeSAK.egg-info}/PKG-INFO +2 -2
  7. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK.egg-info/SOURCES.txt +1 -0
  8. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/bin/TreeSAK +18 -0
  9. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/LICENSE +0 -0
  10. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/MANIFEST.in +0 -0
  11. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/README.md +0 -0
  12. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/ALE.py +0 -0
  13. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/ALE1.py +0 -0
  14. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/ALE2.py +0 -0
  15. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/ALE2RTC.py +0 -0
  16. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/ALE3.py +0 -0
  17. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/ALE4.py +0 -0
  18. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/ALE5.py +0 -0
  19. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/ALE6.py +0 -0
  20. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/ALE_backup.py +0 -0
  21. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/AssessCVG.py +0 -0
  22. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/AssessMarker.py +0 -0
  23. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/AssessMarkerDeltaLL.py +0 -0
  24. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/AssessMarkerPA.py +0 -0
  25. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/AssessPB.py +0 -0
  26. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/BMGE.jar +0 -0
  27. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/BMGE.py +0 -0
  28. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/CompareMCMC.py +0 -0
  29. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/ConcateMSA.py +0 -0
  30. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/ConvertMSA.py +0 -0
  31. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/Dir.rb +0 -0
  32. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/ExtractMarkerSeq.py +0 -0
  33. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/FastRoot.py +0 -0
  34. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/FastRoot_backup.py +0 -0
  35. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/GTDB_tree.py +0 -0
  36. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/KEGG_Luo17.py +0 -0
  37. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/LcaToLeaves.py +0 -0
  38. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/MarkerRef2Tree.py +0 -0
  39. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/MarkerRef2Tree_backup.py +0 -0
  40. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/MarkerSeq2Tree.py +0 -0
  41. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/ModifyTopo.py +0 -0
  42. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/Newick_tree_plotter.py +0 -0
  43. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/OMA.py +0 -0
  44. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/OMA2.py +0 -0
  45. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/OneLineAln.py +0 -0
  46. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/PB.py +0 -0
  47. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/PMSF.py +0 -0
  48. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/PhyloBiAssoc.R +0 -0
  49. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/PhyloBiAssoc.py +0 -0
  50. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/PlotMCMC.py +0 -0
  51. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/PlotMcmcNode.py +0 -0
  52. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/RootTree.py +0 -0
  53. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/RootTreeGTDB214.py +0 -0
  54. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/RootTreeGTDB220.py +0 -0
  55. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/SequentialDating.py +0 -0
  56. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/SingleAleHGT.py +0 -0
  57. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/SingleLinePhy.py +0 -0
  58. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/SliceMSA.py +0 -0
  59. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/SplitScore.py +0 -0
  60. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/SplitScore1.py +0 -0
  61. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/SplitScore1OMA.py +0 -0
  62. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/SplitScore2.py +0 -0
  63. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/TaxaCountStats.R +0 -0
  64. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/TaxonTree.py +0 -0
  65. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/TreeSAK_config.py +0 -0
  66. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/VisHPD95.R +0 -0
  67. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/VisHPD95.py +0 -0
  68. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/__init__.py +0 -0
  69. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/ale_parser.py +0 -0
  70. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/ale_splitter.py +0 -0
  71. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/alignment_pruner.pl +0 -0
  72. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/catfasta2phy.py +0 -0
  73. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/compare_trees.R +0 -0
  74. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/compare_trees.py +0 -0
  75. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/dating.py +0 -0
  76. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/dating_ss.py +0 -0
  77. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/deltall.py +0 -0
  78. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/do_rrtc.rb +0 -0
  79. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/fa2phy.py +0 -0
  80. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/format_leaf_name.py +0 -0
  81. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/gap_stats.py +0 -0
  82. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/get_SCG_tree.py +0 -0
  83. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/get_arCOG_seq.py +0 -0
  84. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/global_functions.py +0 -0
  85. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/iTOL.py +0 -0
  86. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/keep_highest_rrtc.py +0 -0
  87. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/label_tree.R +0 -0
  88. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/label_tree.py +0 -0
  89. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/mad.py +0 -0
  90. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/mcmc2tree.py +0 -0
  91. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/mcmcTC.py +0 -0
  92. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/merge_pdf.py +0 -0
  93. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/pRTC.py +0 -0
  94. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/plot_distruibution_th.py +0 -0
  95. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/prep_mcmctree_ctl.py +0 -0
  96. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/print_leaves.py +0 -0
  97. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/pruneMSA.py +0 -0
  98. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/recode.py +0 -0
  99. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/rename_leaves.py +0 -0
  100. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/replace_clade.py +0 -0
  101. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/root_with_out_group.py +0 -0
  102. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/run_TaxaCountStats_R_s1.py +0 -0
  103. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/subsample_drep_gnms.py +0 -0
  104. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/subset.py +0 -0
  105. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/subset_tree_stupid_old_way.py +0 -0
  106. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK/weighted_rand.rb +0 -0
  107. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK.egg-info/dependency_links.txt +0 -0
  108. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK.egg-info/requires.txt +0 -0
  109. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/TreeSAK.egg-info/top_level.txt +0 -0
  110. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/setup.cfg +0 -0
  111. {TreeSAK-1.43.3 → TreeSAK-1.44.0}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: TreeSAK
3
- Version: 1.43.3
3
+ Version: 1.44.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.43.3
27
+ TreeSAK v1.44.0
@@ -20,10 +20,10 @@ TreeSAK ALE7 -6 ALE6_op_dir -fun arCOG07811,K01995 -node 359,466,470 -o Fun_PA.t
20
20
 
21
21
  def ALE7(args):
22
22
 
23
- ale6_op_dir = args['6']
24
- interested_fun_txt = args['fun']
25
- interested_gnm_txt = args['node']
26
- op_txt = args['o']
23
+ ale6_op_dir = args['6']
24
+ interested_fun_txt = args['fun']
25
+ interested_gnm_txt = args['node']
26
+ op_txt = args['o']
27
27
 
28
28
  if os.path.isdir(ale6_op_dir) is False:
29
29
  print('%s not found, program exited!' % ale6_op_dir)
@@ -0,0 +1,191 @@
1
+ import os
2
+ import glob
3
+ import argparse
4
+ from Bio import SeqIO
5
+ import multiprocessing as mp
6
+
7
+
8
+ FunTree_usage = '''
9
+ ====================== FunTree example commands ======================
10
+
11
+ TreeSAK FunTree -i combined.faa -fun K01995,K01996,K01997,K01998,K01999 -kegg KEGG_wd -o interested_fun_seq_dir -bmge -t 12 -f
12
+
13
+ cd /scratch/PI/ocessongwz/Sponge_r220/4_OMA_wd/OMA_wd/Output
14
+ python3 FunTree.py -i /scratch/PI/ocessongwz/Sponge_r220/3_combined_genomes_50_5_dRep97_291.faa -fun K01995,K01996,K01997,K01998,K01999 -kegg /scratch/PI/ocessongwz/Sponge_r220/3_combined_genomes_50_5_dRep97_291_KEGG_wd -o interested_fun_tree_branched_chain_aa_transport_system -bmge -t 12 -f
15
+
16
+ /scratch/PI/ocessongwz/Sponge_r220/3_combined_genomes_50_5_dRep97_291_arCOG_wd
17
+
18
+ ======================================================================
19
+ '''
20
+
21
+
22
+ def select_seq(seq_file, seq_id_set, output_file):
23
+ output_file_handle = open(output_file, 'w')
24
+ for seq_record in SeqIO.parse(seq_file, 'fasta'):
25
+ seq_id = seq_record.id
26
+ if seq_id in seq_id_set:
27
+ SeqIO.write(seq_record, output_file_handle, 'fasta-2line')
28
+ output_file_handle.close()
29
+
30
+
31
+ def FunTree(args):
32
+
33
+ combined_faa = args['i']
34
+ cog_annotation_wd = args['cog']
35
+ kegg_annotation_wd = args['kegg']
36
+ interested_fun_txt = args['fun']
37
+ op_dir = args['o']
38
+ trim_with_bmge = args['bmge']
39
+ trim_model = args['bmge_m']
40
+ entropy_score_cutoff = args['bmge_esc']
41
+ iqtree_model = args['iqtree_m']
42
+ force_overwrite = args['f']
43
+ num_of_threads = args['t']
44
+
45
+ # specify path to BMGE.jar
46
+ current_file_path = '/'.join(os.path.realpath(__file__).split('/')[:-1])
47
+ pwd_bmge_jar = '%s/BMGE.jar' % current_file_path
48
+
49
+ interested_fun_set = set()
50
+ if os.path.isfile(interested_fun_txt) is False:
51
+ if ',' in interested_fun_txt:
52
+ interested_fun_set = interested_fun_txt.split(',')
53
+ else:
54
+ interested_fun_set.add(interested_fun_txt)
55
+ else:
56
+ for each_fun in open(interested_fun_txt):
57
+ interested_fun_set.add(each_fun.strip().split()[0])
58
+
59
+ ################################################################################
60
+
61
+ faa_dir = '%s/dir_1_faa' % op_dir
62
+ aln_dir = '%s/dir_2_msa' % op_dir
63
+ trimmed_aln_dir = '%s/dir_3_trimmed_msa' % op_dir
64
+ tree_dir = '%s/dir_4_tree' % op_dir
65
+ cmd_1_mafft_txt = '%s/cmd_1_mafft.txt' % op_dir
66
+ cmd_2_trim_txt = '%s/cmd_2_trim.txt' % op_dir
67
+ cmd_3_tree_txt = '%s/cmd_3_tree.txt' % op_dir
68
+
69
+ ################################################################################
70
+
71
+ # create output folder
72
+ if os.path.isdir(op_dir) is True:
73
+ if force_overwrite is True:
74
+ os.system('rm -r %s' % op_dir)
75
+ else:
76
+ print('%s exist, program exited!' % op_dir)
77
+ exit()
78
+
79
+ os.mkdir(op_dir)
80
+ os.mkdir(faa_dir)
81
+ os.mkdir(aln_dir)
82
+ os.mkdir(trimmed_aln_dir)
83
+ os.mkdir(tree_dir)
84
+
85
+ ################################################################################
86
+
87
+ fun_to_gene_dict = dict()
88
+ if kegg_annotation_wd is not None:
89
+
90
+ print('Reading in KEGG annotation results')
91
+ file_re = '%s/*KEGG_wd/*_ko_assignment_ABCD.txt' % (kegg_annotation_wd)
92
+ file_list = glob.glob(file_re)
93
+
94
+ if len(file_list) == 0:
95
+ print('KEGG annotation file not detected, program exited!')
96
+ exit()
97
+
98
+ for each_file in file_list:
99
+ line_index = 0
100
+ for each_line in open(each_file):
101
+ if line_index > 0:
102
+ each_line_split = each_line.strip().split('\t')
103
+ if len(each_line_split) == 9:
104
+ gene_id = each_line_split[0]
105
+ ko_d_id = each_line_split[4][2:]
106
+ if ko_d_id in interested_fun_set:
107
+ if ko_d_id not in fun_to_gene_dict:
108
+ fun_to_gene_dict[ko_d_id] = set()
109
+ fun_to_gene_dict[ko_d_id].add(gene_id)
110
+ line_index += 1
111
+
112
+ cmd_list_mafft = []
113
+ cmd_list_trim = []
114
+ cmd_list_tree = []
115
+ cmd_1_mafft_txt_handle = open(cmd_1_mafft_txt, 'w')
116
+ cmd_2_trim_txt_handle = open(cmd_2_trim_txt, 'w')
117
+ cmd_3_tree_txt_handle = open(cmd_3_tree_txt, 'w')
118
+ for each_fun in sorted(fun_to_gene_dict):
119
+
120
+ # define file name
121
+ fun_faa = '%s/%s.faa' % (faa_dir, each_fun)
122
+ current_gene_tree_dir = '%s/%s' % (tree_dir, each_fun)
123
+ fun_aln = '%s/%s.aln' % (aln_dir, each_fun)
124
+ fun_aln_trimmed = '%s/%s_trimal.aln' % (trimmed_aln_dir, each_fun)
125
+ if trim_with_bmge is True:
126
+ fun_aln_trimmed = '%s/%s_bmge.aln' % (trimmed_aln_dir, each_fun)
127
+
128
+ # extract sequences
129
+ current_fun_gene_set = fun_to_gene_dict[each_fun]
130
+ select_seq(combined_faa, current_fun_gene_set, fun_faa)
131
+
132
+ os.system('mkdir %s' % current_gene_tree_dir)
133
+
134
+ # prepare commands
135
+ mafft_cmd = 'mafft-einsi --thread %s --quiet %s > %s' % (1, fun_faa, fun_aln)
136
+ trim_cmd = 'trimal -in %s -out %s -automated1' % (fun_aln, fun_aln_trimmed)
137
+ if trim_with_bmge is True:
138
+ trim_cmd = 'java -jar %s -i %s -m %s -t AA -h %s -of %s' % (pwd_bmge_jar, fun_aln, trim_model, entropy_score_cutoff, fun_aln_trimmed)
139
+ infer_tree_cmd = 'iqtree2 -s %s --seqtype AA -m %s -B 1000 --wbtl --bnni --prefix %s/%s -T %s --quiet' % (fun_aln_trimmed, iqtree_model, current_gene_tree_dir, each_fun, num_of_threads)
140
+
141
+ # add commands to list
142
+ cmd_list_mafft.append(mafft_cmd)
143
+ cmd_list_trim.append(trim_cmd)
144
+ cmd_list_tree.append(infer_tree_cmd)
145
+
146
+ # write out commands
147
+ cmd_1_mafft_txt_handle.write(mafft_cmd + '\n')
148
+ cmd_2_trim_txt_handle.write(trim_cmd + '\n')
149
+ cmd_3_tree_txt_handle.write(infer_tree_cmd + '\n')
150
+
151
+ cmd_1_mafft_txt_handle.close()
152
+ cmd_2_trim_txt_handle.close()
153
+ cmd_3_tree_txt_handle.close()
154
+
155
+ # run mafft commands
156
+ print('Running mafft with %s cores for %s commands' % (num_of_threads, len(cmd_list_mafft)))
157
+ pool = mp.Pool(processes=num_of_threads)
158
+ pool.map(os.system, cmd_list_mafft)
159
+ pool.close()
160
+ pool.join()
161
+
162
+ # run trim commands
163
+ print('Trimming with %s cores for %s commands' % (num_of_threads, len(cmd_list_trim)))
164
+ pool = mp.Pool(processes=num_of_threads)
165
+ pool.map(os.system, cmd_list_trim)
166
+ pool.close()
167
+ pool.join()
168
+
169
+ # run iqtree commands
170
+ print('Running iqtree with %s cores' % num_of_threads)
171
+ for each_iqtree_cmd in sorted(cmd_list_tree):
172
+ print(each_iqtree_cmd)
173
+ os.system(each_iqtree_cmd)
174
+
175
+
176
+ if __name__ == '__main__':
177
+
178
+ FunTree_parser = argparse.ArgumentParser()
179
+ FunTree_parser.add_argument('-i', required=True, help='orthologous gene sequence')
180
+ FunTree_parser.add_argument('-fun', required=True, help='interested functions')
181
+ FunTree_parser.add_argument('-cog', required=False, default=None, help='COG annotation results')
182
+ FunTree_parser.add_argument('-kegg', required=False, default=None, help='KEGG annotation results')
183
+ FunTree_parser.add_argument('-o', required=True, help='output directory')
184
+ FunTree_parser.add_argument('-bmge', required=False, action="store_true", help='trim with BMGE, default is trimal')
185
+ FunTree_parser.add_argument('-bmge_m', required=False, default='BLOSUM30', help='trim model, default: BLOSUM30')
186
+ FunTree_parser.add_argument('-bmge_esc', required=False, default='0.55', help='entropy score cutoff, default: 0.55')
187
+ FunTree_parser.add_argument('-iqtree_m', required=False, default='LG+G+I', help='iqtree_model, default: LG+G+I')
188
+ FunTree_parser.add_argument('-f', required=False, action="store_true", help='force overwrite')
189
+ FunTree_parser.add_argument('-t', required=False, type=int, default=1, help='num of threads, default: 1')
190
+ args = vars(FunTree_parser.parse_args())
191
+ FunTree(args)
@@ -1,3 +1,6 @@
1
+ 1.44.0
2
+ - new module added: FunTree
3
+
1
4
  1.43.3
2
5
  - fixed bugs
3
6
 
@@ -160,7 +160,7 @@ def supertree(args):
160
160
  fa_file_list = ['.'.join(os.path.basename(i).split('.')[:-1]) for i in glob.glob(fa_file_re)]
161
161
 
162
162
  if len(fa_file_list) == 0:
163
- print('No file found in %s, progeam exited!' % oma_op_fasta)
163
+ print('No file found in %s, program exited!' % oma_op_fasta)
164
164
  exit()
165
165
 
166
166
  ################################################################################
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: TreeSAK
3
- Version: 1.43.3
3
+ Version: 1.44.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.43.3
27
+ TreeSAK v1.44.0
@@ -26,6 +26,7 @@ TreeSAK/Dir.rb
26
26
  TreeSAK/ExtractMarkerSeq.py
27
27
  TreeSAK/FastRoot.py
28
28
  TreeSAK/FastRoot_backup.py
29
+ TreeSAK/FunTree.py
29
30
  TreeSAK/GTDB_tree.py
30
31
  TreeSAK/KEGG_Luo17.py
31
32
  TreeSAK/LcaToLeaves.py
@@ -72,6 +72,7 @@ def print_main_help():
72
72
  ModifyTopo -> Modify tree topology
73
73
  GeneRax -> (to be added) Run GeneRax
74
74
  ALE -> Modules for running ALE
75
+ FunTree -> Infer tree for individual COG/KEGG function
75
76
  RootTree -> Root tree with outgroup leaves
76
77
  RootTreeGTDB214 -> Root tree by GTDB taxonomy (r214)
77
78
  RootTreeGTDB220 -> Root tree by GTDB taxonomy (r220)
@@ -824,6 +825,23 @@ if __name__ == '__main__':
824
825
  args = vars(parser.parse_args())
825
826
  mcmc2tree.mcmc2tree(args)
826
827
 
828
+ elif sys.argv[1] == 'FunTree':
829
+ from TreeSAK import FunTree
830
+ FunTree_parser = subparsers.add_parser('FunTree', usage=FunTree.FunTree_usage)
831
+ FunTree_parser.add_argument('-i', required=True, help='orthologous gene sequence')
832
+ FunTree_parser.add_argument('-fun', required=True, help='interested functions')
833
+ FunTree_parser.add_argument('-cog', required=False, default=None, help='COG annotation results')
834
+ FunTree_parser.add_argument('-kegg', required=False, default=None, help='KEGG annotation results')
835
+ FunTree_parser.add_argument('-o', required=True, help='output directory')
836
+ FunTree_parser.add_argument('-bmge', required=False, action="store_true", help='trim with BMGE, default is trimal')
837
+ FunTree_parser.add_argument('-bmge_m', required=False, default='BLOSUM30', help='trim model, default: BLOSUM30')
838
+ FunTree_parser.add_argument('-bmge_esc', required=False, default='0.55', help='entropy score cutoff, default: 0.55')
839
+ FunTree_parser.add_argument('-iqtree_m', required=False, default='LG+G+I', help='iqtree_model, default: LG+G+I')
840
+ FunTree_parser.add_argument('-f', required=False, action="store_true", help='force overwrite')
841
+ FunTree_parser.add_argument('-t', required=False, type=int, default=1, help='num of threads, default: 1')
842
+ args = vars(parser.parse_args())
843
+ FunTree.FunTree(args)
844
+
827
845
  else:
828
846
  print('Unrecognized module: %s, program exited' % sys.argv[1])
829
847
  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