TreeSAK 1.35.0__tar.gz → 1.35.2__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.0/TreeSAK.egg-info → TreeSAK-1.35.2}/PKG-INFO +2 -2
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/OMA2.py +59 -15
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/PB.py +7 -4
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/SplitScore1.py +18 -26
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/VERSION +1 -1
- {TreeSAK-1.35.0 → TreeSAK-1.35.2/TreeSAK.egg-info}/PKG-INFO +2 -2
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/bin/TreeSAK +12 -12
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/LICENSE +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/MANIFEST.in +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/README.md +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/ALE.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/ALE1.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/ALE2.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/ALE2RTC.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/ALE3.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/ALE4.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/ALE5.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/ALE6.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/ALE_backup.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/AlignmentPruner.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/AssessCVG.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/AssessMarker.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/AssessMarkerDeltaLL.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/AssessMarkerPA.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/AssessPB.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/BMGE.jar +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/BMGE.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/CompareMCMC.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/ConcateMSA.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/ConvertMSA.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/Dir.rb +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/ExtractMarkerSeq.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/FastRoot.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/FastRoot_backup.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/GTDB_tree.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/KEGG_Luo17.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/LcaToLeaves.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/MCMCtreeR.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/MarkerRef2Tree.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/MarkerRef2Tree_backup.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/MarkerSeq2Tree.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/ModifyTopo.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/OMA.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/OneLineAln.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/PMSF.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/PhyloBiAssoc.R +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/PhyloBiAssoc.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/PlotMcmcNode.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/RootTree.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/RootTreeGTDB214.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/RootTreeGTDB220.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/SequentialDating.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/SingleAleHGT.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/SingleLinePhy.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/SliceMSA.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/SplitScore.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/SplitScore1OMA.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/SplitScore2.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/TaxaCountStats.R +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/TreeSAK_config.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/VisHPD95.R +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/VisHPD95.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/__init__.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/ale_parser.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/ale_splitter.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/compare_trees.R +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/compare_trees.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/dating.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/dating_ss.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/do_rrtc.rb +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/fa2phy.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/format_leaf_name.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/get_arCOG_seq.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/global_functions.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/merge_pdf.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/pRTC.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/parse_deltall_stdout.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/plot_distruibution_th.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/prep_mcmctree_ctl.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/print_leaves.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/rename_leaves.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/replace_clade.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/root_with_out_group.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/run_TaxaCountStats_R_s1.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/subsample_drep_gnms.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/subset.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/subset_tree_stupid_old_way.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/test_1.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/test_2.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/tmp_2.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/tmp_3.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/tmp_4.py +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK/weighted_rand.rb +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK.egg-info/SOURCES.txt +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK.egg-info/dependency_links.txt +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK.egg-info/requires.txt +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/TreeSAK.egg-info/top_level.txt +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/setup.cfg +0 -0
- {TreeSAK-1.35.0 → TreeSAK-1.35.2}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: TreeSAK
|
|
3
|
-
Version: 1.35.
|
|
3
|
+
Version: 1.35.2
|
|
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.35.
|
|
27
|
+
TreeSAK v1.35.2
|
|
@@ -4,11 +4,12 @@ from Bio import SeqIO
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
OMA2_usage = '''
|
|
7
|
-
|
|
7
|
+
============================== OMA2 example commands ==============================
|
|
8
8
|
|
|
9
|
-
TreeSAK OMA2 -i OrthologousGroups.txt -s OrthologousGroupsFasta -o op_dir -f
|
|
9
|
+
TreeSAK OMA2 -i OrthologousGroups.txt -s OrthologousGroupsFasta -o op_dir -f -n 3
|
|
10
|
+
TreeSAK OMA2 -i OrthologousGroups.txt -s OrthologousGroupsFasta -o op_dir -f -n 85
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
===================================================================================
|
|
12
13
|
'''
|
|
13
14
|
|
|
14
15
|
|
|
@@ -52,16 +53,31 @@ def OMA2(args):
|
|
|
52
53
|
op_dir = args['o']
|
|
53
54
|
force_overwrite = args['f']
|
|
54
55
|
min_gene_num = args['n']
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
min_gene_cov = args['c']
|
|
57
|
+
|
|
58
|
+
if (min_gene_num is None) and (min_gene_cov is None):
|
|
59
|
+
print('Please specify either -c or -n, program exited!')
|
|
60
|
+
exit()
|
|
61
|
+
elif (min_gene_num is not None) and (min_gene_cov is not None):
|
|
62
|
+
print('-c and -n are not compatible, please provide only one, program exited!')
|
|
63
|
+
exit()
|
|
64
|
+
|
|
65
|
+
og_txt_out = ''
|
|
66
|
+
filtered_seq_dir = ''
|
|
67
|
+
if min_gene_num is not None:
|
|
68
|
+
og_txt_out = '%s/OrthologousGroups_num%s.txt' % (op_dir, min_gene_num)
|
|
69
|
+
filtered_seq_dir = '%s/OrthologousGroupsFasta_num%s' % (op_dir, min_gene_num)
|
|
70
|
+
if min_gene_cov is not None:
|
|
71
|
+
og_txt_out = '%s/OrthologousGroups_cov%s.txt' % (op_dir, min_gene_cov)
|
|
72
|
+
filtered_seq_dir = '%s/OrthologousGroupsFasta_cov%s' % (op_dir, min_gene_cov)
|
|
58
73
|
|
|
59
74
|
# check genome files
|
|
60
75
|
interested_gnm_set = set()
|
|
61
76
|
if gnm_txt is not None:
|
|
62
77
|
if os.path.isfile(gnm_txt) is True:
|
|
63
78
|
for each_gnm in open(gnm_txt):
|
|
64
|
-
|
|
79
|
+
gnm_id = each_gnm.strip().split()[0]
|
|
80
|
+
interested_gnm_set.add(gnm_id)
|
|
65
81
|
else:
|
|
66
82
|
print('%s not found, program exited!' % gnm_txt)
|
|
67
83
|
exit()
|
|
@@ -76,6 +92,16 @@ def OMA2(args):
|
|
|
76
92
|
os.system('mkdir %s' % op_dir)
|
|
77
93
|
os.system('mkdir %s' % filtered_seq_dir)
|
|
78
94
|
|
|
95
|
+
# get overall genome set
|
|
96
|
+
overall_gnm_set = set()
|
|
97
|
+
for each_line in open(og_txt):
|
|
98
|
+
if not each_line.startswith('#'):
|
|
99
|
+
each_line_split = each_line.strip().split('\t')
|
|
100
|
+
gene_list = each_line_split[1:]
|
|
101
|
+
for each_gene in gene_list:
|
|
102
|
+
gene_gnm = each_gene.split(':')[0]
|
|
103
|
+
overall_gnm_set.add(gene_gnm)
|
|
104
|
+
|
|
79
105
|
qualified_og_set = set()
|
|
80
106
|
id_to_name_dict = dict()
|
|
81
107
|
gene_to_extract_dict = dict()
|
|
@@ -97,7 +123,20 @@ def OMA2(args):
|
|
|
97
123
|
if gene_gnm in interested_gnm_set:
|
|
98
124
|
filtered_gene_set.add(gene_id)
|
|
99
125
|
|
|
100
|
-
|
|
126
|
+
qualified_og = False
|
|
127
|
+
if min_gene_num is not None:
|
|
128
|
+
if len(filtered_gene_set) >= float(min_gene_num):
|
|
129
|
+
qualified_og = True
|
|
130
|
+
if min_gene_cov is not None:
|
|
131
|
+
if len(interested_gnm_set) == 0:
|
|
132
|
+
gnm_cov = len(filtered_gene_set)*100/len(overall_gnm_set)
|
|
133
|
+
else:
|
|
134
|
+
gnm_cov = len(filtered_gene_set)*100/len(interested_gnm_set)
|
|
135
|
+
|
|
136
|
+
if gnm_cov >= float(min_gene_cov):
|
|
137
|
+
qualified_og = True
|
|
138
|
+
|
|
139
|
+
if qualified_og is True:
|
|
101
140
|
qualified_og_set.add(og_id)
|
|
102
141
|
og_txt_out_handle.write('%s\t%s\n' % (filename, ','.join(sorted(list(filtered_gene_set)))))
|
|
103
142
|
gene_to_extract_dict[og_id] = filtered_gene_set
|
|
@@ -109,18 +148,23 @@ def OMA2(args):
|
|
|
109
148
|
filtered_file = '%s/%s.fa' % (filtered_seq_dir, seq_file_name)
|
|
110
149
|
select_seq(source_file, gene_to_extract_dict[each_og], filtered_file)
|
|
111
150
|
|
|
112
|
-
|
|
151
|
+
if min_gene_num is not None:
|
|
152
|
+
print('The number of OG with genes >= %s is %s' % (min_gene_num, len(qualified_og_set)))
|
|
153
|
+
if min_gene_cov is not None:
|
|
154
|
+
print('The number of OG with coverage >= %s is %s' % (min_gene_cov, len(qualified_og_set)))
|
|
155
|
+
|
|
113
156
|
print('Done!')
|
|
114
157
|
|
|
115
158
|
|
|
116
159
|
if __name__ == '__main__':
|
|
117
160
|
|
|
118
161
|
OMA2_parser = argparse.ArgumentParser()
|
|
119
|
-
OMA2_parser.add_argument('-i', required=True,
|
|
120
|
-
OMA2_parser.add_argument('-s', required=True,
|
|
121
|
-
OMA2_parser.add_argument('-g', required=False, default=None,
|
|
122
|
-
OMA2_parser.add_argument('-o', required=True, default=None,
|
|
123
|
-
OMA2_parser.add_argument('-n', required=False,
|
|
124
|
-
OMA2_parser.add_argument('-
|
|
162
|
+
OMA2_parser.add_argument('-i', required=True, help='OrthologousGroups.txt')
|
|
163
|
+
OMA2_parser.add_argument('-s', required=True, help='sequence dir, OrthologousGroupsFasta')
|
|
164
|
+
OMA2_parser.add_argument('-g', required=False, default=None, help='interested genomes')
|
|
165
|
+
OMA2_parser.add_argument('-o', required=True, default=None, help='output directory')
|
|
166
|
+
OMA2_parser.add_argument('-n', required=False, default=None, help='minimal number of gene in a OG, not compatible with -c')
|
|
167
|
+
OMA2_parser.add_argument('-c', required=False, default=None, help='minimal genome coverage cutoff, not compatible with -n')
|
|
168
|
+
OMA2_parser.add_argument('-f', required=False, action="store_true", help='force overwrite')
|
|
125
169
|
args = vars(OMA2_parser.parse_args())
|
|
126
170
|
OMA2(args)
|
|
@@ -14,16 +14,19 @@ TreeSAK PB -i in.phylip -p chain_name -t 12
|
|
|
14
14
|
|
|
15
15
|
# Notes:
|
|
16
16
|
1. This is a wrapper for: mpirun -np 12 pb_mpi -d in.phylip -cat -gtr -x 10 -1 -dgam 4 -s chain_name
|
|
17
|
-
|
|
18
17
|
2. Input MSA need to be in phylip format.
|
|
18
|
+
3. To stop a chain, just open the <chain_name>.run file and replace the 1 by a 0 (echo 0 > <chain_name>.run).
|
|
19
|
+
4. Be careful not to restart an already running chain.
|
|
20
|
+
5. You can stop a chain and restart it under a different degree of parallelization.
|
|
21
|
+
6. Generally, PhyloBayes provides good results for a total number of points of 10000-30000.
|
|
19
22
|
|
|
20
|
-
|
|
23
|
+
* Settings used by Nina Dombrowski: -cat -gtr -x 10 -1 -dgam 4
|
|
21
24
|
For each marker protein family, four parallel chains were run until convergence was reached, unless stated
|
|
22
25
|
otherwise (maxdiff < 0.3; settings: bpcomp -x 25_burnin chain1 chain2 chain3 chain4). Additionally, we
|
|
23
26
|
checked for the minimum effective size using tracecomp (minimum effective size > 50; settings: -x 25_burnin
|
|
24
27
|
chain1 chain2 chain3 chain4).
|
|
25
|
-
|
|
26
|
-
|
|
28
|
+
|
|
29
|
+
* Settings used by Fan Lu:
|
|
27
30
|
Four chains were run for each consensus tree, and for each chain over 15,000 cycles (5,000 burn-in)
|
|
28
31
|
were conducted, until a maxdiff value lower than 0.3 was reached. Otherwise, non-converged chains were
|
|
29
32
|
continually run to over 20,000 cycles. Posterior predictive tests were conducted using PhyloBayes MPI
|
|
@@ -37,7 +37,6 @@ def SplitScore1(args):
|
|
|
37
37
|
force_overwrite = args['f']
|
|
38
38
|
num_of_js_threads = args['jst']
|
|
39
39
|
op_dir = args['o']
|
|
40
|
-
run_cmd = args['r']
|
|
41
40
|
|
|
42
41
|
################################################################################
|
|
43
42
|
|
|
@@ -89,7 +88,9 @@ def SplitScore1(args):
|
|
|
89
88
|
|
|
90
89
|
# define file name
|
|
91
90
|
qualified_og_dir = '%s/qualified_OGs' % op_dir
|
|
92
|
-
|
|
91
|
+
cmd_1_mafft_txt = '%s/cmd_1_mafft.txt' % op_dir
|
|
92
|
+
cmd_2_trimal_txt = '%s/cmd_2_trimal.txt' % op_dir
|
|
93
|
+
cmd_3_iqtree_txt = '%s/cmd_3_iqtree.txt' % op_dir
|
|
93
94
|
ignored_marker_txt = '%s/ignored_markers.txt' % op_dir
|
|
94
95
|
|
|
95
96
|
# create output folder
|
|
@@ -104,11 +105,11 @@ def SplitScore1(args):
|
|
|
104
105
|
|
|
105
106
|
################################################################################
|
|
106
107
|
|
|
107
|
-
|
|
108
|
-
|
|
108
|
+
cmd_1_mafft_txt_handle = open(cmd_1_mafft_txt, 'w')
|
|
109
|
+
cmd_2_trimal_txt_handle = open(cmd_2_trimal_txt, 'w')
|
|
110
|
+
cmd_3_iqtree_txt_handle = open(cmd_3_iqtree_txt, 'w')
|
|
109
111
|
ignored_og_dict = dict()
|
|
110
112
|
for each_og in og_to_gene_dict:
|
|
111
|
-
|
|
112
113
|
seq_file_in = '%s/%s.%s' % (oma_op_fasta, each_og, fasta_file_ext)
|
|
113
114
|
file_out_seq = '%s/%s.%s' % (qualified_og_dir, each_og, fasta_file_ext)
|
|
114
115
|
file_out_aln = '%s.aln' % each_og
|
|
@@ -138,10 +139,12 @@ def SplitScore1(args):
|
|
|
138
139
|
trimal_cmd = 'trimal -in %s -out %s -automated1' % (file_out_aln, file_out_aln_trimmed)
|
|
139
140
|
iqtree_cmd = 'iqtree2 -s %s --seqtype AA -m %s -B 1000 --wbtl --bnni --prefix %s -T %s --quiet' % (file_out_aln_trimmed, iqtree_model, each_og, num_of_js_threads)
|
|
140
141
|
# Undinarchaeota illuminate DPANN phylogeny and the impact of gene transfer on archaeal evolution, settings: -m LG+G -bb 1000 -wbtl -bnni
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
142
|
+
cmd_1_mafft_txt_handle.write(mafft_cmd + '\n')
|
|
143
|
+
cmd_2_trimal_txt_handle.write(trimal_cmd + '\n')
|
|
144
|
+
cmd_3_iqtree_txt_handle.write(iqtree_cmd + '\n')
|
|
145
|
+
cmd_1_mafft_txt_handle.close()
|
|
146
|
+
cmd_2_trimal_txt_handle.close()
|
|
147
|
+
cmd_3_iqtree_txt_handle.close()
|
|
145
148
|
|
|
146
149
|
# report ignored markers
|
|
147
150
|
if len(ignored_og_dict) > 0:
|
|
@@ -152,14 +155,12 @@ def SplitScore1(args):
|
|
|
152
155
|
ignored_marker_txt_handle.write(ignored_og_dict[each_ignored_marker] + '\n')
|
|
153
156
|
ignored_marker_txt_handle.close()
|
|
154
157
|
|
|
155
|
-
#
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
os.system(each_cmd)
|
|
162
|
-
cmd_index += 1
|
|
158
|
+
# report
|
|
159
|
+
print('You will need to execute the commands exported to the following three files before moving to SplitScore2')
|
|
160
|
+
print(cmd_1_mafft_txt)
|
|
161
|
+
print(cmd_2_trimal_txt)
|
|
162
|
+
print(cmd_3_iqtree_txt)
|
|
163
|
+
print('Done!')
|
|
163
164
|
|
|
164
165
|
|
|
165
166
|
if __name__ == '__main__':
|
|
@@ -173,14 +174,5 @@ if __name__ == '__main__':
|
|
|
173
174
|
SplitScore1_parser.add_argument('-c', required=False, type=int, default=85, help='coverage cutoff, default: 85')
|
|
174
175
|
SplitScore1_parser.add_argument('-f', required=False, action="store_true", help='force overwrite')
|
|
175
176
|
SplitScore1_parser.add_argument('-jst', required=False, type=int, default=1, help='num of threads for iqtree2, default: 1')
|
|
176
|
-
SplitScore1_parser.add_argument('-r', required=False, action="store_true", help='run commands')
|
|
177
177
|
args = vars(SplitScore1_parser.parse_args())
|
|
178
178
|
SplitScore1(args)
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
'''
|
|
182
|
-
|
|
183
|
-
cd /Users/songweizhi/Desktop/888
|
|
184
|
-
/usr/local/bin/python3.7 /Users/songweizhi/PycharmProjects/TreeSAK/TreeSAK/SplitScore1.py -i marker_set_1_s03_marker_seq -x fa -o op_dir -f -jst 6
|
|
185
|
-
|
|
186
|
-
'''
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: TreeSAK
|
|
3
|
-
Version: 1.35.
|
|
3
|
+
Version: 1.35.2
|
|
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.35.
|
|
27
|
+
TreeSAK v1.35.2
|
|
@@ -407,7 +407,6 @@ if __name__ == '__main__':
|
|
|
407
407
|
SplitScore1_parser.add_argument('-c', required=False, type=int, default=85, help='coverage cutoff, default: 85')
|
|
408
408
|
SplitScore1_parser.add_argument('-f', required=False, action="store_true", help='force overwrite')
|
|
409
409
|
SplitScore1_parser.add_argument('-jst', required=False, type=int, default=1, help='num of threads for iqtree2, default: 1')
|
|
410
|
-
SplitScore1_parser.add_argument('-r', required=False, action="store_true", help='run commands')
|
|
411
410
|
args = vars(parser.parse_args())
|
|
412
411
|
SplitScore1.SplitScore1(args)
|
|
413
412
|
|
|
@@ -474,12 +473,13 @@ if __name__ == '__main__':
|
|
|
474
473
|
elif sys.argv[1] in ['OMA2', 'oma2', 'Oma2']:
|
|
475
474
|
from TreeSAK import OMA2
|
|
476
475
|
OMA2_parser = subparsers.add_parser('OMA2', usage=OMA2.OMA2_usage)
|
|
477
|
-
OMA2_parser.add_argument('-i',
|
|
478
|
-
OMA2_parser.add_argument('-s',
|
|
479
|
-
OMA2_parser.add_argument('-g',
|
|
480
|
-
OMA2_parser.add_argument('-o',
|
|
481
|
-
OMA2_parser.add_argument('-n',
|
|
482
|
-
OMA2_parser.add_argument('-
|
|
476
|
+
OMA2_parser.add_argument('-i', required=True, help='OrthologousGroups.txt')
|
|
477
|
+
OMA2_parser.add_argument('-s', required=True, help='sequence dir, OrthologousGroupsFasta')
|
|
478
|
+
OMA2_parser.add_argument('-g', required=False, default=None, help='interested genomes')
|
|
479
|
+
OMA2_parser.add_argument('-o', required=True, default=None, help='output directory')
|
|
480
|
+
OMA2_parser.add_argument('-n', required=False, default=None, help='minimal number of gene in a OG, not compatible with -c')
|
|
481
|
+
OMA2_parser.add_argument('-c', required=False, default=None, help='minimal genome coverage cutoff, not compatible with -n')
|
|
482
|
+
OMA2_parser.add_argument('-f', required=False, action="store_true", help='force overwrite')
|
|
483
483
|
args = vars(parser.parse_args())
|
|
484
484
|
OMA2.OMA2(args)
|
|
485
485
|
|
|
@@ -488,7 +488,7 @@ if __name__ == '__main__':
|
|
|
488
488
|
print(ALE.ALE_usage)
|
|
489
489
|
exit()
|
|
490
490
|
|
|
491
|
-
elif sys.argv[1]
|
|
491
|
+
elif sys.argv[1] in ['ALE1', 'ale1', 'Ale1']:
|
|
492
492
|
from TreeSAK import ALE1
|
|
493
493
|
ALE1_parser = subparsers.add_parser('ALE1', usage=ALE1.ALE1_usage)
|
|
494
494
|
ALE1_parser.add_argument('-i', required=False, default=None, help='orthologous groups, either from orthofinder or oma')
|
|
@@ -503,7 +503,7 @@ if __name__ == '__main__':
|
|
|
503
503
|
args = vars(parser.parse_args())
|
|
504
504
|
ALE1.ALE1(args)
|
|
505
505
|
|
|
506
|
-
elif sys.argv[1]
|
|
506
|
+
elif sys.argv[1] in ['ALE2', 'ale2', 'Ale2']:
|
|
507
507
|
from TreeSAK import ALE2
|
|
508
508
|
ALE2_parser = subparsers.add_parser('ALE2', usage=ALE2.ALE2_usage)
|
|
509
509
|
ALE2_parser.add_argument('-1', required=True, help='ALE1 output directory')
|
|
@@ -516,7 +516,7 @@ if __name__ == '__main__':
|
|
|
516
516
|
args = vars(parser.parse_args())
|
|
517
517
|
ALE2.ALE2(args)
|
|
518
518
|
|
|
519
|
-
elif sys.argv[1]
|
|
519
|
+
elif sys.argv[1] in ['ALE3', 'ale3', 'Ale3']:
|
|
520
520
|
from TreeSAK import ALE3
|
|
521
521
|
ALE3_parser = subparsers.add_parser('ALE3', usage=ALE3.ALE3_usage)
|
|
522
522
|
ALE3_parser.add_argument('-2', required=True, help='Folder with uml_rec files')
|
|
@@ -527,7 +527,7 @@ if __name__ == '__main__':
|
|
|
527
527
|
args = vars(parser.parse_args())
|
|
528
528
|
ALE3.ALE3(args)
|
|
529
529
|
|
|
530
|
-
elif sys.argv[1]
|
|
530
|
+
elif sys.argv[1] in ['ALE4', 'ale4', 'Ale4']:
|
|
531
531
|
from TreeSAK import ALE4
|
|
532
532
|
ALE4_parser = subparsers.add_parser('ALE4', usage=ALE4.ALE4_usage)
|
|
533
533
|
ALE4_parser.add_argument('-1', required=True, help='ALE1 output directory')
|
|
@@ -544,7 +544,7 @@ if __name__ == '__main__':
|
|
|
544
544
|
args = vars(parser.parse_args())
|
|
545
545
|
ALE4.ALE4(args)
|
|
546
546
|
|
|
547
|
-
elif sys.argv[1]
|
|
547
|
+
elif sys.argv[1] in ['ALE6', 'ale6', 'Ale6']:
|
|
548
548
|
from TreeSAK import ALE6
|
|
549
549
|
ALE6_parser = subparsers.add_parser('ALE6', usage=ALE6.ALE6_usage)
|
|
550
550
|
ALE6_parser.add_argument('-1', required=True, help='ALE1 output directory')
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|