SigProfilerExtractor 1.1.25__tar.gz → 1.2.0__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.
- {SigProfilerExtractor-1.1.25/SigProfilerExtractor.egg-info → sigprofilerextractor-1.2.0}/PKG-INFO +23 -2
- {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.0}/SigProfilerExtractor/nmf_cpu.py +4 -4
- {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.0}/SigProfilerExtractor/nmf_gpu.py +4 -4
- {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.0}/SigProfilerExtractor/subroutines.py +14 -11
- sigprofilerextractor-1.2.0/SigProfilerExtractor/version.py +7 -0
- {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.0/SigProfilerExtractor.egg-info}/PKG-INFO +23 -2
- sigprofilerextractor-1.2.0/SigProfilerExtractor.egg-info/requires.txt +11 -0
- {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.0}/setup.py +8 -7
- SigProfilerExtractor-1.1.25/SigProfilerExtractor/version.py +0 -7
- SigProfilerExtractor-1.1.25/SigProfilerExtractor.egg-info/requires.txt +0 -11
- {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.0}/LICENSE.txt +0 -0
- {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.0}/MANIFEST.in +0 -0
- {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.0}/README.md +0 -0
- {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.0}/SigProfilerExtractor/__init__.py +0 -0
- {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.0}/SigProfilerExtractor/controllers/cli_controller.py +0 -0
- {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.0}/SigProfilerExtractor/data/CNVInput/Battenberg_test.tsv +0 -0
- {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.0}/SigProfilerExtractor/data/CSVInput/csv_example.csv +0 -0
- {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.0}/SigProfilerExtractor/data/MatObjInput/21_breast_WGS_substitutions.mat +0 -0
- {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.0}/SigProfilerExtractor/data/ReferenceFiles/CNV_features.tsv +0 -0
- {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.0}/SigProfilerExtractor/data/ReferenceFiles/CN_classes_dictionary.txt +0 -0
- {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.0}/SigProfilerExtractor/data/TextInput/Samples_CNV.txt +0 -0
- {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.0}/SigProfilerExtractor/data/TextInput/Samples_DBS.txt +0 -0
- {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.0}/SigProfilerExtractor/data/TextInput/Samples_ID.txt +0 -0
- {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.0}/SigProfilerExtractor/data/TextInput/Samples_SBS.txt +0 -0
- {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.0}/SigProfilerExtractor/data/TextInput/Samples_SV.txt +0 -0
- {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.0}/SigProfilerExtractor/data/VCFInput/PD3851a.vcf +0 -0
- {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.0}/SigProfilerExtractor/data/VCFInput/PD3890a.vcf +0 -0
- {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.0}/SigProfilerExtractor/data/VCFInput/PD3904a.vcf +0 -0
- {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.0}/SigProfilerExtractor/data/VCFInput/PD3905a.vcf +0 -0
- {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.0}/SigProfilerExtractor/data/VCFInput/PD3945a.vcf +0 -0
- {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.0}/SigProfilerExtractor/estimate_best_solution.py +0 -0
- {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.0}/SigProfilerExtractor/sigpro.py +0 -0
- {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.0}/SigProfilerExtractor/sigprofilerextractor_cli.py +0 -0
- {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.0}/SigProfilerExtractor.egg-info/SOURCES.txt +0 -0
- {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.0}/SigProfilerExtractor.egg-info/dependency_links.txt +0 -0
- {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.0}/SigProfilerExtractor.egg-info/entry_points.txt +0 -0
- {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.0}/SigProfilerExtractor.egg-info/not-zip-safe +0 -0
- {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.0}/SigProfilerExtractor.egg-info/top_level.txt +0 -0
- {SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.0}/setup.cfg +0 -0
{SigProfilerExtractor-1.1.25/SigProfilerExtractor.egg-info → sigprofilerextractor-1.2.0}/PKG-INFO
RENAMED
|
@@ -1,13 +1,34 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: SigProfilerExtractor
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.2.0
|
|
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: requires-dist
|
|
30
|
+
Dynamic: requires-python
|
|
31
|
+
Dynamic: summary
|
|
11
32
|
|
|
12
33
|
[](https://osf.io/t6j7u/wiki/home/)
|
|
13
34
|
[](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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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
|
{SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.0}/SigProfilerExtractor/subroutines.py
RENAMED
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
{SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.0/SigProfilerExtractor.egg-info}/PKG-INFO
RENAMED
|
@@ -1,13 +1,34 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.2
|
|
2
2
|
Name: SigProfilerExtractor
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.2.0
|
|
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: requires-dist
|
|
30
|
+
Dynamic: requires-python
|
|
31
|
+
Dynamic: summary
|
|
11
32
|
|
|
12
33
|
[](https://osf.io/t6j7u/wiki/home/)
|
|
13
34
|
[](https://opensource.org/licenses/BSD-2-Clause)
|
|
@@ -8,7 +8,7 @@ import subprocess
|
|
|
8
8
|
if os.path.exists("dist"):
|
|
9
9
|
shutil.rmtree("dist")
|
|
10
10
|
|
|
11
|
-
VERSION = "1.
|
|
11
|
+
VERSION = "1.2.0"
|
|
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.
|
|
24
|
+
Update = 'Upgrade v1.2.0: Require Pandas and Numpy >= 2.0.0 and Python >= 3.9'
|
|
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>=
|
|
41
|
-
"pandas>=
|
|
40
|
+
"numpy>=2.0.0",
|
|
41
|
+
"pandas>=2.0.0",
|
|
42
42
|
"nimfa>=1.1.0",
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"SigProfilerAssignment>=0.
|
|
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",
|
|
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
|
{SigProfilerExtractor-1.1.25 → sigprofilerextractor-1.2.0}/SigProfilerExtractor.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|