kssdtree 1.1.6__tar.gz → 1.1.7__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 (78) hide show
  1. {kssdtree-1.1.6/kssdtree.egg-info → kssdtree-1.1.7}/PKG-INFO +1 -1
  2. {kssdtree-1.1.6 → kssdtree-1.1.7/kssdtree.egg-info}/PKG-INFO +1 -1
  3. {kssdtree-1.1.6 → kssdtree-1.1.7}/kssdtree.py +22 -31
  4. {kssdtree-1.1.6 → kssdtree-1.1.7}/setup.py +1 -1
  5. {kssdtree-1.1.6 → kssdtree-1.1.7}/toolutils.py +1 -1
  6. {kssdtree-1.1.6 → kssdtree-1.1.7}/MANIFEST.in +0 -0
  7. {kssdtree-1.1.6 → kssdtree-1.1.7}/README.md +0 -0
  8. {kssdtree-1.1.6 → kssdtree-1.1.7}/align.c +0 -0
  9. {kssdtree-1.1.6 → kssdtree-1.1.7}/buildtree.c +0 -0
  10. {kssdtree-1.1.6 → kssdtree-1.1.7}/bytescale.c +0 -0
  11. {kssdtree-1.1.6 → kssdtree-1.1.7}/cluster.c +0 -0
  12. {kssdtree-1.1.6 → kssdtree-1.1.7}/co2mco.c +0 -0
  13. {kssdtree-1.1.6 → kssdtree-1.1.7}/command_composite.c +0 -0
  14. {kssdtree-1.1.6 → kssdtree-1.1.7}/command_dist.c +0 -0
  15. {kssdtree-1.1.6 → kssdtree-1.1.7}/command_dist_wrapper.c +0 -0
  16. {kssdtree-1.1.6 → kssdtree-1.1.7}/command_set.c +0 -0
  17. {kssdtree-1.1.6 → kssdtree-1.1.7}/command_shuffle.c +0 -0
  18. {kssdtree-1.1.6 → kssdtree-1.1.7}/distancemat.c +0 -0
  19. {kssdtree-1.1.6 → kssdtree-1.1.7}/dnj.c +0 -0
  20. {kssdtree-1.1.6 → kssdtree-1.1.7}/dnjheaders/bytescale.h +0 -0
  21. {kssdtree-1.1.6 → kssdtree-1.1.7}/dnjheaders/dnj.h +0 -0
  22. {kssdtree-1.1.6 → kssdtree-1.1.7}/dnjheaders/filebuff.h +0 -0
  23. {kssdtree-1.1.6 → kssdtree-1.1.7}/dnjheaders/hclust.h +0 -0
  24. {kssdtree-1.1.6 → kssdtree-1.1.7}/dnjheaders/matrix.h +0 -0
  25. {kssdtree-1.1.6 → kssdtree-1.1.7}/dnjheaders/mman.h +0 -0
  26. {kssdtree-1.1.6 → kssdtree-1.1.7}/dnjheaders/nj.h +0 -0
  27. {kssdtree-1.1.6 → kssdtree-1.1.7}/dnjheaders/nwck.h +0 -0
  28. {kssdtree-1.1.6 → kssdtree-1.1.7}/dnjheaders/pherror.h +0 -0
  29. {kssdtree-1.1.6 → kssdtree-1.1.7}/dnjheaders/phy.h +0 -0
  30. {kssdtree-1.1.6 → kssdtree-1.1.7}/dnjheaders/qseqs.h +0 -0
  31. {kssdtree-1.1.6 → kssdtree-1.1.7}/dnjheaders/str.h +0 -0
  32. {kssdtree-1.1.6 → kssdtree-1.1.7}/dnjheaders/threader.h +0 -0
  33. {kssdtree-1.1.6 → kssdtree-1.1.7}/dnjheaders/tmp.h +0 -0
  34. {kssdtree-1.1.6 → kssdtree-1.1.7}/dnjheaders/vector.h +0 -0
  35. {kssdtree-1.1.6 → kssdtree-1.1.7}/filebuff.c +0 -0
  36. {kssdtree-1.1.6 → kssdtree-1.1.7}/global_basic.c +0 -0
  37. {kssdtree-1.1.6 → kssdtree-1.1.7}/hclust.c +0 -0
  38. {kssdtree-1.1.6 → kssdtree-1.1.7}/iseq2comem.c +0 -0
  39. {kssdtree-1.1.6 → kssdtree-1.1.7}/kssdheaders/co2mco.h +0 -0
  40. {kssdtree-1.1.6 → kssdtree-1.1.7}/kssdheaders/command_composite.h +0 -0
  41. {kssdtree-1.1.6 → kssdtree-1.1.7}/kssdheaders/command_dist.h +0 -0
  42. {kssdtree-1.1.6 → kssdtree-1.1.7}/kssdheaders/command_dist_wrapper.h +0 -0
  43. {kssdtree-1.1.6 → kssdtree-1.1.7}/kssdheaders/command_set.h +0 -0
  44. {kssdtree-1.1.6 → kssdtree-1.1.7}/kssdheaders/command_shuffle.h +0 -0
  45. {kssdtree-1.1.6 → kssdtree-1.1.7}/kssdheaders/global_basic.h +0 -0
  46. {kssdtree-1.1.6 → kssdtree-1.1.7}/kssdheaders/iseq2comem.h +0 -0
  47. {kssdtree-1.1.6 → kssdtree-1.1.7}/kssdheaders/mman.h +0 -0
  48. {kssdtree-1.1.6 → kssdtree-1.1.7}/kssdheaders/mytime.h +0 -0
  49. {kssdtree-1.1.6 → kssdtree-1.1.7}/kssdtree.egg-info/SOURCES.txt +0 -0
  50. {kssdtree-1.1.6 → kssdtree-1.1.7}/kssdtree.egg-info/dependency_links.txt +0 -0
  51. {kssdtree-1.1.6 → kssdtree-1.1.7}/kssdtree.egg-info/not-zip-safe +0 -0
  52. {kssdtree-1.1.6 → kssdtree-1.1.7}/kssdtree.egg-info/requires.txt +0 -0
  53. {kssdtree-1.1.6 → kssdtree-1.1.7}/kssdtree.egg-info/top_level.txt +0 -0
  54. {kssdtree-1.1.6 → kssdtree-1.1.7}/matrix.c +0 -0
  55. {kssdtree-1.1.6 → kssdtree-1.1.7}/mman.c +0 -0
  56. {kssdtree-1.1.6 → kssdtree-1.1.7}/mytime.c +0 -0
  57. {kssdtree-1.1.6 → kssdtree-1.1.7}/nj.c +0 -0
  58. {kssdtree-1.1.6 → kssdtree-1.1.7}/njheaders/align.h +0 -0
  59. {kssdtree-1.1.6 → kssdtree-1.1.7}/njheaders/buildtree.h +0 -0
  60. {kssdtree-1.1.6 → kssdtree-1.1.7}/njheaders/cluster.h +0 -0
  61. {kssdtree-1.1.6 → kssdtree-1.1.7}/njheaders/distancemat.h +0 -0
  62. {kssdtree-1.1.6 → kssdtree-1.1.7}/njheaders/sequence.h +0 -0
  63. {kssdtree-1.1.6 → kssdtree-1.1.7}/njheaders/tree.h +0 -0
  64. {kssdtree-1.1.6 → kssdtree-1.1.7}/njheaders/util.h +0 -0
  65. {kssdtree-1.1.6 → kssdtree-1.1.7}/nwck.c +0 -0
  66. {kssdtree-1.1.6 → kssdtree-1.1.7}/pherror.c +0 -0
  67. {kssdtree-1.1.6 → kssdtree-1.1.7}/phy.c +0 -0
  68. {kssdtree-1.1.6 → kssdtree-1.1.7}/pydnj.c +0 -0
  69. {kssdtree-1.1.6 → kssdtree-1.1.7}/pykssd.c +0 -0
  70. {kssdtree-1.1.6 → kssdtree-1.1.7}/pynj.c +0 -0
  71. {kssdtree-1.1.6 → kssdtree-1.1.7}/qseqs.c +0 -0
  72. {kssdtree-1.1.6 → kssdtree-1.1.7}/sequence.c +0 -0
  73. {kssdtree-1.1.6 → kssdtree-1.1.7}/setup.cfg +0 -0
  74. {kssdtree-1.1.6 → kssdtree-1.1.7}/str.c +0 -0
  75. {kssdtree-1.1.6 → kssdtree-1.1.7}/tmp.c +0 -0
  76. {kssdtree-1.1.6 → kssdtree-1.1.7}/tree.c +0 -0
  77. {kssdtree-1.1.6 → kssdtree-1.1.7}/util.c +0 -0
  78. {kssdtree-1.1.6 → kssdtree-1.1.7}/vector.c +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kssdtree
3
- Version: 1.1.6
3
+ Version: 1.1.7
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
6
  Download-URL: https://pypi.org/project/kssdtree
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kssdtree
3
- Version: 1.1.6
3
+ Version: 1.1.7
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
6
  Download-URL: https://pypi.org/project/kssdtree
@@ -44,7 +44,8 @@ def sketch(shuf_file=None, genome_files=None, output=None, set_opt=None):
44
44
  "Network timeout, please manually download from github (https://github.com/yhlink/kssdtree/tree/master/shuffle_file)")
45
45
  return False
46
46
  print('Download finished: ', shuf_file)
47
- elif shuf_file in ['L2K8.shuf', 'L3K10.shuf', 'L2K9.shuf', 'L3K11.shuf', './L2K8.shuf', './L3K10.shuf', './L2K9.shuf', './L3K11.shuf']:
47
+ elif shuf_file in ['L2K8.shuf', 'L3K10.shuf', 'L2K9.shuf', 'L3K11.shuf', './L2K8.shuf', './L3K10.shuf',
48
+ './L2K9.shuf', './L3K11.shuf']:
48
49
  print('Shuffling...', shuf_file)
49
50
  file_name = shuf_file.split('.')[0]
50
51
  k = int(file_name[3:])
@@ -124,6 +125,9 @@ def retrieve(ref_sketch=None, qry_sketch=None, output=None, N=None, method=None)
124
125
  os.makedirs(output)
125
126
  print("Created directory:", output)
126
127
  newick, accession_taxonomy = toolutils.upload_request(qry_sketch=qry_sketch, method=method, N=N)
128
+ if newick is None:
129
+ print('Server error!!!')
130
+ return False
127
131
  with open(os.path.join(output, 'output.newick'), 'w') as f:
128
132
  f.write(newick)
129
133
  with open(os.path.join(output, 'output_accession_taxonomy.txt'), 'w') as f:
@@ -283,6 +287,9 @@ def quick(shuf_file=None, genome_files=None, output=None, reference=None, taxono
283
287
  s3 = build(phylip=temp_phy, output=output, method=method)
284
288
  if not s3:
285
289
  return False
290
+ print('Step4...')
291
+ print('Tree visualization finished!')
292
+ visualize(newick=output, taxonomy=taxonomy, mode=mode)
286
293
  if platform.system() == 'Linux':
287
294
  current_directory = os.getcwd()
288
295
  temp_dir1 = os.path.join(current_directory, temp_sketch)
@@ -293,13 +300,6 @@ def quick(shuf_file=None, genome_files=None, output=None, reference=None, taxono
293
300
  shutil.rmtree(temp_dir2)
294
301
  if os.path.exists(temp_phy):
295
302
  os.remove(temp_phy)
296
- print('Step4...')
297
- print('Tree visualization finished!')
298
- visualize(newick=output, taxonomy=taxonomy, mode=mode)
299
- else:
300
- print('Step4...')
301
- print('Tree visualization finished!')
302
- visualize(newick=output, taxonomy=taxonomy, mode=mode)
303
303
  else:
304
304
  print('Args error!!!')
305
305
  return False
@@ -313,29 +313,24 @@ def quick(shuf_file=None, genome_files=None, output=None, reference=None, taxono
313
313
  print("shuffle file must be set to 'L3K9.shuf'")
314
314
  return False
315
315
  timeStamp = int(time.mktime(time.localtime(time.time())))
316
- qry_sketch = 'sketch_' + str(timeStamp)
316
+ qry_sketch = 'sketch_' + str(timeStamp)
317
317
  s1 = sketch(shuf_file=shuf_file, genome_files=genome_files, output=qry_sketch, set_opt=True)
318
318
  if not s1:
319
319
  return False
320
320
  s2 = retrieve(ref_sketch=reference, qry_sketch=qry_sketch, output=output, N=N, method=method)
321
321
  if not s2:
322
322
  return False
323
+ print('Tree visualization finished!')
324
+ visualize(newick=os.path.join(output, 'output.newick'),
325
+ taxonomy=os.path.join(output, 'output_accession_taxonomy.txt'), mode=None)
323
326
  if platform.system() == 'Linux':
324
- if platform.system() == 'Linux':
325
- current_directory = os.getcwd()
326
- temp_dir1 = os.path.join(current_directory, qry_sketch)
327
- temp_dir2 = os.path.join(current_directory, qry_sketch + '.zip')
328
- if os.path.exists(temp_dir1):
329
- shutil.rmtree(temp_dir1)
330
- if os.path.exists(temp_dir2):
331
- os.remove(temp_dir2)
332
- print('Tree visualization finished!')
333
- visualize(newick=os.path.join(output, 'output.newick'),
334
- taxonomy=os.path.join(output, 'output_accession_taxonomy.txt'), mode=None)
335
- else:
336
- print('Tree visualization finished!')
337
- visualize(newick=os.path.join(output, 'output.newick'),
338
- taxonomy=os.path.join(output, 'output_accession_taxonomy.txt'), mode=None)
327
+ current_directory = os.getcwd()
328
+ temp_dir1 = os.path.join(current_directory, qry_sketch)
329
+ temp_dir2 = os.path.join(current_directory, qry_sketch + '.zip')
330
+ if os.path.exists(temp_dir1):
331
+ shutil.rmtree(temp_dir1)
332
+ if os.path.exists(temp_dir2):
333
+ os.remove(temp_dir2)
339
334
  else:
340
335
  print('Args error!!!')
341
336
  return False
@@ -385,6 +380,9 @@ def quick(shuf_file=None, genome_files=None, output=None, reference=None, taxono
385
380
  s6 = build(phylip=temp_phy, output=output, method=method)
386
381
  if not s6:
387
382
  return False
383
+ print('Step5...')
384
+ print('Tree visualization finished!')
385
+ visualize(newick=output, taxonomy=taxonomy, mode=mode)
388
386
  if platform.system() == 'Linux':
389
387
  current_directory = os.getcwd()
390
388
  temp_dir1 = os.path.join(current_directory, temp_reference_sketch)
@@ -404,13 +402,6 @@ def quick(shuf_file=None, genome_files=None, output=None, reference=None, taxono
404
402
  shutil.rmtree(temp_dir5)
405
403
  if os.path.exists(temp_phy):
406
404
  os.remove(temp_phy)
407
- print('Step5...')
408
- print('Tree visualization finished!')
409
- visualize(newick=output, taxonomy=taxonomy, mode=mode)
410
- else:
411
- print('Step5...')
412
- print('Tree visualization finished!')
413
- visualize(newick=output, taxonomy=taxonomy, mode=mode)
414
405
  else:
415
406
  print('Args error!!!')
416
407
  return False
@@ -94,7 +94,7 @@ require_pakages = [
94
94
 
95
95
  setup(
96
96
  name='kssdtree',
97
- version='1.1.6',
97
+ version='1.1.7',
98
98
  author='Hang Yang',
99
99
  author_email='yhlink1207@gmail.com',
100
100
  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. ",
@@ -78,7 +78,7 @@ def upload_request(qry_sketch, method, N):
78
78
  accession_taxonomy = json_data['accession_taxonomy']
79
79
  return newick, accession_taxonomy
80
80
  else:
81
- return None
81
+ return None, None
82
82
 
83
83
  def view_tree(newick, taxonomy, mode):
84
84
  if taxonomy is None:
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes