SigProfilerAssignment 0.2.2__tar.gz → 0.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.
- {sigprofilerassignment-0.2.2/SigProfilerAssignment.egg-info → sigprofilerassignment-0.2.3}/PKG-INFO +1 -1
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/decompose_subroutines.py +198 -194
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/decomposition.py +2 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/single_sample.py +50 -22
- sigprofilerassignment-0.2.3/SigProfilerAssignment/version.py +7 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3/SigProfilerAssignment.egg-info}/PKG-INFO +1 -1
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/setup.py +2 -3
- sigprofilerassignment-0.2.2/SigProfilerAssignment/version.py +0 -8
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/LICENSE.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/MANIFEST.in +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/README.md +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/Analyzer.py +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/DecompositionPlots/PlotDecomposition.py +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/DecompositionPlots/PlotDecomposition_CNV48.py +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/DecompositionPlots/PlotDecomposition_DBS78.py +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/DecompositionPlots/PlotDecomposition_ID83.py +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/DecompositionPlots/PlotDecomposition_SBS1536.py +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/DecompositionPlots/PlotDecomposition_SBS288.py +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/DecompositionPlots/PlotDecomposition_SBS96.py +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/DecompositionPlots/PlotDecomposition_SV32.py +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/DecompositionPlots/ReferenceFiles/Accolade_fermante.png +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/DecompositionPlots/ReferenceFiles/CREDIT.md +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/DecompositionPlots/ReferenceFiles/Fonts/Arial Bold.ttf +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/DecompositionPlots/SigProfilerPlottingMatrix.py +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/SigProfilerAssignment_CLI.py +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/__init__.py +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/controllers/cli_controller.py +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/21_breast_WGS_substitutions.mat +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/CNV_features.tsv +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/CNV_signatures.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/CN_classes_dictionary.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/DBS_signatures_genome_builds.xlsx +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v1_SBS_GRCh37.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v1_SBS_GRCh37_exome.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v2_SBS_GRCh37.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v2_SBS_GRCh37_exome.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v3.1_DBS_GRCh37.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v3.1_DBS_GRCh37_exome.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v3.1_ID_GRCh37.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v3.1_SBS_GRCh37.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v3.1_SBS_GRCh37_exome.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v3.2_DBS_GRCh37.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v3.2_DBS_GRCh37_exome.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v3.2_ID_GRCh37.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v3.2_SBS288_GRCh37.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v3.2_SBS_GRCh37.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v3.2_SBS_GRCh37_exome.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v3.3_CN_GRCh37.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v3.3_DBS_GRCh37.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v3.3_DBS_GRCh37_exome.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v3.3_ID_GRCh37.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v3.3_SBS_GRCh37.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v3.3_SBS_GRCh37_exome.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v3.4_CN_GRCh37.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v3.4_DBS_GRCh37.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v3.4_DBS_GRCh37_exome.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v3.4_ID_GRCh37.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v3.4_SBS_GRCh37.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v3.4_SBS_GRCh37_exome.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v3_DBS_GRCh37.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v3_DBS_GRCh37_exome.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v3_ID_GRCh37.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v3_SBS_GRCh37.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v3_SBS_GRCh37_exome.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh38/COSMIC_v1_SBS_GRCh38.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh38/COSMIC_v1_SBS_GRCh38_exome.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh38/COSMIC_v2_SBS_GRCh38.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh38/COSMIC_v2_SBS_GRCh38_exome.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh38/COSMIC_v3.1_DBS_GRCh38.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh38/COSMIC_v3.1_DBS_GRCh38_exome.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh38/COSMIC_v3.1_SBS_GRCh38.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh38/COSMIC_v3.1_SBS_GRCh38_exome.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh38/COSMIC_v3.2_DBS_GRCh38.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh38/COSMIC_v3.2_DBS_GRCh38_exome.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh38/COSMIC_v3.2_SBS_GRCh38.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh38/COSMIC_v3.2_SBS_GRCh38_exome.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh38/COSMIC_v3.3_DBS_GRCh38.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh38/COSMIC_v3.3_DBS_GRCh38_exome.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh38/COSMIC_v3.3_SBS_GRCh38.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh38/COSMIC_v3.3_SBS_GRCh38_exome.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh38/COSMIC_v3.4_DBS_GRCh38.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh38/COSMIC_v3.4_DBS_GRCh38_exome.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh38/COSMIC_v3.4_SBS_GRCh38.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh38/COSMIC_v3.4_SBS_GRCh38_exome.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh38/COSMIC_v3.4_SV_GRCh38.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh38/COSMIC_v3_DBS_GRCh38.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh38/COSMIC_v3_DBS_GRCh38_exome.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh38/COSMIC_v3_SBS_GRCh38.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh38/COSMIC_v3_SBS_GRCh38_exome.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm10/COSMIC_v1_SBS_mm10.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm10/COSMIC_v1_SBS_mm10_exome.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm10/COSMIC_v2_SBS_mm10.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm10/COSMIC_v2_SBS_mm10_exome.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm10/COSMIC_v3.1_DBS_mm10.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm10/COSMIC_v3.1_DBS_mm10_exome.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm10/COSMIC_v3.1_SBS_mm10.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm10/COSMIC_v3.1_SBS_mm10_exome.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm10/COSMIC_v3.2_DBS_mm10.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm10/COSMIC_v3.2_DBS_mm10_exome.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm10/COSMIC_v3.2_SBS_mm10.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm10/COSMIC_v3.2_SBS_mm10_exome.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm10/COSMIC_v3.3_DBS_mm10.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm10/COSMIC_v3.3_DBS_mm10_exome.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm10/COSMIC_v3.3_SBS_mm10.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm10/COSMIC_v3.3_SBS_mm10_exome.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm10/COSMIC_v3.4_DBS_mm10.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm10/COSMIC_v3.4_DBS_mm10_exome.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm10/COSMIC_v3.4_SBS_mm10.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm10/COSMIC_v3.4_SBS_mm10_exome.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm10/COSMIC_v3_DBS_mm10.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm10/COSMIC_v3_DBS_mm10_exome.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm10/COSMIC_v3_SBS_mm10.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm10/COSMIC_v3_SBS_mm10_exome.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm9/COSMIC_v1_SBS_mm9.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm9/COSMIC_v1_SBS_mm9_exome.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm9/COSMIC_v2_SBS_mm9.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm9/COSMIC_v2_SBS_mm9_exome.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm9/COSMIC_v3.1_DBS_mm9.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm9/COSMIC_v3.1_DBS_mm9_exome.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm9/COSMIC_v3.1_SBS_mm9.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm9/COSMIC_v3.1_SBS_mm9_exome.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm9/COSMIC_v3.2_DBS_mm9.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm9/COSMIC_v3.2_DBS_mm9_exome.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm9/COSMIC_v3.2_SBS_mm9.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm9/COSMIC_v3.2_SBS_mm9_exome.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm9/COSMIC_v3.3_DBS_mm9.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm9/COSMIC_v3.3_DBS_mm9_exome.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm9/COSMIC_v3.3_SBS_mm9.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm9/COSMIC_v3.3_SBS_mm9_exome.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm9/COSMIC_v3.4_DBS_mm9.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm9/COSMIC_v3.4_DBS_mm9_exome.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm9/COSMIC_v3.4_SBS_mm9.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm9/COSMIC_v3.4_SBS_mm9_exome.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm9/COSMIC_v3_DBS_mm9.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm9/COSMIC_v3_DBS_mm9_exome.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm9/COSMIC_v3_SBS_mm9.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm9/COSMIC_v3_SBS_mm9_exome.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/rn6/COSMIC_v1_SBS_rn6.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/rn6/COSMIC_v1_SBS_rn6_exome.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/rn6/COSMIC_v2_SBS_rn6.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/rn6/COSMIC_v2_SBS_rn6_exome.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/rn6/COSMIC_v3.1_DBS_rn6.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/rn6/COSMIC_v3.1_DBS_rn6_exome.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/rn6/COSMIC_v3.1_SBS_rn6.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/rn6/COSMIC_v3.1_SBS_rn6_exome.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/rn6/COSMIC_v3.2_DBS_rn6.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/rn6/COSMIC_v3.2_DBS_rn6_exome.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/rn6/COSMIC_v3.2_SBS_rn6.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/rn6/COSMIC_v3.2_SBS_rn6_exome.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/rn6/COSMIC_v3.3_DBS_rn6.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/rn6/COSMIC_v3.3_DBS_rn6_exome.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/rn6/COSMIC_v3.3_SBS_rn6.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/rn6/COSMIC_v3.3_SBS_rn6_exome.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/rn6/COSMIC_v3.4_DBS_rn6.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/rn6/COSMIC_v3.4_DBS_rn6_exome.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/rn6/COSMIC_v3.4_SBS_rn6.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/rn6/COSMIC_v3.4_SBS_rn6_exome.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/rn6/COSMIC_v3_DBS_rn6.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/rn6/COSMIC_v3_DBS_rn6_exome.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/rn6/COSMIC_v3_SBS_rn6.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/rn6/COSMIC_v3_SBS_rn6_exome.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/SBS_signatures_genome_builds.xlsx +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Samples.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/csvexample.csv +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/sigProfiler_DBS_signatures.csv +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/sigProfiler_ID_signatures.csv +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/sigProfiler_SBS_signatures_2018_03_28.csv +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/tests/cnv_input/all.breast.ascat.summary.sample.tsv +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/tests/txt_input/CNV48_S3_Signatures.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/tests/txt_input/DBS78_S3_Signatures.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/tests/txt_input/ID83_S3_Signatures.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/tests/txt_input/SBS96_S3_Signatures.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/tests/txt_input/SV32_S3_Signatures.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/tests/txt_input/sample_matrix_CNV48.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/tests/txt_input/sample_matrix_DBS.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/tests/txt_input/sample_matrix_ID.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/tests/txt_input/sample_matrix_SBS.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/tests/txt_input/sample_matrix_SV32.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/tests/vcf_input/PD3851a.vcf +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/tests/vcf_input/PD3890a.vcf +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/tests/vcf_input/PD3904a.vcf +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/tests/vcf_input/PD3945a.vcf +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/tests/vcf_input/PD4005a.vcf +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment.egg-info/SOURCES.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment.egg-info/dependency_links.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment.egg-info/entry_points.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment.egg-info/not-zip-safe +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment.egg-info/requires.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment.egg-info/top_level.txt +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/pyproject.toml +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/setup.cfg +0 -0
- {sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/tests/test_cli.py +0 -0
|
@@ -822,154 +822,234 @@ def make_final_solution(
|
|
|
822
822
|
check_rule_negatives = []
|
|
823
823
|
check_rule_penalty = 1.0
|
|
824
824
|
exposureAvg = np.zeros([processAvg.shape[1], allgenomes.shape[1]])
|
|
825
|
+
|
|
825
826
|
if cosmic_sigs == True:
|
|
826
827
|
denovo_exposureAvg = denovo_exposureAvg.T
|
|
827
|
-
with alive_bar(allgenomes.shape[1]) as bar:
|
|
828
|
+
# with alive_bar(allgenomes.shape[1]) as bar:
|
|
828
829
|
# print("\n")
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
+ str(r + 1)
|
|
836
|
-
+ " #################"
|
|
837
|
-
)
|
|
838
|
-
|
|
839
|
-
# Record information to lognote
|
|
840
|
-
lognote = open(
|
|
841
|
-
layer_directory
|
|
842
|
-
+ "/Solution_Stats/"
|
|
843
|
-
+ solution_prefix
|
|
844
|
-
+ "_Signature_Assignment_log.txt",
|
|
845
|
-
"a",
|
|
846
|
-
)
|
|
847
|
-
lognote.write(
|
|
848
|
-
"\n\n\n\n\n ################ Sample "
|
|
830
|
+
for r in range(allgenomes.shape[1]):
|
|
831
|
+
# print("Analyzing Sample => " , str(r+1))
|
|
832
|
+
# bar()
|
|
833
|
+
if verbose == True:
|
|
834
|
+
print(
|
|
835
|
+
"\n\n\n\n\n ################ Sample "
|
|
849
836
|
+ str(r + 1)
|
|
850
|
-
+ "
|
|
837
|
+
+ " #################"
|
|
851
838
|
)
|
|
852
839
|
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
840
|
+
# Record information to lognote
|
|
841
|
+
lognote = open(
|
|
842
|
+
layer_directory
|
|
843
|
+
+ "/Solution_Stats/"
|
|
844
|
+
+ solution_prefix
|
|
845
|
+
+ "_Signature_Assignment_log.txt",
|
|
846
|
+
"a",
|
|
847
|
+
)
|
|
848
|
+
lognote.write(
|
|
849
|
+
"\n\n\n\n\n ################ Sample "
|
|
850
|
+
+ str(r + 1)
|
|
851
|
+
+ " #################\n"
|
|
852
|
+
)
|
|
857
853
|
|
|
858
|
-
|
|
859
|
-
for de_novo_sig in init_sigs:
|
|
860
|
-
init_decomposed_sigs = union(
|
|
861
|
-
init_decomposed_sigs, list(attribution[de_novo_sig])
|
|
862
|
-
)
|
|
854
|
+
sample_exposure = np.array(denovo_exposureAvg.iloc[:, r])
|
|
863
855
|
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
init_decomposed_sigs_idx.sort()
|
|
867
|
-
init_decomposed_sigs_idx = list(
|
|
868
|
-
set().union(init_decomposed_sigs_idx, background_sigs)
|
|
869
|
-
)
|
|
870
|
-
# print(init_decomposed_sigs_idx)
|
|
856
|
+
init_sig_idx = np.nonzero(sample_exposure)[0]
|
|
857
|
+
init_sigs = denovo_exposureAvg.index[init_sig_idx]
|
|
871
858
|
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
859
|
+
init_decomposed_sigs = []
|
|
860
|
+
for de_novo_sig in init_sigs:
|
|
861
|
+
init_decomposed_sigs = union(
|
|
862
|
+
init_decomposed_sigs, list(attribution[de_novo_sig])
|
|
875
863
|
)
|
|
876
864
|
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
)
|
|
865
|
+
# print(init_decomposed_sigs)
|
|
866
|
+
init_decomposed_sigs_idx = get_indeces(allsigids, init_decomposed_sigs)
|
|
867
|
+
init_decomposed_sigs_idx.sort()
|
|
868
|
+
init_decomposed_sigs_idx = list(
|
|
869
|
+
set().union(init_decomposed_sigs_idx, background_sigs)
|
|
870
|
+
)
|
|
871
|
+
# print(init_decomposed_sigs_idx)
|
|
882
872
|
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
init_decomposed_sigs_idx, newExposure
|
|
888
|
-
):
|
|
889
|
-
exposureAvg[nonzero_idx, r] = nozero_exp
|
|
873
|
+
# get the indices of the background sigs in the initial signatures
|
|
874
|
+
background_sig_idx = get_indeces(
|
|
875
|
+
init_decomposed_sigs_idx, background_sigs
|
|
876
|
+
)
|
|
890
877
|
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
_,
|
|
897
|
-
) = ss.remove_all_single_signatures(
|
|
898
|
-
processAvg,
|
|
899
|
-
exposureAvg[:, r],
|
|
900
|
-
allgenomes[:, r],
|
|
901
|
-
metric="l2",
|
|
902
|
-
verbose=False,
|
|
903
|
-
cutoff=0.02,
|
|
904
|
-
)
|
|
905
|
-
# get the maximum value of the new Exposure
|
|
906
|
-
maxcoef = max(list(exposureAvg[:, r]))
|
|
907
|
-
idxmaxcoef = list(exposureAvg[:, r]).index(maxcoef)
|
|
908
|
-
|
|
909
|
-
exposureAvg[:, r] = np.round(exposureAvg[:, r])
|
|
910
|
-
|
|
911
|
-
# We may need to tweak the maximum value of the new exposure to keep the total number of mutation equal to the original mutations in a genome
|
|
912
|
-
if np.sum(exposureAvg[:, r]) != maxmutation:
|
|
913
|
-
exposureAvg[:, r][idxmaxcoef] = (
|
|
914
|
-
round(exposureAvg[:, r][idxmaxcoef])
|
|
915
|
-
+ maxmutation
|
|
916
|
-
- sum(exposureAvg[:, r])
|
|
917
|
-
)
|
|
918
|
-
# print(exposureAvg[:, r])
|
|
919
|
-
# print("\n")
|
|
878
|
+
fit_signatures = processAvg[:, init_decomposed_sigs_idx]
|
|
879
|
+
# fit signatures
|
|
880
|
+
newExposure, newSimilarity = ss.fit_signatures(
|
|
881
|
+
fit_signatures, allgenomes[:, r]
|
|
882
|
+
)
|
|
920
883
|
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
884
|
+
# create the exposureAvg vector
|
|
885
|
+
# print(init_decomposed_sigs_idx)
|
|
886
|
+
# print(newExposure)
|
|
887
|
+
for nonzero_idx, nozero_exp in zip(
|
|
888
|
+
init_decomposed_sigs_idx, newExposure
|
|
889
|
+
):
|
|
890
|
+
exposureAvg[nonzero_idx, r] = nozero_exp
|
|
891
|
+
|
|
892
|
+
if pcawg_rule == True:
|
|
893
|
+
maxmutation = np.sum(allgenomes[:, r])
|
|
894
|
+
(
|
|
895
|
+
exposureAvg[:, r],
|
|
896
|
+
remove_distance,
|
|
897
|
+
_,
|
|
898
|
+
) = ss.remove_all_single_signatures(
|
|
899
|
+
processAvg,
|
|
900
|
+
exposureAvg[:, r],
|
|
901
|
+
allgenomes[:, r],
|
|
902
|
+
metric="l2",
|
|
903
|
+
verbose=False,
|
|
904
|
+
cutoff=0.02,
|
|
905
|
+
)
|
|
906
|
+
# get the maximum value of the new Exposure
|
|
907
|
+
# maxcoef = max(list(exposureAvg[:, r]))
|
|
908
|
+
# idxmaxcoef = list(exposureAvg[:, r]).index(maxcoef)
|
|
909
|
+
|
|
910
|
+
# exposureAvg[:, r] = np.round(exposureAvg[:, r])
|
|
911
|
+
exposureAvg[:, r] = ss.roundConserveSum(exposureAvg[:, r])
|
|
912
|
+
|
|
913
|
+
# We may need to tweak the maximum value of the new exposure to keep the total number of mutation equal to the original mutations in a genome
|
|
914
|
+
# if np.sum(exposureAvg[:, r]) != maxmutation:
|
|
915
|
+
# exposureAvg[:, r][idxmaxcoef] = (
|
|
916
|
+
# round(exposureAvg[:, r][idxmaxcoef])
|
|
917
|
+
# + maxmutation
|
|
918
|
+
# - sum(exposureAvg[:, r])
|
|
919
|
+
# )
|
|
920
|
+
# print(exposureAvg[:, r])
|
|
921
|
+
# print("\n")
|
|
922
|
+
if np.sum(exposureAvg[:, r])!=round(maxmutation): raise ValueError("Mutation count not conserved")
|
|
928
923
|
|
|
929
|
-
|
|
930
|
-
|
|
924
|
+
else:
|
|
925
|
+
if verbose == True:
|
|
926
|
+
print(
|
|
927
|
+
"############################# Initial Composition #################################### "
|
|
931
928
|
)
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
929
|
+
print(pd.DataFrame(exposureAvg[:, r], index=allsigids).T)
|
|
930
|
+
print("L2%: ", newSimilarity)
|
|
931
|
+
|
|
932
|
+
lognote.write(
|
|
933
|
+
"############################# Initial Composition ####################################\n"
|
|
934
|
+
)
|
|
935
|
+
exposures = pd.DataFrame(exposureAvg[:, r], index=allsigids).T
|
|
936
|
+
lognote.write(
|
|
937
|
+
"{}\n".format(
|
|
938
|
+
exposures.iloc[:, exposures.to_numpy().nonzero()[1]]
|
|
937
939
|
)
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
),
|
|
946
|
-
2,
|
|
940
|
+
)
|
|
941
|
+
lognote.write(
|
|
942
|
+
"L2 Error %: {}\nCosine Similarity: {}\n".format(
|
|
943
|
+
round(newSimilarity, 2),
|
|
944
|
+
round(
|
|
945
|
+
cos_sim(
|
|
946
|
+
allgenomes[:, r],
|
|
947
|
+
np.dot(processAvg, exposureAvg[:, r]),
|
|
947
948
|
),
|
|
948
|
-
|
|
949
|
+
2,
|
|
950
|
+
),
|
|
951
|
+
)
|
|
952
|
+
)
|
|
953
|
+
# remove signatures
|
|
954
|
+
|
|
955
|
+
(
|
|
956
|
+
exposureAvg[:, r],
|
|
957
|
+
L2dist,
|
|
958
|
+
cosine_sim,
|
|
959
|
+
) = ss.remove_all_single_signatures(
|
|
960
|
+
processAvg,
|
|
961
|
+
exposureAvg[:, r],
|
|
962
|
+
allgenomes[:, r],
|
|
963
|
+
metric="l2",
|
|
964
|
+
solver="nnls",
|
|
965
|
+
cutoff=initial_remove_penalty,
|
|
966
|
+
background_sigs=[],
|
|
967
|
+
verbose=False,
|
|
968
|
+
)
|
|
969
|
+
if verbose == True:
|
|
970
|
+
print(
|
|
971
|
+
"############################## Composition After Initial Remove ############################### "
|
|
972
|
+
)
|
|
973
|
+
print(pd.DataFrame(exposureAvg[:, r], index=allsigids).T)
|
|
974
|
+
print("L2%: ", L2dist)
|
|
975
|
+
lognote.write(
|
|
976
|
+
"############################## Composition After Initial Remove ###############################\n"
|
|
977
|
+
)
|
|
978
|
+
exposures = pd.DataFrame(exposureAvg[:, r], index=allsigids).T
|
|
979
|
+
lognote.write(
|
|
980
|
+
"{}\n".format(
|
|
981
|
+
exposures.iloc[:, exposures.to_numpy().nonzero()[1]]
|
|
982
|
+
)
|
|
983
|
+
)
|
|
984
|
+
lognote.write(
|
|
985
|
+
"L2 Error %: {}\nCosine Similarity: {}\n".format(
|
|
986
|
+
round(L2dist, 2), round(cosine_sim, 2)
|
|
949
987
|
)
|
|
950
|
-
|
|
988
|
+
)
|
|
989
|
+
lognote.write(
|
|
990
|
+
"\n############################## Performing Add-Remove Step ##############################\n"
|
|
991
|
+
)
|
|
992
|
+
# Close the Lognote file
|
|
993
|
+
lognote.close()
|
|
994
|
+
|
|
995
|
+
init_add_sig_idx = list(
|
|
996
|
+
set().union(
|
|
997
|
+
list(np.nonzero(exposureAvg[:, r])[0]), background_sigs
|
|
998
|
+
)
|
|
999
|
+
)
|
|
1000
|
+
# print(init_add_sig_idx)
|
|
1001
|
+
|
|
1002
|
+
# get the background_sig_idx for the add_remove function only for the decomposed solution:
|
|
1003
|
+
if background_sigs != 0: # in the decomposed solution only
|
|
1004
|
+
background_sig_idx = get_indeces(allsigids, ["SBS1", "SBS5"])
|
|
1005
|
+
|
|
1006
|
+
# if the there is no other signatures to be added on top the existing signatures
|
|
1007
|
+
try:
|
|
951
1008
|
(
|
|
1009
|
+
_,
|
|
952
1010
|
exposureAvg[:, r],
|
|
953
1011
|
L2dist,
|
|
954
|
-
|
|
955
|
-
|
|
1012
|
+
similarity,
|
|
1013
|
+
kldiv,
|
|
1014
|
+
correlation,
|
|
1015
|
+
cosine_similarity_with_four_signatures,
|
|
1016
|
+
) = ss.add_remove_signatures(
|
|
956
1017
|
processAvg,
|
|
957
|
-
exposureAvg[:, r],
|
|
958
1018
|
allgenomes[:, r],
|
|
959
1019
|
metric="l2",
|
|
960
1020
|
solver="nnls",
|
|
961
|
-
|
|
962
|
-
|
|
1021
|
+
background_sigs=init_add_sig_idx,
|
|
1022
|
+
permanent_sigs=background_sig_idx,
|
|
1023
|
+
candidate_sigs="all",
|
|
1024
|
+
allsigids=allsigids,
|
|
1025
|
+
add_penalty=add_penalty,
|
|
1026
|
+
remove_penalty=remove_penalty,
|
|
1027
|
+
check_rule_negatives=check_rule_negatives,
|
|
1028
|
+
checkrule_penalty=check_rule_penalty,
|
|
1029
|
+
connected_sigs=connected_sigs,
|
|
1030
|
+
directory=layer_directory
|
|
1031
|
+
+ "/Solution_Stats/"
|
|
1032
|
+
+ solution_prefix
|
|
1033
|
+
+ "_Signature_Assignment_log.txt",
|
|
963
1034
|
verbose=False,
|
|
964
1035
|
)
|
|
1036
|
+
|
|
965
1037
|
if verbose == True:
|
|
966
1038
|
print(
|
|
967
|
-
"
|
|
1039
|
+
"####################################### Composition After Add-Remove #######################################\n"
|
|
968
1040
|
)
|
|
969
|
-
print(
|
|
1041
|
+
print(exposureAvg[:, r])
|
|
970
1042
|
print("L2%: ", L2dist)
|
|
1043
|
+
# Recond the information in the log file
|
|
1044
|
+
lognote = open(
|
|
1045
|
+
layer_directory
|
|
1046
|
+
+ "/Solution_Stats/"
|
|
1047
|
+
+ solution_prefix
|
|
1048
|
+
+ "_Signature_Assignment_log.txt",
|
|
1049
|
+
"a",
|
|
1050
|
+
)
|
|
971
1051
|
lognote.write(
|
|
972
|
-
"
|
|
1052
|
+
"####################################### Composition After Add-Remove #######################################\n"
|
|
973
1053
|
)
|
|
974
1054
|
exposures = pd.DataFrame(exposureAvg[:, r], index=allsigids).T
|
|
975
1055
|
lognote.write(
|
|
@@ -979,88 +1059,12 @@ def make_final_solution(
|
|
|
979
1059
|
)
|
|
980
1060
|
lognote.write(
|
|
981
1061
|
"L2 Error %: {}\nCosine Similarity: {}\n".format(
|
|
982
|
-
round(L2dist, 2), round(
|
|
1062
|
+
round(L2dist, 2), round(similarity, 2)
|
|
983
1063
|
)
|
|
984
1064
|
)
|
|
985
|
-
lognote.write(
|
|
986
|
-
"\n############################## Performing Add-Remove Step ##############################\n"
|
|
987
|
-
)
|
|
988
|
-
# Close the Lognote file
|
|
989
1065
|
lognote.close()
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
set().union(
|
|
993
|
-
list(np.nonzero(exposureAvg[:, r])[0]), background_sigs
|
|
994
|
-
)
|
|
995
|
-
)
|
|
996
|
-
# print(init_add_sig_idx)
|
|
997
|
-
|
|
998
|
-
# get the background_sig_idx for the add_remove function only for the decomposed solution:
|
|
999
|
-
if background_sigs != 0: # in the decomposed solution only
|
|
1000
|
-
background_sig_idx = get_indeces(allsigids, ["SBS1", "SBS5"])
|
|
1001
|
-
|
|
1002
|
-
# if the there is no other signatures to be added on top the existing signatures
|
|
1003
|
-
try:
|
|
1004
|
-
(
|
|
1005
|
-
_,
|
|
1006
|
-
exposureAvg[:, r],
|
|
1007
|
-
L2dist,
|
|
1008
|
-
similarity,
|
|
1009
|
-
kldiv,
|
|
1010
|
-
correlation,
|
|
1011
|
-
cosine_similarity_with_four_signatures,
|
|
1012
|
-
) = ss.add_remove_signatures(
|
|
1013
|
-
processAvg,
|
|
1014
|
-
allgenomes[:, r],
|
|
1015
|
-
metric="l2",
|
|
1016
|
-
solver="nnls",
|
|
1017
|
-
background_sigs=init_add_sig_idx,
|
|
1018
|
-
permanent_sigs=background_sig_idx,
|
|
1019
|
-
candidate_sigs="all",
|
|
1020
|
-
allsigids=allsigids,
|
|
1021
|
-
add_penalty=add_penalty,
|
|
1022
|
-
remove_penalty=remove_penalty,
|
|
1023
|
-
check_rule_negatives=check_rule_negatives,
|
|
1024
|
-
checkrule_penalty=check_rule_penalty,
|
|
1025
|
-
connected_sigs=connected_sigs,
|
|
1026
|
-
directory=layer_directory
|
|
1027
|
-
+ "/Solution_Stats/"
|
|
1028
|
-
+ solution_prefix
|
|
1029
|
-
+ "_Signature_Assignment_log.txt",
|
|
1030
|
-
verbose=False,
|
|
1031
|
-
)
|
|
1032
|
-
|
|
1033
|
-
if verbose == True:
|
|
1034
|
-
print(
|
|
1035
|
-
"####################################### Composition After Add-Remove #######################################\n"
|
|
1036
|
-
)
|
|
1037
|
-
print(exposureAvg[:, r])
|
|
1038
|
-
print("L2%: ", L2dist)
|
|
1039
|
-
# Recond the information in the log file
|
|
1040
|
-
lognote = open(
|
|
1041
|
-
layer_directory
|
|
1042
|
-
+ "/Solution_Stats/"
|
|
1043
|
-
+ solution_prefix
|
|
1044
|
-
+ "_Signature_Assignment_log.txt",
|
|
1045
|
-
"a",
|
|
1046
|
-
)
|
|
1047
|
-
lognote.write(
|
|
1048
|
-
"####################################### Composition After Add-Remove #######################################\n"
|
|
1049
|
-
)
|
|
1050
|
-
exposures = pd.DataFrame(exposureAvg[:, r], index=allsigids).T
|
|
1051
|
-
lognote.write(
|
|
1052
|
-
"{}\n".format(
|
|
1053
|
-
exposures.iloc[:, exposures.to_numpy().nonzero()[1]]
|
|
1054
|
-
)
|
|
1055
|
-
)
|
|
1056
|
-
lognote.write(
|
|
1057
|
-
"L2 Error %: {}\nCosine Similarity: {}\n".format(
|
|
1058
|
-
round(L2dist, 2), round(similarity, 2)
|
|
1059
|
-
)
|
|
1060
|
-
)
|
|
1061
|
-
lognote.close()
|
|
1062
|
-
except:
|
|
1063
|
-
pass
|
|
1066
|
+
except:
|
|
1067
|
+
pass
|
|
1064
1068
|
|
|
1065
1069
|
else:
|
|
1066
1070
|
# when refilt de_novo_signatures
|
{sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/decomposition.py
RENAMED
|
@@ -963,8 +963,10 @@ def spa_analyze(
|
|
|
963
963
|
cosmic_sig_ref = processAvg.copy(deep=True)
|
|
964
964
|
cosmic_sig_ref.reset_index(inplace=True)
|
|
965
965
|
else:
|
|
966
|
+
|
|
966
967
|
try:
|
|
967
968
|
processAvg = pd.read_csv(signature_database, sep="\t", index_col=0)
|
|
969
|
+
|
|
968
970
|
except:
|
|
969
971
|
sys.exit(
|
|
970
972
|
"Something is wrong with the format of signature database, Pass a text file of signatures in the format of COSMIC sig database"
|
{sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/single_sample.py
RENAMED
|
@@ -102,6 +102,21 @@ def get_changed_background_sig_idx(exposures, background_sigs):
|
|
|
102
102
|
|
|
103
103
|
return background_sigs
|
|
104
104
|
|
|
105
|
+
def roundConserveSum(x):
|
|
106
|
+
|
|
107
|
+
# Total to be conserved
|
|
108
|
+
total = np.round(np.sum(x))
|
|
109
|
+
|
|
110
|
+
# Round to nearest integer above
|
|
111
|
+
x_out = np.ceil(x)
|
|
112
|
+
|
|
113
|
+
# Order integer residuals
|
|
114
|
+
order = np.argsort(x-x_out)
|
|
115
|
+
|
|
116
|
+
# Take one off first n residuals to correct total
|
|
117
|
+
x_out[order[:int(np.sum(x_out)-total+1e-10)]] -= 1
|
|
118
|
+
|
|
119
|
+
return x_out
|
|
105
120
|
|
|
106
121
|
# Fit signatures
|
|
107
122
|
def fit_signatures(W, genome, metric="l2"):
|
|
@@ -132,16 +147,21 @@ def fit_signatures(W, genome, metric="l2"):
|
|
|
132
147
|
newExposure = list(solution)
|
|
133
148
|
|
|
134
149
|
# get the maximum value of the new Exposure
|
|
135
|
-
maxcoef = max(newExposure)
|
|
136
|
-
idxmaxcoef = newExposure.index(maxcoef)
|
|
150
|
+
# maxcoef = max(newExposure)
|
|
151
|
+
# idxmaxcoef = newExposure.index(maxcoef)
|
|
137
152
|
|
|
138
|
-
newExposure = np.round(newExposure)
|
|
153
|
+
# newExposure = np.round(newExposure)
|
|
139
154
|
|
|
140
155
|
# We may need to tweak the maximum value of the new exposure to keep the total number of mutation equal to the original mutations in a genome
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
156
|
+
# import pdb; pdb.set_trace()
|
|
157
|
+
newExposure = roundConserveSum(newExposure)
|
|
158
|
+
# # if np.sum(newExposure) <= maxmutation:
|
|
159
|
+
# newExposure[idxmaxcoef] = (
|
|
160
|
+
# round(newExposure[idxmaxcoef]) + maxmutation - sum(newExposure)
|
|
161
|
+
# )
|
|
162
|
+
# # else:
|
|
163
|
+
# # newExposure = np.round()
|
|
164
|
+
if np.sum(newExposure)!=maxmutation: raise ValueError("Mutation count not conserved")
|
|
145
165
|
|
|
146
166
|
if metric == "cosine":
|
|
147
167
|
newSimilarity = cos_sim(genome, est_genome)
|
|
@@ -492,8 +512,9 @@ def remove_all_single_signatures(
|
|
|
492
512
|
if verbose == True:
|
|
493
513
|
print("originalSimilarity", originalSimilarity)
|
|
494
514
|
# make the original exposures of specific sample round
|
|
495
|
-
oldExposures = np.round(H)
|
|
496
|
-
|
|
515
|
+
# oldExposures = np.round(H)
|
|
516
|
+
oldExposures = roundConserveSum(H)
|
|
517
|
+
# import pdb; pdb.set_trace()
|
|
497
518
|
# set the flag for the while loop
|
|
498
519
|
if len(oldExposures[np.nonzero(oldExposures)]) > 1:
|
|
499
520
|
Flag = True
|
|
@@ -606,6 +627,8 @@ def remove_all_single_signatures(
|
|
|
606
627
|
# newExposure[idxmaxcoef] = round(newExposure[idxmaxcoef])+maxmutation-sum(newExposure)
|
|
607
628
|
|
|
608
629
|
newExposure = np.array(newExposure)
|
|
630
|
+
|
|
631
|
+
|
|
609
632
|
|
|
610
633
|
if verbose == True:
|
|
611
634
|
# print(newExposure)
|
|
@@ -667,6 +690,7 @@ def remove_all_single_signatures(
|
|
|
667
690
|
|
|
668
691
|
# print ("The final selection is {}".format(successList))
|
|
669
692
|
|
|
693
|
+
|
|
670
694
|
if len(successList[1]) == 0:
|
|
671
695
|
successList = [0.0, oldExposures, originalSimilarity]
|
|
672
696
|
|
|
@@ -696,7 +720,7 @@ def remove_all_single_signatures_pool(indices, W, exposures, totoalgenomes):
|
|
|
696
720
|
originalSimilarity = cos_sim(genomes, np.dot(W, H))
|
|
697
721
|
# make the original exposures of specific sample round
|
|
698
722
|
oldExposures = np.round(H)
|
|
699
|
-
|
|
723
|
+
oldExposures = roundConserveSum(H)
|
|
700
724
|
# set the flag for the while loop
|
|
701
725
|
if len(oldExposures[np.nonzero(oldExposures)]) > 1:
|
|
702
726
|
Flag = True
|
|
@@ -774,11 +798,13 @@ def remove_all_single_signatures_pool(indices, W, exposures, totoalgenomes):
|
|
|
774
798
|
idxmaxcoef = newExposure.index(maxcoef)
|
|
775
799
|
|
|
776
800
|
newExposure = np.round(newExposure)
|
|
801
|
+
newExposure = roundConserveSum(newExposure)
|
|
802
|
+
if np.sum(newExposure)!=maxmutation: raise ValueError("Mutation count not conserved")
|
|
777
803
|
|
|
778
|
-
if np.sum(newExposure) != maxmutation:
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
804
|
+
# if np.sum(newExposure) != maxmutation:
|
|
805
|
+
# newExposure[idxmaxcoef] = (
|
|
806
|
+
# round(newExposure[idxmaxcoef]) + maxmutation - sum(newExposure)
|
|
807
|
+
# )
|
|
782
808
|
|
|
783
809
|
newSample = np.dot(W, newExposure)
|
|
784
810
|
newSimilarity = cos_sim(genomes, newSample)
|
|
@@ -970,17 +996,19 @@ def add_remove_signatures(
|
|
|
970
996
|
break
|
|
971
997
|
|
|
972
998
|
# get the maximum value of the new Exposure
|
|
973
|
-
maxcoef = np.max(finalactivities)
|
|
974
|
-
idxmaxcoef = list(finalactivities).index(maxcoef)
|
|
999
|
+
# maxcoef = np.max(finalactivities)
|
|
1000
|
+
# idxmaxcoef = list(finalactivities).index(maxcoef)
|
|
975
1001
|
|
|
976
|
-
finalactivities = np.round(finalactivities)
|
|
1002
|
+
# finalactivities = np.round(finalactivities)
|
|
1003
|
+
finalactivities = roundConserveSum(finalactivities)
|
|
977
1004
|
|
|
978
1005
|
# We may need to tweak the maximum value of the new exposure to keep the total number of mutation equal to the original mutations in a genome
|
|
979
|
-
if np.sum(finalactivities) != maxmutation:
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
1006
|
+
# if np.sum(finalactivities) != maxmutation:
|
|
1007
|
+
# finalactivities[idxmaxcoef] = (
|
|
1008
|
+
# round(finalactivities[idxmaxcoef]) + maxmutation - np.sum(finalactivities)
|
|
1009
|
+
# )
|
|
1010
|
+
if np.sum(finalactivities)!=round(maxmutation): raise ValueError("Mutation count not conserved")
|
|
1011
|
+
|
|
984
1012
|
if verbose:
|
|
985
1013
|
print("\n########################## Final ###########################")
|
|
986
1014
|
print(background_sigs)
|
|
@@ -6,7 +6,7 @@ import os
|
|
|
6
6
|
if os.path.exists("dist"):
|
|
7
7
|
shutil.rmtree("dist")
|
|
8
8
|
|
|
9
|
-
VERSION = "0.2.
|
|
9
|
+
VERSION = "0.2.3"
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
def write_version_py(filename="SigProfilerAssignment/version.py"):
|
|
@@ -15,9 +15,8 @@ def write_version_py(filename="SigProfilerAssignment/version.py"):
|
|
|
15
15
|
# THIS FILE IS GENERATED FROM SigProfilerAssignment SETUP.PY
|
|
16
16
|
short_version = '%(version)s'
|
|
17
17
|
version = '%(version)s'
|
|
18
|
-
Update = 'v0.2.
|
|
18
|
+
Update = 'v0.2.3: Improved rounding strategy for handling low mutation counts'
|
|
19
19
|
|
|
20
|
-
|
|
21
20
|
"""
|
|
22
21
|
fh = open(filename, "w")
|
|
23
22
|
fh.write(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sigprofilerassignment-0.2.2 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/Analyzer.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|