SigProfilerExtractor 1.1.25__tar.gz → 1.2.1__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 (40) hide show
  1. {SigProfilerExtractor-1.1.25/SigProfilerExtractor.egg-info → sigprofilerextractor-1.2.1}/PKG-INFO +24 -2
  2. {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.1}/SigProfilerExtractor/nmf_cpu.py +4 -4
  3. {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.1}/SigProfilerExtractor/nmf_gpu.py +4 -4
  4. {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.1}/SigProfilerExtractor/sigprofilerextractor_cli.py +1 -1
  5. {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.1}/SigProfilerExtractor/subroutines.py +14 -11
  6. sigprofilerextractor-1.2.1/SigProfilerExtractor/version.py +7 -0
  7. {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.1/SigProfilerExtractor.egg-info}/PKG-INFO +24 -2
  8. {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.1}/SigProfilerExtractor.egg-info/SOURCES.txt +1 -0
  9. sigprofilerextractor-1.2.1/SigProfilerExtractor.egg-info/requires.txt +11 -0
  10. sigprofilerextractor-1.2.1/pyproject.toml +3 -0
  11. {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.1}/setup.py +8 -7
  12. SigProfilerExtractor-1.1.25/SigProfilerExtractor/version.py +0 -7
  13. SigProfilerExtractor-1.1.25/SigProfilerExtractor.egg-info/requires.txt +0 -11
  14. {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.1}/LICENSE.txt +0 -0
  15. {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.1}/MANIFEST.in +0 -0
  16. {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.1}/README.md +0 -0
  17. {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.1}/SigProfilerExtractor/__init__.py +0 -0
  18. {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.1}/SigProfilerExtractor/controllers/cli_controller.py +0 -0
  19. {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.1}/SigProfilerExtractor/data/CNVInput/Battenberg_test.tsv +0 -0
  20. {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.1}/SigProfilerExtractor/data/CSVInput/csv_example.csv +0 -0
  21. {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.1}/SigProfilerExtractor/data/MatObjInput/21_breast_WGS_substitutions.mat +0 -0
  22. {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.1}/SigProfilerExtractor/data/ReferenceFiles/CNV_features.tsv +0 -0
  23. {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.1}/SigProfilerExtractor/data/ReferenceFiles/CN_classes_dictionary.txt +0 -0
  24. {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.1}/SigProfilerExtractor/data/TextInput/Samples_CNV.txt +0 -0
  25. {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.1}/SigProfilerExtractor/data/TextInput/Samples_DBS.txt +0 -0
  26. {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.1}/SigProfilerExtractor/data/TextInput/Samples_ID.txt +0 -0
  27. {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.1}/SigProfilerExtractor/data/TextInput/Samples_SBS.txt +0 -0
  28. {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.1}/SigProfilerExtractor/data/TextInput/Samples_SV.txt +0 -0
  29. {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.1}/SigProfilerExtractor/data/VCFInput/PD3851a.vcf +0 -0
  30. {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.1}/SigProfilerExtractor/data/VCFInput/PD3890a.vcf +0 -0
  31. {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.1}/SigProfilerExtractor/data/VCFInput/PD3904a.vcf +0 -0
  32. {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.1}/SigProfilerExtractor/data/VCFInput/PD3905a.vcf +0 -0
  33. {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.1}/SigProfilerExtractor/data/VCFInput/PD3945a.vcf +0 -0
  34. {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.1}/SigProfilerExtractor/estimate_best_solution.py +0 -0
  35. {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.1}/SigProfilerExtractor/sigpro.py +0 -0
  36. {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.1}/SigProfilerExtractor.egg-info/dependency_links.txt +0 -0
  37. {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.1}/SigProfilerExtractor.egg-info/entry_points.txt +0 -0
  38. {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.1}/SigProfilerExtractor.egg-info/not-zip-safe +0 -0
  39. {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.1}/SigProfilerExtractor.egg-info/top_level.txt +0 -0
  40. {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.1}/setup.cfg +0 -0
@@ -1,13 +1,35 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: SigProfilerExtractor
3
- Version: 1.1.25
3
+ Version: 1.2.1
4
4
  Summary: Extracts mutational signatures from mutational catalogues
5
5
  Home-page: https://github.com/AlexandrovLab/SigProfilerExtractor.git
6
6
  Author: S Mishu Ashiqul Islam
7
7
  Author-email: m0islam@ucsd.edu
8
8
  License: UCSD
9
+ Requires-Python: >=3.9
9
10
  Description-Content-Type: text/markdown
10
11
  License-File: LICENSE.txt
12
+ Requires-Dist: scipy>=1.6.3
13
+ Requires-Dist: torch>=1.8.1
14
+ Requires-Dist: numpy>=2.0.0
15
+ Requires-Dist: pandas>=2.0.0
16
+ Requires-Dist: nimfa>=1.1.0
17
+ Requires-Dist: sigProfilerPlotting>=1.4.0
18
+ Requires-Dist: SigProfilerMatrixGenerator>=1.3.0
19
+ Requires-Dist: SigProfilerAssignment>=0.2.0
20
+ Requires-Dist: statsmodels>=0.9.0
21
+ Requires-Dist: scikit-learn>=0.24.2
22
+ Requires-Dist: psutil>=5.6.1
23
+ Dynamic: author
24
+ Dynamic: author-email
25
+ Dynamic: description
26
+ Dynamic: description-content-type
27
+ Dynamic: home-page
28
+ Dynamic: license
29
+ Dynamic: license-file
30
+ Dynamic: requires-dist
31
+ Dynamic: requires-python
32
+ Dynamic: summary
11
33
 
12
34
  [![Docs](https://img.shields.io/badge/docs-latest-blue.svg)](https://osf.io/t6j7u/wiki/home/)
13
35
  [![License](https://img.shields.io/badge/License-BSD\%202--Clause-orange.svg)](https://opensource.org/licenses/BSD-2-Clause)
@@ -113,7 +113,7 @@ class NMF:
113
113
  H = np.zeros([self._V.shape[0], self._rank, self._V.shape[2]])
114
114
  nv = nndsvd.Nndsvd()
115
115
  for i in range(self._V.shape[0]):
116
- vin = np.mat(self._V.cpu().numpy()[i])
116
+ vin = np.asmatrix(self._V.cpu().numpy()[i])
117
117
  W[i, :, :], H[i, :, :] = nv.initialize(
118
118
  vin, self._rank, options={"flag": 0}
119
119
  )
@@ -123,7 +123,7 @@ class NMF:
123
123
  H = np.zeros([self._V.shape[0], self._rank, self._V.shape[2]])
124
124
  nv = nndsvd.Nndsvd()
125
125
  for i in range(self._V.shape[0]):
126
- vin = np.mat(self._V.cpu().numpy()[i])
126
+ vin = np.asmatrix(self._V.cpu().numpy()[i])
127
127
  W[i, :, :], H[i, :, :] = nv.initialize(
128
128
  vin, self._rank, options={"flag": 1}
129
129
  )
@@ -133,7 +133,7 @@ class NMF:
133
133
  H = np.zeros([self._V.shape[0], self._rank, self._V.shape[2]])
134
134
  nv = nndsvd.Nndsvd()
135
135
  for i in range(self._V.shape[0]):
136
- vin = np.mat(self._V.cpu().numpy()[i])
136
+ vin = np.asmatrix(self._V.cpu().numpy()[i])
137
137
  W[i, :, :], H[i, :, :] = nv.initialize(
138
138
  vin, self._rank, options={"flag": 2}
139
139
  )
@@ -142,7 +142,7 @@ class NMF:
142
142
  H = np.zeros([self._V.shape[0], self._rank, self._V.shape[2]])
143
143
  nv = nndsvd.Nndsvd()
144
144
  for i in range(self._V.shape[0]):
145
- vin = np.mat(self._V.cpu().numpy()[i])
145
+ vin = np.asmatrix(self._V.cpu().numpy()[i])
146
146
  w, h = nv.initialize(vin, self._rank, options={"flag": 2})
147
147
  min_X = np.min(vin[vin > 0])
148
148
  h[h <= min_X] = min_X
@@ -100,7 +100,7 @@ class NMF:
100
100
  H = np.zeros([self._V.shape[0], self._rank, self._V.shape[2]])
101
101
  nv = nndsvd.Nndsvd()
102
102
  for i in range(self._V.shape[0]):
103
- vin = np.mat(self._V.cpu().numpy()[i])
103
+ vin = np.asmatrix(self._V.cpu().numpy()[i])
104
104
  W[i, :, :], H[i, :, :] = nv.initialize(
105
105
  vin, self._rank, options={"flag": 0}
106
106
  )
@@ -110,7 +110,7 @@ class NMF:
110
110
  H = np.zeros([self._V.shape[0], self._rank, self._V.shape[2]])
111
111
  nv = nndsvd.Nndsvd()
112
112
  for i in range(self._V.shape[0]):
113
- vin = np.mat(self._V.cpu().numpy()[i])
113
+ vin = np.asmatrix(self._V.cpu().numpy()[i])
114
114
  W[i, :, :], H[i, :, :] = nv.initialize(
115
115
  vin, self._rank, options={"flag": 1}
116
116
  )
@@ -120,7 +120,7 @@ class NMF:
120
120
  H = np.zeros([self._V.shape[0], self._rank, self._V.shape[2]])
121
121
  nv = nndsvd.Nndsvd()
122
122
  for i in range(self._V.shape[0]):
123
- vin = np.mat(self._V.cpu().numpy()[i])
123
+ vin = np.asmatrix(self._V.cpu().numpy()[i])
124
124
  W[i, :, :], H[i, :, :] = nv.initialize(
125
125
  vin, self._rank, options={"flag": 2}
126
126
  )
@@ -129,7 +129,7 @@ class NMF:
129
129
  H = np.zeros([self._V.shape[0], self._rank, self._V.shape[2]])
130
130
  nv = nndsvd.Nndsvd()
131
131
  for i in range(self._V.shape[0]):
132
- vin = np.mat(self._V.cpu().numpy()[i])
132
+ vin = np.asmatrix(self._V.cpu().numpy()[i])
133
133
  w, h = nv.initialize(vin, self._rank, options={"flag": 2})
134
134
  min_X = np.min(vin[vin > 0])
135
135
  h[h <= min_X] = min_X
@@ -11,7 +11,7 @@ def main_function():
11
11
 
12
12
  if len(sys.argv) < 2 or sys.argv[1].lower() not in commands:
13
13
  print_usage(commands)
14
- sys.exit(1)
14
+ return
15
15
 
16
16
  command = sys.argv[1].lower()
17
17
  args = sys.argv[2:]
@@ -203,8 +203,8 @@ def normalize_samples(
203
203
  bootstrapGenomes = np.array(bootstrapGenomes)
204
204
  indices = np.where(totalMutations > normalization_cutoff)[0]
205
205
  norm_genome = (
206
- bootstrapGenomes[:, list(indices)]
207
- / totalMutations[list(indices)][:, np.newaxis].T
206
+ np.array(bootstrapGenomes)[:, list(indices)]
207
+ / np.array(totalMutations)[list(indices)][:, np.newaxis].T
208
208
  * normalization_cutoff
209
209
  )
210
210
  bootstrapGenomes[:, list(indices)] = norm_genome
@@ -214,8 +214,8 @@ def normalize_samples(
214
214
  rows = bootstrapGenomes.shape[0]
215
215
  indices = np.where(totalMutations > (rows * 100))[0]
216
216
  norm_genome = (
217
- bootstrapGenomes[:, list(indices)]
218
- / totalMutations[list(indices)][:, np.newaxis].T
217
+ np.array(bootstrapGenomes)[:, list(indices)]
218
+ / np.array(totalMutations)[list(indices)][:, np.newaxis].T
219
219
  * (rows * 100)
220
220
  )
221
221
  bootstrapGenomes[:, list(indices)] = norm_genome
@@ -231,8 +231,8 @@ def normalize_samples(
231
231
  rows = bootstrapGenomes.shape[0]
232
232
  indices = np.where(totalMutations > int(norm))[0]
233
233
  norm_genome = (
234
- bootstrapGenomes[:, list(indices)]
235
- / totalMutations[list(indices)][:, np.newaxis].T
234
+ np.array(bootstrapGenomes)[:, list(indices)]
235
+ / np.array(totalMutations)[list(indices)][:, np.newaxis].T
236
236
  * (int(norm))
237
237
  )
238
238
  bootstrapGenomes[:, list(indices)] = norm_genome
@@ -465,7 +465,7 @@ def pnmf(
465
465
  for i in range(len(W)):
466
466
  _W = np.array(W[i])
467
467
  _H = np.array(H[i])
468
- total = _W.sum(axis=0)[np.newaxis]
468
+ total = _W.sum(axis=0, keepdims=True)#[np.newaxis]
469
469
  _W = _W / total
470
470
  _H = _H * total.T
471
471
  _H = denormalize_samples(_H, totalMutations)
@@ -508,7 +508,7 @@ def pnmf(
508
508
 
509
509
  W = np.array(W)
510
510
  H = np.array(H)
511
- total = W.sum(axis=0)[np.newaxis]
511
+ total = W.sum(axis=0, keepdims=True) #[np.newaxis]
512
512
  W = W / total
513
513
  H = H * total.T
514
514
 
@@ -913,14 +913,17 @@ def reclustering(
913
913
 
914
914
  count = 0
915
915
  labels = []
916
- clusters = pd.DataFrame()
916
+ clusters_list = [] # Use a list to collect DataFrames
917
+
917
918
  for cluster_id in range(processes3D.shape[0]):
918
919
  cluster_vectors = pd.DataFrame(processes3D[cluster_id, :, :])
919
- clusters = clusters.append(cluster_vectors.T)
920
+ clusters_list.append(cluster_vectors.T) # Collect DataFrames into a list
920
921
  for k in range(cluster_vectors.shape[1]):
921
922
  labels.append(count)
922
923
  count = count + 1
923
924
 
925
+ # Concatenate all DataFrames at once
926
+ clusters = pd.concat(clusters_list, ignore_index=True)
924
927
  try:
925
928
  if dist == "cosine":
926
929
  SilhouetteCoefficients = metrics.silhouette_samples(
@@ -1109,7 +1112,7 @@ def probabilities(W, H, index, allsigids, allcolnames):
1109
1112
 
1110
1113
  result = 0
1111
1114
  for i in range(H.shape[1]): # here H.shape is the number of sample
1112
- M = genomes[:, i][np.newaxis]
1115
+ M = np.array(genomes)[:, i][np.newaxis]
1113
1116
  probs = W * H[:, i] / M.T
1114
1117
  probs = pd.DataFrame(probs)
1115
1118
  probs.columns = sigs
@@ -0,0 +1,7 @@
1
+
2
+ # THIS FILE IS GENERATED FROM SIGPROFILEREXTRACTOR SETUP.PY
3
+ short_version = '1.2.1'
4
+ version = '1.2.1'
5
+ Update = 'v1.2.1: Fix CLI non-zero exit code issue'
6
+
7
+
@@ -1,13 +1,35 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: SigProfilerExtractor
3
- Version: 1.1.25
3
+ Version: 1.2.1
4
4
  Summary: Extracts mutational signatures from mutational catalogues
5
5
  Home-page: https://github.com/AlexandrovLab/SigProfilerExtractor.git
6
6
  Author: S Mishu Ashiqul Islam
7
7
  Author-email: m0islam@ucsd.edu
8
8
  License: UCSD
9
+ Requires-Python: >=3.9
9
10
  Description-Content-Type: text/markdown
10
11
  License-File: LICENSE.txt
12
+ Requires-Dist: scipy>=1.6.3
13
+ Requires-Dist: torch>=1.8.1
14
+ Requires-Dist: numpy>=2.0.0
15
+ Requires-Dist: pandas>=2.0.0
16
+ Requires-Dist: nimfa>=1.1.0
17
+ Requires-Dist: sigProfilerPlotting>=1.4.0
18
+ Requires-Dist: SigProfilerMatrixGenerator>=1.3.0
19
+ Requires-Dist: SigProfilerAssignment>=0.2.0
20
+ Requires-Dist: statsmodels>=0.9.0
21
+ Requires-Dist: scikit-learn>=0.24.2
22
+ Requires-Dist: psutil>=5.6.1
23
+ Dynamic: author
24
+ Dynamic: author-email
25
+ Dynamic: description
26
+ Dynamic: description-content-type
27
+ Dynamic: home-page
28
+ Dynamic: license
29
+ Dynamic: license-file
30
+ Dynamic: requires-dist
31
+ Dynamic: requires-python
32
+ Dynamic: summary
11
33
 
12
34
  [![Docs](https://img.shields.io/badge/docs-latest-blue.svg)](https://osf.io/t6j7u/wiki/home/)
13
35
  [![License](https://img.shields.io/badge/License-BSD\%202--Clause-orange.svg)](https://opensource.org/licenses/BSD-2-Clause)
@@ -1,6 +1,7 @@
1
1
  LICENSE.txt
2
2
  MANIFEST.in
3
3
  README.md
4
+ pyproject.toml
4
5
  setup.py
5
6
  SigProfilerExtractor/__init__.py
6
7
  SigProfilerExtractor/estimate_best_solution.py
@@ -0,0 +1,11 @@
1
+ scipy>=1.6.3
2
+ torch>=1.8.1
3
+ numpy>=2.0.0
4
+ pandas>=2.0.0
5
+ nimfa>=1.1.0
6
+ sigProfilerPlotting>=1.4.0
7
+ SigProfilerMatrixGenerator>=1.3.0
8
+ SigProfilerAssignment>=0.2.0
9
+ statsmodels>=0.9.0
10
+ scikit-learn>=0.24.2
11
+ psutil>=5.6.1
@@ -0,0 +1,3 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61", "wheel", "build"]
3
+ build-backend = "setuptools.build_meta"
@@ -8,7 +8,7 @@ import subprocess
8
8
  if os.path.exists("dist"):
9
9
  shutil.rmtree("dist")
10
10
 
11
- VERSION = "1.1.25"
11
+ VERSION = "1.2.1"
12
12
 
13
13
 
14
14
  with open("README.md") as f:
@@ -21,7 +21,7 @@ def write_version_py(filename="SigProfilerExtractor/version.py"):
21
21
  # THIS FILE IS GENERATED FROM SIGPROFILEREXTRACTOR SETUP.PY
22
22
  short_version = '%(version)s'
23
23
  version = '%(version)s'
24
- Update = 'Upgrade v1.1.25: Add CLI support, README formatting udpate, and CI/CD badge fix.'
24
+ Update = 'v1.2.1: Fix CLI non-zero exit code issue'
25
25
 
26
26
  """
27
27
  fh = open(filename, "w")
@@ -37,12 +37,12 @@ Update = 'Upgrade v1.1.25: Add CLI support, README formatting udpate, and CI/CD
37
37
  requirements = [
38
38
  "scipy>=1.6.3",
39
39
  "torch>=1.8.1",
40
- "numpy>=1.21.2",
41
- "pandas>=1.2.4",
40
+ "numpy>=2.0.0",
41
+ "pandas>=2.0.0",
42
42
  "nimfa>=1.1.0",
43
- "SigProfilerMatrixGenerator>=1.2.25",
44
- "sigProfilerPlotting>=1.3.22",
45
- "SigProfilerAssignment>=0.1.4",
43
+ "sigProfilerPlotting>=1.4.0",
44
+ "SigProfilerMatrixGenerator>=1.3.0",
45
+ "SigProfilerAssignment>=0.2.0",
46
46
  "statsmodels>=0.9.0",
47
47
  "scikit-learn>=0.24.2",
48
48
  "psutil>=5.6.1",
@@ -104,6 +104,7 @@ setup(
104
104
  packages=["SigProfilerExtractor"],
105
105
  install_requires=requirements,
106
106
  include_package_data=True,
107
+ python_requires=">=3.9",
107
108
  entry_points={
108
109
  "console_scripts": [
109
110
  "SigProfilerExtractor=SigProfilerExtractor.sigprofilerextractor_cli:main_function",
@@ -1,7 +0,0 @@
1
-
2
- # THIS FILE IS GENERATED FROM SIGPROFILEREXTRACTOR SETUP.PY
3
- short_version = '1.1.25'
4
- version = '1.1.25'
5
- Update = 'Upgrade v1.1.25: Add CLI support, README formatting udpate, and CI/CD badge fix.'
6
-
7
-
@@ -1,11 +0,0 @@
1
- scipy>=1.6.3
2
- torch>=1.8.1
3
- numpy>=1.21.2
4
- pandas>=1.2.4
5
- nimfa>=1.1.0
6
- SigProfilerMatrixGenerator>=1.2.25
7
- sigProfilerPlotting>=1.3.22
8
- SigProfilerAssignment>=0.1.4
9
- statsmodels>=0.9.0
10
- scikit-learn>=0.24.2
11
- psutil>=5.6.1