kssdtree 2.0.8__tar.gz → 2.0.9__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-2.0.8/kssdtree.egg-info → kssdtree-2.0.9}/PKG-INFO +8 -2
  2. {kssdtree-2.0.8 → kssdtree-2.0.9}/iseq2comem.c +12 -12
  3. {kssdtree-2.0.8 → kssdtree-2.0.9/kssdtree.egg-info}/PKG-INFO +8 -2
  4. {kssdtree-2.0.8 → kssdtree-2.0.9}/kssdtree.py +6 -0
  5. {kssdtree-2.0.8 → kssdtree-2.0.9}/setup.py +50 -25
  6. {kssdtree-2.0.8 → kssdtree-2.0.9}/MANIFEST.in +0 -0
  7. {kssdtree-2.0.8 → kssdtree-2.0.9}/README.md +0 -0
  8. {kssdtree-2.0.8 → kssdtree-2.0.9}/align.c +0 -0
  9. {kssdtree-2.0.8 → kssdtree-2.0.9}/buildtree.c +0 -0
  10. {kssdtree-2.0.8 → kssdtree-2.0.9}/bytescale.c +0 -0
  11. {kssdtree-2.0.8 → kssdtree-2.0.9}/cluster.c +0 -0
  12. {kssdtree-2.0.8 → kssdtree-2.0.9}/co2mco.c +0 -0
  13. {kssdtree-2.0.8 → kssdtree-2.0.9}/command_composite.c +0 -0
  14. {kssdtree-2.0.8 → kssdtree-2.0.9}/command_dist.c +0 -0
  15. {kssdtree-2.0.8 → kssdtree-2.0.9}/command_dist_wrapper.c +0 -0
  16. {kssdtree-2.0.8 → kssdtree-2.0.9}/command_set.c +0 -0
  17. {kssdtree-2.0.8 → kssdtree-2.0.9}/command_shuffle.c +0 -0
  18. {kssdtree-2.0.8 → kssdtree-2.0.9}/distancemat.c +0 -0
  19. {kssdtree-2.0.8 → kssdtree-2.0.9}/dnj.c +0 -0
  20. {kssdtree-2.0.8 → kssdtree-2.0.9}/dnjheaders/bytescale.h +0 -0
  21. {kssdtree-2.0.8 → kssdtree-2.0.9}/dnjheaders/dnj.h +0 -0
  22. {kssdtree-2.0.8 → kssdtree-2.0.9}/dnjheaders/filebuff.h +0 -0
  23. {kssdtree-2.0.8 → kssdtree-2.0.9}/dnjheaders/hclust.h +0 -0
  24. {kssdtree-2.0.8 → kssdtree-2.0.9}/dnjheaders/matrix.h +0 -0
  25. {kssdtree-2.0.8 → kssdtree-2.0.9}/dnjheaders/mman.h +0 -0
  26. {kssdtree-2.0.8 → kssdtree-2.0.9}/dnjheaders/nj.h +0 -0
  27. {kssdtree-2.0.8 → kssdtree-2.0.9}/dnjheaders/nwck.h +0 -0
  28. {kssdtree-2.0.8 → kssdtree-2.0.9}/dnjheaders/pherror.h +0 -0
  29. {kssdtree-2.0.8 → kssdtree-2.0.9}/dnjheaders/phy.h +0 -0
  30. {kssdtree-2.0.8 → kssdtree-2.0.9}/dnjheaders/qseqs.h +0 -0
  31. {kssdtree-2.0.8 → kssdtree-2.0.9}/dnjheaders/str.h +0 -0
  32. {kssdtree-2.0.8 → kssdtree-2.0.9}/dnjheaders/threader.h +0 -0
  33. {kssdtree-2.0.8 → kssdtree-2.0.9}/dnjheaders/tmp.h +0 -0
  34. {kssdtree-2.0.8 → kssdtree-2.0.9}/dnjheaders/vector.h +0 -0
  35. {kssdtree-2.0.8 → kssdtree-2.0.9}/filebuff.c +0 -0
  36. {kssdtree-2.0.8 → kssdtree-2.0.9}/global_basic.c +0 -0
  37. {kssdtree-2.0.8 → kssdtree-2.0.9}/hclust.c +0 -0
  38. {kssdtree-2.0.8 → kssdtree-2.0.9}/kssdheaders/co2mco.h +0 -0
  39. {kssdtree-2.0.8 → kssdtree-2.0.9}/kssdheaders/command_composite.h +0 -0
  40. {kssdtree-2.0.8 → kssdtree-2.0.9}/kssdheaders/command_dist.h +0 -0
  41. {kssdtree-2.0.8 → kssdtree-2.0.9}/kssdheaders/command_dist_wrapper.h +0 -0
  42. {kssdtree-2.0.8 → kssdtree-2.0.9}/kssdheaders/command_set.h +0 -0
  43. {kssdtree-2.0.8 → kssdtree-2.0.9}/kssdheaders/command_shuffle.h +0 -0
  44. {kssdtree-2.0.8 → kssdtree-2.0.9}/kssdheaders/global_basic.h +0 -0
  45. {kssdtree-2.0.8 → kssdtree-2.0.9}/kssdheaders/iseq2comem.h +0 -0
  46. {kssdtree-2.0.8 → kssdtree-2.0.9}/kssdheaders/mman.h +0 -0
  47. {kssdtree-2.0.8 → kssdtree-2.0.9}/kssdheaders/mytime.h +0 -0
  48. {kssdtree-2.0.8 → kssdtree-2.0.9}/kssdtree.egg-info/SOURCES.txt +0 -0
  49. {kssdtree-2.0.8 → kssdtree-2.0.9}/kssdtree.egg-info/dependency_links.txt +0 -0
  50. {kssdtree-2.0.8 → kssdtree-2.0.9}/kssdtree.egg-info/not-zip-safe +0 -0
  51. {kssdtree-2.0.8 → kssdtree-2.0.9}/kssdtree.egg-info/requires.txt +0 -0
  52. {kssdtree-2.0.8 → kssdtree-2.0.9}/kssdtree.egg-info/top_level.txt +0 -0
  53. {kssdtree-2.0.8 → kssdtree-2.0.9}/matrix.c +0 -0
  54. {kssdtree-2.0.8 → kssdtree-2.0.9}/mman.c +0 -0
  55. {kssdtree-2.0.8 → kssdtree-2.0.9}/mytime.c +0 -0
  56. {kssdtree-2.0.8 → kssdtree-2.0.9}/nj.c +0 -0
  57. {kssdtree-2.0.8 → kssdtree-2.0.9}/njheaders/align.h +0 -0
  58. {kssdtree-2.0.8 → kssdtree-2.0.9}/njheaders/buildtree.h +0 -0
  59. {kssdtree-2.0.8 → kssdtree-2.0.9}/njheaders/cluster.h +0 -0
  60. {kssdtree-2.0.8 → kssdtree-2.0.9}/njheaders/distancemat.h +0 -0
  61. {kssdtree-2.0.8 → kssdtree-2.0.9}/njheaders/sequence.h +0 -0
  62. {kssdtree-2.0.8 → kssdtree-2.0.9}/njheaders/tree.h +0 -0
  63. {kssdtree-2.0.8 → kssdtree-2.0.9}/njheaders/util.h +0 -0
  64. {kssdtree-2.0.8 → kssdtree-2.0.9}/nwck.c +0 -0
  65. {kssdtree-2.0.8 → kssdtree-2.0.9}/pherror.c +0 -0
  66. {kssdtree-2.0.8 → kssdtree-2.0.9}/phy.c +0 -0
  67. {kssdtree-2.0.8 → kssdtree-2.0.9}/pydnj.c +0 -0
  68. {kssdtree-2.0.8 → kssdtree-2.0.9}/pykssd.c +0 -0
  69. {kssdtree-2.0.8 → kssdtree-2.0.9}/pynj.c +0 -0
  70. {kssdtree-2.0.8 → kssdtree-2.0.9}/qseqs.c +0 -0
  71. {kssdtree-2.0.8 → kssdtree-2.0.9}/sequence.c +0 -0
  72. {kssdtree-2.0.8 → kssdtree-2.0.9}/setup.cfg +0 -0
  73. {kssdtree-2.0.8 → kssdtree-2.0.9}/str.c +0 -0
  74. {kssdtree-2.0.8 → kssdtree-2.0.9}/tmp.c +0 -0
  75. {kssdtree-2.0.8 → kssdtree-2.0.9}/toolutils.py +0 -0
  76. {kssdtree-2.0.8 → kssdtree-2.0.9}/tree.c +0 -0
  77. {kssdtree-2.0.8 → kssdtree-2.0.9}/util.c +0 -0
  78. {kssdtree-2.0.8 → kssdtree-2.0.9}/vector.c +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: kssdtree
3
- Version: 2.0.8
3
+ Version: 2.0.9
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
@@ -10,3 +10,9 @@ Requires-Dist: pyqt5
10
10
  Requires-Dist: ete3
11
11
  Requires-Dist: requests
12
12
  Requires-Dist: pandas
13
+ Dynamic: author
14
+ Dynamic: author-email
15
+ Dynamic: download-url
16
+ Dynamic: home-page
17
+ Dynamic: requires-dist
18
+ Dynamic: summary
@@ -196,7 +196,7 @@ const char gzpipe_cmd[] = "gzip -dc";
196
196
  const char gzpipe_cmd[] = "zcat -fc";
197
197
  #endif
198
198
  llong *fasta2co(char *seqfname, llong *co, char *pipecmd) {
199
- printf("The fasta2co seqfname is: %s\n", seqfname);
199
+ // printf("The fasta2co seqfname is: %s\n", seqfname);
200
200
  llong tuple = 0LLU, crvstuple = 0LLU,
201
201
  unituple, drtuple, pfilter;
202
202
  memset(co, 0LLU, hashsize * sizeof(llong));
@@ -207,12 +207,12 @@ llong *fasta2co(char *seqfname, llong *co, char *pipecmd) {
207
207
  sprintf(fas_fname, "%s %s", pipecmd, seqfname);
208
208
  else
209
209
  sprintf(fas_fname, "%s %s", gzpipe_cmd, seqfname);
210
- printf("The fasta2co fas_fname is: %s\n", fas_fname);
210
+ // printf("The fasta2co fas_fname is: %s\n", fas_fname);
211
211
  if (is_gz_file(seqfname)){
212
- printf(".gz format\n");
212
+ // printf(".gz format\n");
213
213
  if ((infp = popen(fas_fname, "r")) == NULL) fprintf(stderr, "fasta2co():%s", fas_fname, "\n");
214
214
  }else{
215
- printf("not .gz format\n");
215
+ // printf("not .gz format\n");
216
216
  #ifdef _WIN32
217
217
  if ((infp = fopen(seqfname, "r")) == NULL) fprintf(stderr, "fasta2co():%s", fas_fname, "\n");
218
218
  #else
@@ -291,7 +291,7 @@ llong *fasta2co(char *seqfname, llong *co, char *pipecmd) {
291
291
  #define CT_MAX 0xfLLU
292
292
 
293
293
  llong *fastq2co(char *seqfname, llong *co, char *pipecmd, int Q, int M) {
294
- printf("The fastq2co seqfname is: %s\n", seqfname);
294
+ // printf("The fastq2co seqfname is: %s\n", seqfname);
295
295
  if (M >= CT_MAX) fprintf(stderr, "fastq2co(): Occurence num should smaller than %d", (int) CT_MAX);
296
296
  llong tuple = 0LLU, crvstuple = 0LLU, unituple, drtuple, pfilter;
297
297
  memset(co, 0LLU, hashsize * sizeof(llong));
@@ -301,12 +301,12 @@ llong *fastq2co(char *seqfname, llong *co, char *pipecmd, int Q, int M) {
301
301
  sprintf(fq_fname, "%s %s", pipecmd, seqfname);
302
302
  else
303
303
  sprintf(fq_fname, "%s %s", gzpipe_cmd, seqfname);
304
- printf("The fastq2co fq_fname is: %s\n", fq_fname);
304
+ // printf("The fastq2co fq_fname is: %s\n", fq_fname);
305
305
  if (is_gz_file(seqfname)){
306
- printf(".gz format\n");
306
+ // printf(".gz format\n");
307
307
  if ((infp = popen(fq_fname, "r")) == NULL) fprintf(stderr, "fastq2co():%s", fq_fname, "\n");
308
308
  }else{
309
- printf("not .gz format\n");
309
+ // printf("not .gz format\n");
310
310
  #ifdef _WIN32
311
311
  if ((infp = fopen(seqfname, "r")) == NULL) fprintf(stderr, "fastq2co():%s", fq_fname, "\n");
312
312
  #else
@@ -388,7 +388,7 @@ llong *fastq2co(char *seqfname, llong *co, char *pipecmd, int Q, int M) {
388
388
  #define OCCRC_MAX 0xffffLLU
389
389
 
390
390
  llong *fastq2koc(char *seqfname, llong *co, char *pipecmd, int Q) {
391
- printf("The fastq2koc seqfname is: %s\n", seqfname);
391
+ // printf("The fastq2koc seqfname is: %s\n", seqfname);
392
392
  llong tuple = 0LLU, crvstuple = 0LLU, unituple, drtuple, pfilter;
393
393
  memset(co, 0LLU, hashsize * sizeof(llong));
394
394
  FILE *infp;
@@ -397,12 +397,12 @@ llong *fastq2koc(char *seqfname, llong *co, char *pipecmd, int Q) {
397
397
  sprintf(fq_fname, "%s %s", pipecmd, seqfname);
398
398
  else
399
399
  sprintf(fq_fname, "%s %s", gzpipe_cmd, seqfname);
400
- printf("The fastq2koc fq_fname is: %s\n", fq_fname);
400
+ // printf("The fastq2koc fq_fname is: %s\n", fq_fname);
401
401
  if (is_gz_file(seqfname)){
402
- printf(".gz format\n");
402
+ // printf(".gz format\n");
403
403
  if ((infp = popen(fq_fname, "r")) == NULL) fprintf(stderr, "fastq2koc():%s", fq_fname, "\n");
404
404
  }else{
405
- printf("not .gz format\n");
405
+ // printf("not .gz format\n");
406
406
  #ifdef _WIN32
407
407
  if ((infp = fopen(seqfname, "r")) == NULL) fprintf(stderr, "fastq2koc():%s", fq_fname, "\n");
408
408
  #else
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: kssdtree
3
- Version: 2.0.8
3
+ Version: 2.0.9
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
@@ -10,3 +10,9 @@ Requires-Dist: pyqt5
10
10
  Requires-Dist: ete3
11
11
  Requires-Dist: requests
12
12
  Requires-Dist: pandas
13
+ Dynamic: author
14
+ Dynamic: author-email
15
+ Dynamic: download-url
16
+ Dynamic: home-page
17
+ Dynamic: requires-dist
18
+ Dynamic: summary
@@ -7,6 +7,8 @@ import platform
7
7
  import shutil
8
8
  import time
9
9
  import requests
10
+ import pkgutil
11
+ import argparse
10
12
 
11
13
 
12
14
  def shuffle(k=None, s=None, l=None, o=None):
@@ -347,6 +349,8 @@ def quick(shuf_file=None, genome_files=None, output=None, reference=None, databa
347
349
  shutil.rmtree(temp_dir2)
348
350
  if os.path.exists(temp_phy):
349
351
  os.remove(temp_phy)
352
+ else:
353
+ pass
350
354
  else:
351
355
  print('Args error, please see https://kssdtree.readthedocs.io/en/latest!!!')
352
356
  return False
@@ -531,3 +535,5 @@ def quick(shuf_file=None, genome_files=None, output=None, reference=None, databa
531
535
  else:
532
536
  print('Pipeline error, please see https://kssdtree.readthedocs.io/en/latest!!!')
533
537
  return False
538
+
539
+
@@ -1,33 +1,54 @@
1
1
  import sys
2
2
  from setuptools import setup, Extension, find_packages
3
3
  from os import environ
4
+ from setuptools.command.install import install
4
5
  import os
5
6
 
7
+ from setuptools.command.build_ext import build_ext
8
+ import sys, os, subprocess
9
+
10
+ class CustomBuildExt(build_ext):
11
+ def run(self):
12
+ super().run()
13
+ self.fix_rpath()
14
+
15
+ def fix_rpath(self):
16
+ if sys.platform != "darwin":
17
+ return
18
+
19
+ conda_lib = os.path.join(sys.prefix, "lib")
20
+
21
+ for ext in self.extensions:
22
+ so_path = self.get_ext_fullpath(ext.name)
23
+ if not os.path.exists(so_path):
24
+ continue
25
+
26
+ subprocess.run(
27
+ ["install_name_tool", "-delete_rpath", conda_lib, so_path],
28
+ stdout=subprocess.DEVNULL,
29
+ stderr=subprocess.DEVNULL,
30
+ )
31
+ subprocess.run(
32
+ ["install_name_tool", "-delete_rpath", "@loader_path", so_path],
33
+ stdout=subprocess.DEVNULL,
34
+ stderr=subprocess.DEVNULL,
35
+ )
36
+ subprocess.run(
37
+ ["install_name_tool", "-delete_rpath", "@loader_path", so_path],
38
+ stdout=subprocess.DEVNULL,
39
+ stderr=subprocess.DEVNULL,
40
+ )
41
+
42
+
6
43
  extra_compile_args = []
7
44
  extra_link_args = []
8
45
  if 'darwin' in sys.platform:
9
- target_dirs = ["gcc-9", "gcc-10", "gcc-11", "gcc-12", "gcc-13", "gcc-14", "gcc-15"]
10
- path = "/opt/homebrew/bin/"
11
- directories = [dir for dir in os.listdir(path) if dir in target_dirs]
12
- if len(directories) > 0:
13
- gcc_version = directories[0]
14
- if 'gcc-9' == gcc_version:
15
- gcc_path = "/opt/homebrew/bin/gcc-9"
16
- elif 'gcc-10' == gcc_version:
17
- gcc_path = "/opt/homebrew/bin/gcc-10"
18
- elif 'gcc-11' == gcc_version:
19
- gcc_path = "/opt/homebrew/bin/gcc-11"
20
- elif 'gcc-12' == gcc_version:
21
- gcc_path = "/opt/homebrew/bin/gcc-12"
22
- elif 'gcc-13' == gcc_version:
23
- gcc_path = "/opt/homebrew/bin/gcc-13"
24
- elif 'gcc-14' == gcc_version:
25
- gcc_path = "/opt/homebrew/bin/gcc-14"
26
- else:
27
- gcc_path = ""
28
- extra_compile_args = ['-fopenmp']
29
- extra_link_args = ['-fopenmp']
30
- os.environ["CC"] = gcc_path
46
+ extra_compile_args = ['-fopenmp']
47
+ extra_link_args = ['-fopenmp']
48
+ # clang
49
+ # os.environ["CC"] = '/usr/bin/gcc'
50
+ os.environ["CC"] = '/opt/homebrew/bin/gcc-12'
51
+
31
52
  else:
32
53
  if environ.get('CC') and 'clang' in environ['CC']:
33
54
  # clang
@@ -37,6 +58,7 @@ else:
37
58
  # GNU
38
59
  extra_compile_args = ['-fopenmp']
39
60
  extra_link_args = ['-fopenmp']
61
+
40
62
  MOD1 = 'kssd'
41
63
  MOD2 = 'nj'
42
64
  MOD3 = 'dnj'
@@ -59,6 +81,7 @@ sources2 = ['align.c',
59
81
  'buildtree.c',
60
82
  'sequence.c',
61
83
  'pynj.c']
84
+
62
85
  sources3 = ['bytescale.c',
63
86
  'dnj.c',
64
87
  'str.c',
@@ -87,7 +110,7 @@ require_pakages = [
87
110
 
88
111
  setup(
89
112
  name='kssdtree',
90
- version='2.0.8',
113
+ version='2.0.9',
91
114
  author='Hang Yang',
92
115
  author_email='yhlink1207@gmail.com',
93
116
  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. ",
@@ -107,6 +130,8 @@ setup(
107
130
  install_requires=require_pakages,
108
131
  dependency_links=['https://pypi.python.org/simple/'],
109
132
  zip_safe=False,
110
- include_package_data=True
133
+ include_package_data=True,
134
+ cmdclass={
135
+ "build_ext": CustomBuildExt,
136
+ }
111
137
  )
112
-
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes