kssdtree 2.0.5__tar.gz → 2.0.6__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.
- {kssdtree-2.0.5/kssdtree.egg-info → kssdtree-2.0.6}/PKG-INFO +3 -6
- {kssdtree-2.0.5 → kssdtree-2.0.6/kssdtree.egg-info}/PKG-INFO +3 -6
- {kssdtree-2.0.5 → kssdtree-2.0.6}/kssdtree.py +0 -4
- {kssdtree-2.0.5 → kssdtree-2.0.6}/setup.py +1 -1
- {kssdtree-2.0.5 → kssdtree-2.0.6}/toolutils.py +25 -13
- {kssdtree-2.0.5 → kssdtree-2.0.6}/MANIFEST.in +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/README.md +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/align.c +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/buildtree.c +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/bytescale.c +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/cluster.c +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/co2mco.c +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/command_composite.c +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/command_dist.c +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/command_dist_wrapper.c +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/command_set.c +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/command_shuffle.c +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/distancemat.c +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/dnj.c +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/dnjheaders/bytescale.h +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/dnjheaders/dnj.h +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/dnjheaders/filebuff.h +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/dnjheaders/hclust.h +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/dnjheaders/matrix.h +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/dnjheaders/mman.h +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/dnjheaders/nj.h +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/dnjheaders/nwck.h +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/dnjheaders/pherror.h +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/dnjheaders/phy.h +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/dnjheaders/qseqs.h +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/dnjheaders/str.h +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/dnjheaders/threader.h +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/dnjheaders/tmp.h +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/dnjheaders/vector.h +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/filebuff.c +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/global_basic.c +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/hclust.c +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/iseq2comem.c +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/kssdheaders/co2mco.h +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/kssdheaders/command_composite.h +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/kssdheaders/command_dist.h +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/kssdheaders/command_dist_wrapper.h +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/kssdheaders/command_set.h +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/kssdheaders/command_shuffle.h +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/kssdheaders/global_basic.h +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/kssdheaders/iseq2comem.h +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/kssdheaders/mman.h +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/kssdheaders/mytime.h +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/kssdtree.egg-info/SOURCES.txt +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/kssdtree.egg-info/dependency_links.txt +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/kssdtree.egg-info/not-zip-safe +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/kssdtree.egg-info/requires.txt +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/kssdtree.egg-info/top_level.txt +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/matrix.c +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/mman.c +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/mytime.c +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/nj.c +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/njheaders/align.h +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/njheaders/buildtree.h +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/njheaders/cluster.h +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/njheaders/distancemat.h +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/njheaders/sequence.h +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/njheaders/tree.h +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/njheaders/util.h +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/nwck.c +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/pherror.c +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/phy.c +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/pydnj.c +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/pykssd.c +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/pynj.c +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/qseqs.c +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/sequence.c +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/setup.cfg +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/str.c +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/tmp.c +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/tree.c +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/util.c +0 -0
- {kssdtree-2.0.5 → kssdtree-2.0.6}/vector.c +0 -0
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
Metadata-Version:
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
2
|
Name: kssdtree
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.6
|
|
4
4
|
Summary: Kssdtree is a versatile Python package for phylogenetic analysis. It also provides one-stop tree construction and visualization. It can handle DNA sequences of both fasta or fastq format, whether gzipped or not.
|
|
5
5
|
Home-page: https://github.com/yhlink/kssdtree
|
|
6
|
+
Download-URL: https://pypi.org/project/kssdtree
|
|
6
7
|
Author: Hang Yang
|
|
7
8
|
Author-email: yhlink1207@gmail.com
|
|
8
|
-
License: UNKNOWN
|
|
9
|
-
Download-URL: https://pypi.org/project/kssdtree
|
|
10
|
-
Description: UNKNOWN
|
|
11
|
-
Platform: UNKNOWN
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
Metadata-Version:
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
2
|
Name: kssdtree
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.6
|
|
4
4
|
Summary: Kssdtree is a versatile Python package for phylogenetic analysis. It also provides one-stop tree construction and visualization. It can handle DNA sequences of both fasta or fastq format, whether gzipped or not.
|
|
5
5
|
Home-page: https://github.com/yhlink/kssdtree
|
|
6
|
+
Download-URL: https://pypi.org/project/kssdtree
|
|
6
7
|
Author: Hang Yang
|
|
7
8
|
Author-email: yhlink1207@gmail.com
|
|
8
|
-
License: UNKNOWN
|
|
9
|
-
Download-URL: https://pypi.org/project/kssdtree
|
|
10
|
-
Description: UNKNOWN
|
|
11
|
-
Platform: UNKNOWN
|
|
@@ -336,7 +336,6 @@ def quick(shuf_file=None, genome_files=None, output=None, reference=None, databa
|
|
|
336
336
|
if not s3:
|
|
337
337
|
return False
|
|
338
338
|
print('Step4...')
|
|
339
|
-
print('Tree visualization finished!')
|
|
340
339
|
visualize(newick=output, mode=mode)
|
|
341
340
|
if platform.system() == 'Linux':
|
|
342
341
|
current_directory = os.getcwd()
|
|
@@ -367,7 +366,6 @@ def quick(shuf_file=None, genome_files=None, output=None, reference=None, databa
|
|
|
367
366
|
s2 = retrieve(database=database, genome_sketch=qry_sketch, output=output, N=N, method=method)
|
|
368
367
|
if not s2:
|
|
369
368
|
return False
|
|
370
|
-
print('Tree visualization finished!')
|
|
371
369
|
visualize(newick=os.path.join(output, 'output.newick'),
|
|
372
370
|
taxonomy=os.path.join(output, 'output_accession_taxonomy.txt'), mode=None)
|
|
373
371
|
if platform.system() == 'Linux':
|
|
@@ -434,7 +432,6 @@ def quick(shuf_file=None, genome_files=None, output=None, reference=None, databa
|
|
|
434
432
|
os.remove('ref.txt')
|
|
435
433
|
os.remove('qry.txt')
|
|
436
434
|
os.remove(temp_phy)
|
|
437
|
-
print('Tree visualization finished!')
|
|
438
435
|
visualize(newick=output, taxonomy='ref_qry.txt', mode='r')
|
|
439
436
|
if platform.system() == 'Linux':
|
|
440
437
|
current_directory = os.getcwd()
|
|
@@ -507,7 +504,6 @@ def quick(shuf_file=None, genome_files=None, output=None, reference=None, databa
|
|
|
507
504
|
if not s6:
|
|
508
505
|
return False
|
|
509
506
|
print('Step5...')
|
|
510
|
-
print('Tree visualization finished!')
|
|
511
507
|
visualize(newick=output, mode=mode)
|
|
512
508
|
if platform.system() == 'Linux':
|
|
513
509
|
current_directory = os.getcwd()
|
|
@@ -87,7 +87,7 @@ require_pakages = [
|
|
|
87
87
|
|
|
88
88
|
setup(
|
|
89
89
|
name='kssdtree',
|
|
90
|
-
version='2.0.
|
|
90
|
+
version='2.0.6',
|
|
91
91
|
author='Hang Yang',
|
|
92
92
|
author_email='yhlink1207@gmail.com',
|
|
93
93
|
description="Kssdtree is a versatile Python package for phylogenetic analysis. It also provides one-stop tree construction and visualization. It can handle DNA sequences of both fasta or fastq format, whether gzipped or not. ",
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import random
|
|
2
2
|
import operator
|
|
3
3
|
import os
|
|
4
|
+
import re
|
|
5
|
+
|
|
4
6
|
import requests
|
|
5
7
|
import json
|
|
6
8
|
import zipfile
|
|
@@ -174,6 +176,7 @@ def view_tree(newick, taxonomy, mode):
|
|
|
174
176
|
branch_name_face = TextFace(node.dist, fsize=8, fgcolor='black', tight_text=False,
|
|
175
177
|
bold=False)
|
|
176
178
|
node.add_face(branch_name_face, column=0, position='branch-top')
|
|
179
|
+
print('Tree visualization finished!')
|
|
177
180
|
t.show(tree_style=ts)
|
|
178
181
|
else:
|
|
179
182
|
mode = 'r'
|
|
@@ -203,35 +206,43 @@ def view_tree(newick, taxonomy, mode):
|
|
|
203
206
|
current_directory = os.getcwd()
|
|
204
207
|
taxonomy_path = os.path.join(current_directory, taxonomy)
|
|
205
208
|
if not os.path.exists(taxonomy_path):
|
|
206
|
-
print('
|
|
207
|
-
return
|
|
209
|
+
print('The file taxonomy txt does not exist!')
|
|
208
210
|
|
|
209
211
|
all_accessions = []
|
|
210
212
|
accession_taxonomy = {}
|
|
211
213
|
with open(taxonomy_path, 'r') as file:
|
|
212
214
|
for line in file:
|
|
213
215
|
columns = line.split()
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
216
|
+
if len(columns) == 2:
|
|
217
|
+
column_1 = columns[0]
|
|
218
|
+
column_2 = columns[1:]
|
|
219
|
+
tempfile = ''
|
|
220
|
+
for x in column_2:
|
|
221
|
+
tempfile = tempfile + x + ' '
|
|
222
|
+
tempfile = tempfile[:-1]
|
|
223
|
+
if column_1 in all_accessions:
|
|
224
|
+
print('Tree visualization failed!')
|
|
225
|
+
print('Tip: There are same genome names between the query genome and the reference genome.')
|
|
226
|
+
return False
|
|
227
|
+
all_accessions.append(column_1)
|
|
228
|
+
accession_taxonomy[column_1] = tempfile
|
|
223
229
|
known_species = []
|
|
224
230
|
for x in all_accessions:
|
|
225
231
|
if accession_taxonomy[x] != 'Unknown':
|
|
226
232
|
known_species.append(accession_taxonomy[x])
|
|
227
|
-
|
|
228
233
|
temp_nwk = 'temp_kssdtree.newick'
|
|
229
234
|
|
|
230
235
|
with open(newick, 'r') as f:
|
|
231
236
|
lines = f.readlines()[0]
|
|
232
237
|
for x in all_accessions:
|
|
238
|
+
# print(x)
|
|
239
|
+
pattern = r'\b{}\b'.format(re.escape(x))
|
|
240
|
+
# print(pattern)
|
|
241
|
+
match = re.search(pattern, lines)
|
|
242
|
+
if match:
|
|
243
|
+
x_index = match.start()
|
|
233
244
|
x_len = len(x)
|
|
234
|
-
|
|
245
|
+
# print(x_index)
|
|
235
246
|
loc_index = x_index + x_len + 8
|
|
236
247
|
if x in accession_taxonomy.keys():
|
|
237
248
|
lines = str_insert(lines, loc_index, '[&&NHX:species=' + accession_taxonomy.get(x) + ']')
|
|
@@ -290,6 +301,7 @@ def view_tree(newick, taxonomy, mode):
|
|
|
290
301
|
node.img_style = nst
|
|
291
302
|
node.set_style(nst)
|
|
292
303
|
# t.render("bubble_map.png", w=600, dpi=300, tree_style=ts)
|
|
304
|
+
print('Tree visualization finished!')
|
|
293
305
|
t.show(tree_style=ts)
|
|
294
306
|
|
|
295
307
|
def deal_gtdb_txt(temp_dist_output):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|