SigProfilerExtractor 1.2.1__tar.gz → 1.2.3__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 (39) hide show
  1. {sigprofilerextractor-1.2.1/SigProfilerExtractor.egg-info → sigprofilerextractor-1.2.3}/PKG-INFO +5 -5
  2. {sigprofilerextractor-1.2.1 → sigprofilerextractor-1.2.3}/README.md +1 -1
  3. {sigprofilerextractor-1.2.1 → sigprofilerextractor-1.2.3}/SigProfilerExtractor/controllers/cli_controller.py +17 -0
  4. {sigprofilerextractor-1.2.1 → sigprofilerextractor-1.2.3}/SigProfilerExtractor/sigpro.py +21 -26
  5. {sigprofilerextractor-1.2.1 → sigprofilerextractor-1.2.3}/SigProfilerExtractor/subroutines.py +2 -0
  6. sigprofilerextractor-1.2.3/SigProfilerExtractor/version.py +7 -0
  7. {sigprofilerextractor-1.2.1 → sigprofilerextractor-1.2.3/SigProfilerExtractor.egg-info}/PKG-INFO +5 -5
  8. {sigprofilerextractor-1.2.1 → sigprofilerextractor-1.2.3}/SigProfilerExtractor.egg-info/requires.txt +3 -3
  9. {sigprofilerextractor-1.2.1 → sigprofilerextractor-1.2.3}/setup.py +5 -5
  10. sigprofilerextractor-1.2.1/SigProfilerExtractor/version.py +0 -7
  11. {sigprofilerextractor-1.2.1 → sigprofilerextractor-1.2.3}/LICENSE.txt +0 -0
  12. {sigprofilerextractor-1.2.1 → sigprofilerextractor-1.2.3}/MANIFEST.in +0 -0
  13. {sigprofilerextractor-1.2.1 → sigprofilerextractor-1.2.3}/SigProfilerExtractor/__init__.py +0 -0
  14. {sigprofilerextractor-1.2.1 → sigprofilerextractor-1.2.3}/SigProfilerExtractor/data/CNVInput/Battenberg_test.tsv +0 -0
  15. {sigprofilerextractor-1.2.1 → sigprofilerextractor-1.2.3}/SigProfilerExtractor/data/CSVInput/csv_example.csv +0 -0
  16. {sigprofilerextractor-1.2.1 → sigprofilerextractor-1.2.3}/SigProfilerExtractor/data/MatObjInput/21_breast_WGS_substitutions.mat +0 -0
  17. {sigprofilerextractor-1.2.1 → sigprofilerextractor-1.2.3}/SigProfilerExtractor/data/ReferenceFiles/CNV_features.tsv +0 -0
  18. {sigprofilerextractor-1.2.1 → sigprofilerextractor-1.2.3}/SigProfilerExtractor/data/ReferenceFiles/CN_classes_dictionary.txt +0 -0
  19. {sigprofilerextractor-1.2.1 → sigprofilerextractor-1.2.3}/SigProfilerExtractor/data/TextInput/Samples_CNV.txt +0 -0
  20. {sigprofilerextractor-1.2.1 → sigprofilerextractor-1.2.3}/SigProfilerExtractor/data/TextInput/Samples_DBS.txt +0 -0
  21. {sigprofilerextractor-1.2.1 → sigprofilerextractor-1.2.3}/SigProfilerExtractor/data/TextInput/Samples_ID.txt +0 -0
  22. {sigprofilerextractor-1.2.1 → sigprofilerextractor-1.2.3}/SigProfilerExtractor/data/TextInput/Samples_SBS.txt +0 -0
  23. {sigprofilerextractor-1.2.1 → sigprofilerextractor-1.2.3}/SigProfilerExtractor/data/TextInput/Samples_SV.txt +0 -0
  24. {sigprofilerextractor-1.2.1 → sigprofilerextractor-1.2.3}/SigProfilerExtractor/data/VCFInput/PD3851a.vcf +0 -0
  25. {sigprofilerextractor-1.2.1 → sigprofilerextractor-1.2.3}/SigProfilerExtractor/data/VCFInput/PD3890a.vcf +0 -0
  26. {sigprofilerextractor-1.2.1 → sigprofilerextractor-1.2.3}/SigProfilerExtractor/data/VCFInput/PD3904a.vcf +0 -0
  27. {sigprofilerextractor-1.2.1 → sigprofilerextractor-1.2.3}/SigProfilerExtractor/data/VCFInput/PD3905a.vcf +0 -0
  28. {sigprofilerextractor-1.2.1 → sigprofilerextractor-1.2.3}/SigProfilerExtractor/data/VCFInput/PD3945a.vcf +0 -0
  29. {sigprofilerextractor-1.2.1 → sigprofilerextractor-1.2.3}/SigProfilerExtractor/estimate_best_solution.py +0 -0
  30. {sigprofilerextractor-1.2.1 → sigprofilerextractor-1.2.3}/SigProfilerExtractor/nmf_cpu.py +0 -0
  31. {sigprofilerextractor-1.2.1 → sigprofilerextractor-1.2.3}/SigProfilerExtractor/nmf_gpu.py +0 -0
  32. {sigprofilerextractor-1.2.1 → sigprofilerextractor-1.2.3}/SigProfilerExtractor/sigprofilerextractor_cli.py +0 -0
  33. {sigprofilerextractor-1.2.1 → sigprofilerextractor-1.2.3}/SigProfilerExtractor.egg-info/SOURCES.txt +0 -0
  34. {sigprofilerextractor-1.2.1 → sigprofilerextractor-1.2.3}/SigProfilerExtractor.egg-info/dependency_links.txt +0 -0
  35. {sigprofilerextractor-1.2.1 → sigprofilerextractor-1.2.3}/SigProfilerExtractor.egg-info/entry_points.txt +0 -0
  36. {sigprofilerextractor-1.2.1 → sigprofilerextractor-1.2.3}/SigProfilerExtractor.egg-info/not-zip-safe +0 -0
  37. {sigprofilerextractor-1.2.1 → sigprofilerextractor-1.2.3}/SigProfilerExtractor.egg-info/top_level.txt +0 -0
  38. {sigprofilerextractor-1.2.1 → sigprofilerextractor-1.2.3}/pyproject.toml +0 -0
  39. {sigprofilerextractor-1.2.1 → sigprofilerextractor-1.2.3}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: SigProfilerExtractor
3
- Version: 1.2.1
3
+ Version: 1.2.3
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
@@ -14,9 +14,9 @@ Requires-Dist: torch>=1.8.1
14
14
  Requires-Dist: numpy>=2.0.0
15
15
  Requires-Dist: pandas>=2.0.0
16
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
17
+ Requires-Dist: sigProfilerPlotting>=1.4.1
18
+ Requires-Dist: SigProfilerMatrixGenerator>=1.3.5
19
+ Requires-Dist: SigProfilerAssignment>=0.2.4
20
20
  Requires-Dist: statsmodels>=0.9.0
21
21
  Requires-Dist: scikit-learn>=0.24.2
22
22
  Requires-Dist: psutil>=5.6.1
@@ -130,7 +130,7 @@ sigProfilerExtractor(input_type, out_put, input_data, reference_genome="GRCh37",
130
130
  | | **output** | String | The name of the output folder. The output folder will be generated in the current working directory. |
131
131
  | | **input_data** | String | <br>Path to input folder for input_type:<ul><li>`vcf`</li><li>`bedpe`</li></ul>Path to file for input_type:<ul><li>`matrix`</li><li>`seg:TYPE`</li></ul> |
132
132
  | | **reference_genome** | String | The name of the reference genome (default: `"GRCh37"`). This parameter is applicable only if the `input_type` is `"vcf"`. |
133
- | | **opportunity_genome** | String | The build or version of the reference genome for the reference signatures (default: `"GRCh37"`). When the input_type is `"vcf"`, the opportunity_genome automatically matches the input reference genome value. Only the genomes available in COSMIC are supported (`GRCh37`, `GRCh38`, `mm9`, `mm10`, and `rn6`). If a different opportunity genome is selected, the default genome `GRCh37` will be used. |
133
+ | | **opportunity_genome** | String | The build or version of the reference genome for the reference signatures (default: `"GRCh37"`). When the input_type is `"vcf"`, the opportunity_genome automatically matches the input reference genome value. Only the genomes available in COSMIC are supported (`GRCh37`, `GRCh38`, `mm9`, `mm10`, `mm39`, `rn6`, and `rn7`). If a different opportunity genome is selected, the default genome `GRCh37` will be used. |
134
134
  | | **context_type** | String | Mutation context name(s), separated by commas (`,`), that define the mutational contexts for signature extraction (default: `"96,DINUC,ID"`). In the default value, `96` represents the SBS96 context, `DINUC` represents the dinucleotide context, and `ID` represents the indel context. |
135
135
  | | **exome** | Boolean | Defines if the exomes will be extracted (default: `False`). |
136
136
  | **NMF Replicates** | | | |
@@ -97,7 +97,7 @@ sigProfilerExtractor(input_type, out_put, input_data, reference_genome="GRCh37",
97
97
  | | **output** | String | The name of the output folder. The output folder will be generated in the current working directory. |
98
98
  | | **input_data** | String | <br>Path to input folder for input_type:<ul><li>`vcf`</li><li>`bedpe`</li></ul>Path to file for input_type:<ul><li>`matrix`</li><li>`seg:TYPE`</li></ul> |
99
99
  | | **reference_genome** | String | The name of the reference genome (default: `"GRCh37"`). This parameter is applicable only if the `input_type` is `"vcf"`. |
100
- | | **opportunity_genome** | String | The build or version of the reference genome for the reference signatures (default: `"GRCh37"`). When the input_type is `"vcf"`, the opportunity_genome automatically matches the input reference genome value. Only the genomes available in COSMIC are supported (`GRCh37`, `GRCh38`, `mm9`, `mm10`, and `rn6`). If a different opportunity genome is selected, the default genome `GRCh37` will be used. |
100
+ | | **opportunity_genome** | String | The build or version of the reference genome for the reference signatures (default: `"GRCh37"`). When the input_type is `"vcf"`, the opportunity_genome automatically matches the input reference genome value. Only the genomes available in COSMIC are supported (`GRCh37`, `GRCh38`, `mm9`, `mm10`, `mm39`, `rn6`, and `rn7`). If a different opportunity genome is selected, the default genome `GRCh37` will be used. |
101
101
  | | **context_type** | String | Mutation context name(s), separated by commas (`,`), that define the mutational contexts for signature extraction (default: `"96,DINUC,ID"`). In the default value, `96` represents the SBS96 context, `DINUC` represents the dinucleotide context, and `ID` represents the indel context. |
102
102
  | | **exome** | Boolean | Defines if the exomes will be extracted (default: `False`). |
103
103
  | **NMF Replicates** | | | |
@@ -223,6 +223,21 @@ def parse_arguments_extractor(args: List[str], description: str) -> argparse.Nam
223
223
  help="Collapse to SBS288 and SBS1536 matrices to SBS96. If False, will map reference signatures to the same context as input (default: True).",
224
224
  )
225
225
 
226
+ parser.add_argument(
227
+ "--stop_after_extraction",
228
+ type=str2bool,
229
+ nargs="?",
230
+ const=True,
231
+ default=False,
232
+ help="Stop after de novo extraction (default: False).",
233
+ )
234
+
235
+ parser.add_argument(
236
+ "--volume",
237
+ default=None,
238
+ help="User specified directory for saving/loading template files.",
239
+ )
240
+
226
241
  return parser.parse_args(args)
227
242
 
228
243
 
@@ -263,4 +278,6 @@ class CliController:
263
278
  cosmic_version=parsed_args.cosmic_version,
264
279
  make_decomposition_plots=parsed_args.make_decomposition_plots,
265
280
  collapse_to_SBS96=parsed_args.collapse_to_SBS96,
281
+ stop_after_extraction=parsed_args.stop_after_extraction,
282
+ volume=parsed_args.volume,
266
283
  )
@@ -269,6 +269,7 @@ def sigProfilerExtractor(
269
269
  combined_stability=1.0,
270
270
  allow_stability_drop=False,
271
271
  get_all_signature_matrices=False,
272
+ stop_after_extraction=False,
272
273
  volume=None,
273
274
  ):
274
275
  """
@@ -1093,45 +1094,39 @@ def sigProfilerExtractor(
1093
1094
  devopts["make_decomposition_plots"] = make_decomposition_plots
1094
1095
 
1095
1096
  # Check if genome_build is available in COSMIC, if not reset to GRCh37
1096
- if (
1097
- genome_build == "GRCh37"
1098
- or genome_build == "GRCh38"
1099
- or genome_build == "mm9"
1100
- or genome_build == "mm10"
1101
- or genome_build == "rn6"
1102
- ):
1097
+ if genome_build in ["GRCh37", "GRCh38", "mm9", "mm10", "mm39", "rn6", "rn7"]:
1103
1098
  genome_build = genome_build
1104
1099
  else:
1105
1100
  sysdata = open(out_put + "/JOB_METADATA.txt", "a")
1106
1101
  sysdata.write(
1107
- "\n[{}] The selected opportunity genome is {}. COSMIC signatures are available only for GRCh37/38, mm9/10 and rn6 genomes. So, the opportunity genome is reset to GRCh37.\n".format(
1102
+ "\n[{}] The selected opportunity genome is {}. COSMIC signatures are available only for GRCh37/38, mm9/10/39 and rn6/7 genomes. So, the opportunity genome is reset to GRCh37.\n".format(
1108
1103
  str(datetime.datetime.now()).split(".")[0], str(genome_build)
1109
1104
  )
1110
1105
  )
1111
1106
  print(
1112
1107
  "The selected opportunity genome is "
1113
1108
  + str(genome_build)
1114
- + ". COSMIC signatures are available only for GRCh37/38, mm9/10 and rn6 genomes. So, the opportunity genome is reset to GRCh37."
1109
+ + ". COSMIC signatures are available only for GRCh37/38, mm9/10/39 and rn6/7 genomes. So, the opportunity genome is reset to GRCh37."
1115
1110
  )
1116
1111
  sysdata.close()
1117
1112
  genome_build = "GRCh37"
1118
-
1119
- decomp.spa_analyze(
1120
- allgenomes,
1121
- output,
1122
- signatures=processAvg,
1123
- genome_build=genome_build,
1124
- cosmic_version=cosmic_version,
1125
- exome=exome,
1126
- verbose=False,
1127
- decompose_fit_option=True,
1128
- denovo_refit_option=True,
1129
- cosmic_fit_option=False,
1130
- export_probabilities=export_probabilities,
1131
- devopts=devopts,
1132
- make_metadata=False,
1133
- volume=volume,
1134
- )
1113
+ if not stop_after_extraction:
1114
+ decomp.spa_analyze(
1115
+ allgenomes,
1116
+ output,
1117
+ signatures=processAvg,
1118
+ genome_build=genome_build,
1119
+ cosmic_version=cosmic_version,
1120
+ exome=exome,
1121
+ verbose=False,
1122
+ decompose_fit_option=True,
1123
+ denovo_refit_option=True,
1124
+ cosmic_fit_option=False,
1125
+ export_probabilities=export_probabilities,
1126
+ devopts=devopts,
1127
+ make_metadata=False,
1128
+ volume=volume,
1129
+ )
1135
1130
 
1136
1131
  sysdata = open(out_put + "/JOB_METADATA.txt", "a")
1137
1132
  end_time = datetime.datetime.now()
@@ -1676,6 +1676,8 @@ def export_information(
1676
1676
  "S" + str(i),
1677
1677
  tmp_m,
1678
1678
  True,
1679
+ custom_text_upper=stability_list,
1680
+ custom_text_middle=total_mutation_list,
1679
1681
  )
1680
1682
  else:
1681
1683
  custom_signatures_plot(processes, signature_subdirectory)
@@ -0,0 +1,7 @@
1
+
2
+ # THIS FILE IS GENERATED FROM SIGPROFILEREXTRACTOR SETUP.PY
3
+ short_version = '1.2.3'
4
+ version = '1.2.3'
5
+ Update = 'v1.2.3: Add support for rn7 and mm39 genomes'
6
+
7
+
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: SigProfilerExtractor
3
- Version: 1.2.1
3
+ Version: 1.2.3
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
@@ -14,9 +14,9 @@ Requires-Dist: torch>=1.8.1
14
14
  Requires-Dist: numpy>=2.0.0
15
15
  Requires-Dist: pandas>=2.0.0
16
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
17
+ Requires-Dist: sigProfilerPlotting>=1.4.1
18
+ Requires-Dist: SigProfilerMatrixGenerator>=1.3.5
19
+ Requires-Dist: SigProfilerAssignment>=0.2.4
20
20
  Requires-Dist: statsmodels>=0.9.0
21
21
  Requires-Dist: scikit-learn>=0.24.2
22
22
  Requires-Dist: psutil>=5.6.1
@@ -130,7 +130,7 @@ sigProfilerExtractor(input_type, out_put, input_data, reference_genome="GRCh37",
130
130
  | | **output** | String | The name of the output folder. The output folder will be generated in the current working directory. |
131
131
  | | **input_data** | String | <br>Path to input folder for input_type:<ul><li>`vcf`</li><li>`bedpe`</li></ul>Path to file for input_type:<ul><li>`matrix`</li><li>`seg:TYPE`</li></ul> |
132
132
  | | **reference_genome** | String | The name of the reference genome (default: `"GRCh37"`). This parameter is applicable only if the `input_type` is `"vcf"`. |
133
- | | **opportunity_genome** | String | The build or version of the reference genome for the reference signatures (default: `"GRCh37"`). When the input_type is `"vcf"`, the opportunity_genome automatically matches the input reference genome value. Only the genomes available in COSMIC are supported (`GRCh37`, `GRCh38`, `mm9`, `mm10`, and `rn6`). If a different opportunity genome is selected, the default genome `GRCh37` will be used. |
133
+ | | **opportunity_genome** | String | The build or version of the reference genome for the reference signatures (default: `"GRCh37"`). When the input_type is `"vcf"`, the opportunity_genome automatically matches the input reference genome value. Only the genomes available in COSMIC are supported (`GRCh37`, `GRCh38`, `mm9`, `mm10`, `mm39`, `rn6`, and `rn7`). If a different opportunity genome is selected, the default genome `GRCh37` will be used. |
134
134
  | | **context_type** | String | Mutation context name(s), separated by commas (`,`), that define the mutational contexts for signature extraction (default: `"96,DINUC,ID"`). In the default value, `96` represents the SBS96 context, `DINUC` represents the dinucleotide context, and `ID` represents the indel context. |
135
135
  | | **exome** | Boolean | Defines if the exomes will be extracted (default: `False`). |
136
136
  | **NMF Replicates** | | | |
@@ -3,9 +3,9 @@ torch>=1.8.1
3
3
  numpy>=2.0.0
4
4
  pandas>=2.0.0
5
5
  nimfa>=1.1.0
6
- sigProfilerPlotting>=1.4.0
7
- SigProfilerMatrixGenerator>=1.3.0
8
- SigProfilerAssignment>=0.2.0
6
+ sigProfilerPlotting>=1.4.1
7
+ SigProfilerMatrixGenerator>=1.3.5
8
+ SigProfilerAssignment>=0.2.4
9
9
  statsmodels>=0.9.0
10
10
  scikit-learn>=0.24.2
11
11
  psutil>=5.6.1
@@ -8,7 +8,7 @@ import subprocess
8
8
  if os.path.exists("dist"):
9
9
  shutil.rmtree("dist")
10
10
 
11
- VERSION = "1.2.1"
11
+ VERSION = "1.2.3"
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 = 'v1.2.1: Fix CLI non-zero exit code issue'
24
+ Update = 'v1.2.3: Add support for rn7 and mm39 genomes'
25
25
 
26
26
  """
27
27
  fh = open(filename, "w")
@@ -40,9 +40,9 @@ requirements = [
40
40
  "numpy>=2.0.0",
41
41
  "pandas>=2.0.0",
42
42
  "nimfa>=1.1.0",
43
- "sigProfilerPlotting>=1.4.0",
44
- "SigProfilerMatrixGenerator>=1.3.0",
45
- "SigProfilerAssignment>=0.2.0",
43
+ "sigProfilerPlotting>=1.4.1",
44
+ "SigProfilerMatrixGenerator>=1.3.5",
45
+ "SigProfilerAssignment>=0.2.4",
46
46
  "statsmodels>=0.9.0",
47
47
  "scikit-learn>=0.24.2",
48
48
  "psutil>=5.6.1",
@@ -1,7 +0,0 @@
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
-