SigProfilerAssignment 0.2.1__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.
Files changed (192) hide show
  1. {sigprofilerassignment-0.2.1/SigProfilerAssignment.egg-info → sigprofilerassignment-0.2.3}/PKG-INFO +11 -4
  2. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/README.md +7 -1
  3. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/controllers/cli_controller.py +14 -1
  4. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/decompose_subroutines.py +198 -194
  5. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/decomposition.py +27 -12
  6. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/single_sample.py +50 -22
  7. sigprofilerassignment-0.2.3/SigProfilerAssignment/version.py +7 -0
  8. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3/SigProfilerAssignment.egg-info}/PKG-INFO +11 -4
  9. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment.egg-info/SOURCES.txt +1 -0
  10. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment.egg-info/requires.txt +1 -1
  11. sigprofilerassignment-0.2.3/pyproject.toml +3 -0
  12. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/setup.py +4 -4
  13. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/tests/test_cli.py +3 -0
  14. sigprofilerassignment-0.2.1/SigProfilerAssignment/version.py +0 -8
  15. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/LICENSE.txt +0 -0
  16. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/MANIFEST.in +0 -0
  17. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/Analyzer.py +0 -0
  18. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/DecompositionPlots/PlotDecomposition.py +0 -0
  19. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/DecompositionPlots/PlotDecomposition_CNV48.py +0 -0
  20. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/DecompositionPlots/PlotDecomposition_DBS78.py +0 -0
  21. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/DecompositionPlots/PlotDecomposition_ID83.py +0 -0
  22. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/DecompositionPlots/PlotDecomposition_SBS1536.py +0 -0
  23. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/DecompositionPlots/PlotDecomposition_SBS288.py +0 -0
  24. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/DecompositionPlots/PlotDecomposition_SBS96.py +0 -0
  25. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/DecompositionPlots/PlotDecomposition_SV32.py +0 -0
  26. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/DecompositionPlots/ReferenceFiles/Accolade_fermante.png +0 -0
  27. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/DecompositionPlots/ReferenceFiles/CREDIT.md +0 -0
  28. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/DecompositionPlots/ReferenceFiles/Fonts/Arial Bold.ttf +0 -0
  29. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/DecompositionPlots/SigProfilerPlottingMatrix.py +0 -0
  30. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/SigProfilerAssignment_CLI.py +0 -0
  31. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/__init__.py +0 -0
  32. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/21_breast_WGS_substitutions.mat +0 -0
  33. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/CNV_features.tsv +0 -0
  34. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/CNV_signatures.txt +0 -0
  35. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/CN_classes_dictionary.txt +0 -0
  36. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/DBS_signatures_genome_builds.xlsx +0 -0
  37. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v1_SBS_GRCh37.txt +0 -0
  38. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v1_SBS_GRCh37_exome.txt +0 -0
  39. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v2_SBS_GRCh37.txt +0 -0
  40. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v2_SBS_GRCh37_exome.txt +0 -0
  41. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v3.1_DBS_GRCh37.txt +0 -0
  42. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v3.1_DBS_GRCh37_exome.txt +0 -0
  43. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v3.1_ID_GRCh37.txt +0 -0
  44. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v3.1_SBS_GRCh37.txt +0 -0
  45. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v3.1_SBS_GRCh37_exome.txt +0 -0
  46. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v3.2_DBS_GRCh37.txt +0 -0
  47. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v3.2_DBS_GRCh37_exome.txt +0 -0
  48. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v3.2_ID_GRCh37.txt +0 -0
  49. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v3.2_SBS288_GRCh37.txt +0 -0
  50. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v3.2_SBS_GRCh37.txt +0 -0
  51. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v3.2_SBS_GRCh37_exome.txt +0 -0
  52. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v3.3_CN_GRCh37.txt +0 -0
  53. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v3.3_DBS_GRCh37.txt +0 -0
  54. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v3.3_DBS_GRCh37_exome.txt +0 -0
  55. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v3.3_ID_GRCh37.txt +0 -0
  56. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v3.3_SBS_GRCh37.txt +0 -0
  57. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v3.3_SBS_GRCh37_exome.txt +0 -0
  58. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v3.4_CN_GRCh37.txt +0 -0
  59. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v3.4_DBS_GRCh37.txt +0 -0
  60. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v3.4_DBS_GRCh37_exome.txt +0 -0
  61. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v3.4_ID_GRCh37.txt +0 -0
  62. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v3.4_SBS_GRCh37.txt +0 -0
  63. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v3.4_SBS_GRCh37_exome.txt +0 -0
  64. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v3_DBS_GRCh37.txt +0 -0
  65. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v3_DBS_GRCh37_exome.txt +0 -0
  66. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v3_ID_GRCh37.txt +0 -0
  67. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v3_SBS_GRCh37.txt +0 -0
  68. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh37/COSMIC_v3_SBS_GRCh37_exome.txt +0 -0
  69. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh38/COSMIC_v1_SBS_GRCh38.txt +0 -0
  70. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh38/COSMIC_v1_SBS_GRCh38_exome.txt +0 -0
  71. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh38/COSMIC_v2_SBS_GRCh38.txt +0 -0
  72. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh38/COSMIC_v2_SBS_GRCh38_exome.txt +0 -0
  73. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh38/COSMIC_v3.1_DBS_GRCh38.txt +0 -0
  74. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh38/COSMIC_v3.1_DBS_GRCh38_exome.txt +0 -0
  75. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh38/COSMIC_v3.1_SBS_GRCh38.txt +0 -0
  76. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh38/COSMIC_v3.1_SBS_GRCh38_exome.txt +0 -0
  77. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh38/COSMIC_v3.2_DBS_GRCh38.txt +0 -0
  78. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh38/COSMIC_v3.2_DBS_GRCh38_exome.txt +0 -0
  79. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh38/COSMIC_v3.2_SBS_GRCh38.txt +0 -0
  80. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh38/COSMIC_v3.2_SBS_GRCh38_exome.txt +0 -0
  81. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh38/COSMIC_v3.3_DBS_GRCh38.txt +0 -0
  82. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh38/COSMIC_v3.3_DBS_GRCh38_exome.txt +0 -0
  83. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh38/COSMIC_v3.3_SBS_GRCh38.txt +0 -0
  84. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh38/COSMIC_v3.3_SBS_GRCh38_exome.txt +0 -0
  85. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh38/COSMIC_v3.4_DBS_GRCh38.txt +0 -0
  86. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh38/COSMIC_v3.4_DBS_GRCh38_exome.txt +0 -0
  87. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh38/COSMIC_v3.4_SBS_GRCh38.txt +0 -0
  88. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh38/COSMIC_v3.4_SBS_GRCh38_exome.txt +0 -0
  89. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh38/COSMIC_v3.4_SV_GRCh38.txt +0 -0
  90. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh38/COSMIC_v3_DBS_GRCh38.txt +0 -0
  91. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh38/COSMIC_v3_DBS_GRCh38_exome.txt +0 -0
  92. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh38/COSMIC_v3_SBS_GRCh38.txt +0 -0
  93. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/GRCh38/COSMIC_v3_SBS_GRCh38_exome.txt +0 -0
  94. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm10/COSMIC_v1_SBS_mm10.txt +0 -0
  95. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm10/COSMIC_v1_SBS_mm10_exome.txt +0 -0
  96. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm10/COSMIC_v2_SBS_mm10.txt +0 -0
  97. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm10/COSMIC_v2_SBS_mm10_exome.txt +0 -0
  98. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm10/COSMIC_v3.1_DBS_mm10.txt +0 -0
  99. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm10/COSMIC_v3.1_DBS_mm10_exome.txt +0 -0
  100. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm10/COSMIC_v3.1_SBS_mm10.txt +0 -0
  101. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm10/COSMIC_v3.1_SBS_mm10_exome.txt +0 -0
  102. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm10/COSMIC_v3.2_DBS_mm10.txt +0 -0
  103. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm10/COSMIC_v3.2_DBS_mm10_exome.txt +0 -0
  104. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm10/COSMIC_v3.2_SBS_mm10.txt +0 -0
  105. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm10/COSMIC_v3.2_SBS_mm10_exome.txt +0 -0
  106. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm10/COSMIC_v3.3_DBS_mm10.txt +0 -0
  107. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm10/COSMIC_v3.3_DBS_mm10_exome.txt +0 -0
  108. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm10/COSMIC_v3.3_SBS_mm10.txt +0 -0
  109. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm10/COSMIC_v3.3_SBS_mm10_exome.txt +0 -0
  110. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm10/COSMIC_v3.4_DBS_mm10.txt +0 -0
  111. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm10/COSMIC_v3.4_DBS_mm10_exome.txt +0 -0
  112. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm10/COSMIC_v3.4_SBS_mm10.txt +0 -0
  113. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm10/COSMIC_v3.4_SBS_mm10_exome.txt +0 -0
  114. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm10/COSMIC_v3_DBS_mm10.txt +0 -0
  115. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm10/COSMIC_v3_DBS_mm10_exome.txt +0 -0
  116. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm10/COSMIC_v3_SBS_mm10.txt +0 -0
  117. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm10/COSMIC_v3_SBS_mm10_exome.txt +0 -0
  118. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm9/COSMIC_v1_SBS_mm9.txt +0 -0
  119. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm9/COSMIC_v1_SBS_mm9_exome.txt +0 -0
  120. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm9/COSMIC_v2_SBS_mm9.txt +0 -0
  121. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm9/COSMIC_v2_SBS_mm9_exome.txt +0 -0
  122. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm9/COSMIC_v3.1_DBS_mm9.txt +0 -0
  123. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm9/COSMIC_v3.1_DBS_mm9_exome.txt +0 -0
  124. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm9/COSMIC_v3.1_SBS_mm9.txt +0 -0
  125. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm9/COSMIC_v3.1_SBS_mm9_exome.txt +0 -0
  126. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm9/COSMIC_v3.2_DBS_mm9.txt +0 -0
  127. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm9/COSMIC_v3.2_DBS_mm9_exome.txt +0 -0
  128. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm9/COSMIC_v3.2_SBS_mm9.txt +0 -0
  129. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm9/COSMIC_v3.2_SBS_mm9_exome.txt +0 -0
  130. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm9/COSMIC_v3.3_DBS_mm9.txt +0 -0
  131. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm9/COSMIC_v3.3_DBS_mm9_exome.txt +0 -0
  132. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm9/COSMIC_v3.3_SBS_mm9.txt +0 -0
  133. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm9/COSMIC_v3.3_SBS_mm9_exome.txt +0 -0
  134. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm9/COSMIC_v3.4_DBS_mm9.txt +0 -0
  135. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm9/COSMIC_v3.4_DBS_mm9_exome.txt +0 -0
  136. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm9/COSMIC_v3.4_SBS_mm9.txt +0 -0
  137. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm9/COSMIC_v3.4_SBS_mm9_exome.txt +0 -0
  138. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm9/COSMIC_v3_DBS_mm9.txt +0 -0
  139. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm9/COSMIC_v3_DBS_mm9_exome.txt +0 -0
  140. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm9/COSMIC_v3_SBS_mm9.txt +0 -0
  141. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/mm9/COSMIC_v3_SBS_mm9_exome.txt +0 -0
  142. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/rn6/COSMIC_v1_SBS_rn6.txt +0 -0
  143. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/rn6/COSMIC_v1_SBS_rn6_exome.txt +0 -0
  144. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/rn6/COSMIC_v2_SBS_rn6.txt +0 -0
  145. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/rn6/COSMIC_v2_SBS_rn6_exome.txt +0 -0
  146. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/rn6/COSMIC_v3.1_DBS_rn6.txt +0 -0
  147. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/rn6/COSMIC_v3.1_DBS_rn6_exome.txt +0 -0
  148. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/rn6/COSMIC_v3.1_SBS_rn6.txt +0 -0
  149. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/rn6/COSMIC_v3.1_SBS_rn6_exome.txt +0 -0
  150. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/rn6/COSMIC_v3.2_DBS_rn6.txt +0 -0
  151. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/rn6/COSMIC_v3.2_DBS_rn6_exome.txt +0 -0
  152. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/rn6/COSMIC_v3.2_SBS_rn6.txt +0 -0
  153. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/rn6/COSMIC_v3.2_SBS_rn6_exome.txt +0 -0
  154. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/rn6/COSMIC_v3.3_DBS_rn6.txt +0 -0
  155. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/rn6/COSMIC_v3.3_DBS_rn6_exome.txt +0 -0
  156. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/rn6/COSMIC_v3.3_SBS_rn6.txt +0 -0
  157. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/rn6/COSMIC_v3.3_SBS_rn6_exome.txt +0 -0
  158. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/rn6/COSMIC_v3.4_DBS_rn6.txt +0 -0
  159. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/rn6/COSMIC_v3.4_DBS_rn6_exome.txt +0 -0
  160. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/rn6/COSMIC_v3.4_SBS_rn6.txt +0 -0
  161. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/rn6/COSMIC_v3.4_SBS_rn6_exome.txt +0 -0
  162. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/rn6/COSMIC_v3_DBS_rn6.txt +0 -0
  163. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/rn6/COSMIC_v3_DBS_rn6_exome.txt +0 -0
  164. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/rn6/COSMIC_v3_SBS_rn6.txt +0 -0
  165. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Reference_Signatures/rn6/COSMIC_v3_SBS_rn6_exome.txt +0 -0
  166. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/SBS_signatures_genome_builds.xlsx +0 -0
  167. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/Samples.txt +0 -0
  168. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/csvexample.csv +0 -0
  169. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/sigProfiler_DBS_signatures.csv +0 -0
  170. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/sigProfiler_ID_signatures.csv +0 -0
  171. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/sigProfiler_SBS_signatures_2018_03_28.csv +0 -0
  172. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/tests/cnv_input/all.breast.ascat.summary.sample.tsv +0 -0
  173. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/tests/txt_input/CNV48_S3_Signatures.txt +0 -0
  174. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/tests/txt_input/DBS78_S3_Signatures.txt +0 -0
  175. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/tests/txt_input/ID83_S3_Signatures.txt +0 -0
  176. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/tests/txt_input/SBS96_S3_Signatures.txt +0 -0
  177. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/tests/txt_input/SV32_S3_Signatures.txt +0 -0
  178. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/tests/txt_input/sample_matrix_CNV48.txt +0 -0
  179. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/tests/txt_input/sample_matrix_DBS.txt +0 -0
  180. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/tests/txt_input/sample_matrix_ID.txt +0 -0
  181. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/tests/txt_input/sample_matrix_SBS.txt +0 -0
  182. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/tests/txt_input/sample_matrix_SV32.txt +0 -0
  183. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/tests/vcf_input/PD3851a.vcf +0 -0
  184. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/tests/vcf_input/PD3890a.vcf +0 -0
  185. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/tests/vcf_input/PD3904a.vcf +0 -0
  186. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/tests/vcf_input/PD3945a.vcf +0 -0
  187. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment/data/tests/vcf_input/PD4005a.vcf +0 -0
  188. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment.egg-info/dependency_links.txt +0 -0
  189. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment.egg-info/entry_points.txt +0 -0
  190. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment.egg-info/not-zip-safe +0 -0
  191. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/SigProfilerAssignment.egg-info/top_level.txt +0 -0
  192. {sigprofilerassignment-0.2.1 → sigprofilerassignment-0.2.3}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: SigProfilerAssignment
3
- Version: 0.2.1
3
+ Version: 0.2.3
4
4
  Summary: Mutational signatures attribution and decomposition tool
5
5
  Home-page: https://github.com/AlexandrovLab/SigProfilerAssignment.git
6
6
  Author: Raviteja Vangara
@@ -17,7 +17,7 @@ Requires-Dist: sigProfilerPlotting>=1.4.0
17
17
  Requires-Dist: reportlab>=3.5.42
18
18
  Requires-Dist: pypdf>=5.0.0
19
19
  Requires-Dist: alive_progress>=2.4.1
20
- Requires-Dist: PyMuPDF>=1.21.0
20
+ Requires-Dist: pdf2image>=1.16.0
21
21
  Provides-Extra: tests
22
22
  Requires-Dist: pytest; extra == "tests"
23
23
  Dynamic: author
@@ -26,6 +26,7 @@ Dynamic: description
26
26
  Dynamic: description-content-type
27
27
  Dynamic: home-page
28
28
  Dynamic: license
29
+ Dynamic: license-file
29
30
  Dynamic: provides-extra
30
31
  Dynamic: requires-dist
31
32
  Dynamic: requires-python
@@ -67,6 +68,12 @@ $ python
67
68
  from SigProfilerMatrixGenerator import install as genInstall
68
69
  genInstall.install('GRCh37')
69
70
  ```
71
+
72
+ If you plan to use `sample_reconstruction_plots='png'` or `'both'`, the external `poppler` binary is required. You can install it using one of the following commands:
73
+
74
+ - For Conda-based environments:
75
+ `conda install -c conda-forge poppler`
76
+
70
77
  ## <a name="running"></a> Running
71
78
 
72
79
  Assignment of known mutational signatures to individual samples is performed using the `cosmic_fit` function. Input samples are provided using the `samples` parameter in the form of mutation calling files (VCFs, MAFs, or simple text files), segmentation files or mutational matrices. COSMIC mutational signatures v3.4 are used as the default reference signatures, although previous COSMIC versions and custom signature databases are also supported using the `cosmic_version` and `signature_database` parameters. Results will be found in the folder specified in the `output` parameter.
@@ -99,7 +106,7 @@ Analyze.cosmic_fit(samples, output, input_type="matrix", context_type="96",
99
106
  | export_probabilities | Boolean | Defines if the probability matrix per mutational context for all samples is created. The default value is True. |
100
107
  | export_probabilities_per_mutation | Boolean | Defines if the probability matrices per mutation for all samples are created. Only available when `input_type` is "vcf". The default value is False. |
101
108
  | make_plots | Boolean | Toggle on and off for making and saving plots. The default value is True. |
102
- | sample_reconstruction_plots | String | Select the output format for sample reconstruction plots. Valid inputs are {'pdf', 'png', 'both', None}. The default value is None. |
109
+ | sample_reconstruction_plots | String | Select the output format for sample reconstruction plots. Valid inputs are {'pdf', 'png', 'both', 'none'}. The default value is 'none'. If set to 'png' or 'both', the external binary `poppler` must be installed. Install via `conda install -c conda-forge poppler` or `brew install poppler` on macOS. |
103
110
  | verbose | Boolean | Prints detailed statements. The default value is False. |
104
111
  | volume | String | Path to SigProfilerAssignment volumes. Used for Docker/Singularity. Environmental variable "SIGPROFILERASSIGNMENT_VOLUME" takes precedence. Default value is None. |
105
112
 
@@ -34,6 +34,12 @@ $ python
34
34
  from SigProfilerMatrixGenerator import install as genInstall
35
35
  genInstall.install('GRCh37')
36
36
  ```
37
+
38
+ If you plan to use `sample_reconstruction_plots='png'` or `'both'`, the external `poppler` binary is required. You can install it using one of the following commands:
39
+
40
+ - For Conda-based environments:
41
+ `conda install -c conda-forge poppler`
42
+
37
43
  ## <a name="running"></a> Running
38
44
 
39
45
  Assignment of known mutational signatures to individual samples is performed using the `cosmic_fit` function. Input samples are provided using the `samples` parameter in the form of mutation calling files (VCFs, MAFs, or simple text files), segmentation files or mutational matrices. COSMIC mutational signatures v3.4 are used as the default reference signatures, although previous COSMIC versions and custom signature databases are also supported using the `cosmic_version` and `signature_database` parameters. Results will be found in the folder specified in the `output` parameter.
@@ -66,7 +72,7 @@ Analyze.cosmic_fit(samples, output, input_type="matrix", context_type="96",
66
72
  | export_probabilities | Boolean | Defines if the probability matrix per mutational context for all samples is created. The default value is True. |
67
73
  | export_probabilities_per_mutation | Boolean | Defines if the probability matrices per mutation for all samples are created. Only available when `input_type` is "vcf". The default value is False. |
68
74
  | make_plots | Boolean | Toggle on and off for making and saving plots. The default value is True. |
69
- | sample_reconstruction_plots | String | Select the output format for sample reconstruction plots. Valid inputs are {'pdf', 'png', 'both', None}. The default value is None. |
75
+ | sample_reconstruction_plots | String | Select the output format for sample reconstruction plots. Valid inputs are {'pdf', 'png', 'both', 'none'}. The default value is 'none'. If set to 'png' or 'both', the external binary `poppler` must be installed. Install via `conda install -c conda-forge poppler` or `brew install poppler` on macOS. |
70
76
  | verbose | Boolean | Prints detailed statements. The default value is False. |
71
77
  | volume | String | Path to SigProfilerAssignment volumes. Used for Docker/Singularity. Environmental variable "SIGPROFILERASSIGNMENT_VOLUME" takes precedence. Default value is None. |
72
78
 
@@ -135,6 +135,19 @@ def parse_arguments_common(args: List[str], description: str) -> argparse.Namesp
135
135
  default=None,
136
136
  help="User specified directory for saving/loading template files. Note: The environment variable SIGPROFILERASSIGNMENT_VOLUME takes precedence over this parameter.",
137
137
  )
138
+ parser.add_argument(
139
+ "--sample_reconstruction_plots",
140
+ type=str.lower,
141
+ choices=["none", "pdf", "both", "png"],
142
+ default="none",
143
+ help=(
144
+ "Output format for sample reconstruction plots. "
145
+ "Options: 'none' (default, disables plotting), "
146
+ "'pdf' (generate only PDF), "
147
+ "'both' (PDF + PNG), or "
148
+ "'png' (PNG only, PDF removed)."
149
+ )
150
+ )
138
151
 
139
152
  return parser.parse_args(args)
140
153
 
@@ -226,5 +239,5 @@ class CliController:
226
239
  context_type=parsed_args.context_type,
227
240
  export_probabilities=parsed_args.export_probabilities,
228
241
  export_probabilities_per_mutation=parsed_args.export_probabilities_per_mutation,
229
- sample_reconstruction_plots=False,
242
+ sample_reconstruction_plots=parsed_args.sample_reconstruction_plots,
230
243
  )
@@ -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
- for r in range(allgenomes.shape[1]):
830
- # print("Analyzing Sample => " , str(r+1))
831
- bar()
832
- if verbose == True:
833
- print(
834
- "\n\n\n\n\n ################ Sample "
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
- + " #################\n"
837
+ + " #################"
851
838
  )
852
839
 
853
- sample_exposure = np.array(denovo_exposureAvg.iloc[:, r])
854
-
855
- init_sig_idx = np.nonzero(sample_exposure)[0]
856
- init_sigs = denovo_exposureAvg.index[init_sig_idx]
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
- init_decomposed_sigs = []
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
- # print(init_decomposed_sigs)
865
- init_decomposed_sigs_idx = get_indeces(allsigids, init_decomposed_sigs)
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
- # get the indices of the background sigs in the initial signatures
873
- background_sig_idx = get_indeces(
874
- init_decomposed_sigs_idx, background_sigs
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
- fit_signatures = processAvg[:, init_decomposed_sigs_idx]
878
- # fit signatures
879
- newExposure, newSimilarity = ss.fit_signatures(
880
- fit_signatures, allgenomes[:, r]
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
- # create the exposureAvg vector
884
- # print(init_decomposed_sigs_idx)
885
- # print(newExposure)
886
- for nonzero_idx, nozero_exp in zip(
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
- if pcawg_rule == True:
892
- maxmutation = np.sum(allgenomes[:, r])
893
- (
894
- exposureAvg[:, r],
895
- remove_distance,
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
- else:
922
- if verbose == True:
923
- print(
924
- "############################# Initial Composition #################################### "
925
- )
926
- print(pd.DataFrame(exposureAvg[:, r], index=allsigids).T)
927
- print("L2%: ", newSimilarity)
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
- lognote.write(
930
- "############################# Initial Composition ####################################\n"
924
+ else:
925
+ if verbose == True:
926
+ print(
927
+ "############################# Initial Composition #################################### "
931
928
  )
932
- exposures = pd.DataFrame(exposureAvg[:, r], index=allsigids).T
933
- lognote.write(
934
- "{}\n".format(
935
- exposures.iloc[:, exposures.to_numpy().nonzero()[1]]
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
- lognote.write(
939
- "L2 Error %: {}\nCosine Similarity: {}\n".format(
940
- round(newSimilarity, 2),
941
- round(
942
- cos_sim(
943
- allgenomes[:, r],
944
- np.dot(processAvg, exposureAvg[:, r]),
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
- # remove signatures
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
- cosine_sim,
955
- ) = ss.remove_all_single_signatures(
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
- cutoff=initial_remove_penalty,
962
- background_sigs=[],
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
- "############################## Composition After Initial Remove ############################### "
1039
+ "####################################### Composition After Add-Remove #######################################\n"
968
1040
  )
969
- print(pd.DataFrame(exposureAvg[:, r], index=allsigids).T)
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
- "############################## Composition After Initial Remove ###############################\n"
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(cosine_sim, 2)
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
- init_add_sig_idx = list(
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
@@ -25,7 +25,7 @@ from sigProfilerPlotting import sigProfilerPlotting as sigPlot
25
25
  import sigProfilerPlotting
26
26
  import os, sys
27
27
  from pypdf import PdfWriter, PdfReader
28
- import fitz
28
+ from pdf2image import convert_from_path
29
29
  import time
30
30
  from pathlib import Path
31
31
 
@@ -60,21 +60,32 @@ def get_storage_dir(volume=None):
60
60
 
61
61
 
62
62
  def convert_PDF_to_PNG(input_file_name, output_directory, page_names):
63
- pdf_doc = fitz.open(input_file_name)
64
- zoom = 3
65
- magnify = fitz.Matrix(zoom, zoom)
63
+ """
64
+ Converts each page of the PDF to a PNG image with names from page_names.
65
+ Requires the 'pdf2image' Python package and the 'poppler' binary.
66
+
67
+ Parameters:
68
+ - input_file_name (str): Path to the input PDF file.
69
+ - output_directory (str): Directory where PNGs will be saved.
70
+ - page_names (List[str]): List of names (without extensions) to name PNGs.
71
+ """
72
+ if not os.path.exists(output_directory):
73
+ os.makedirs(output_directory)
74
+
75
+ # Convert PDF pages to PIL images
76
+ try:
77
+ images = convert_from_path(input_file_name, dpi=300)
78
+ except Exception as e:
79
+ raise RuntimeError(f"Error converting PDF to images: {e}")
66
80
 
67
- if pdf_doc.page_count != len(page_names):
81
+ if len(images) != len(page_names):
68
82
  raise ValueError(
69
83
  "Error: The number of samples and number of plots do not match."
70
84
  )
71
- if not os.path.exists(output_directory):
72
- os.makedirs(output_directory)
73
85
 
74
- for sample_name, page in zip(page_names, pdf_doc):
75
- pix = page.get_pixmap(matrix=magnify)
76
- out_file_name = os.path.join(output_directory, sample_name + ".png")
77
- pix.save(out_file_name)
86
+ for image, sample_name in zip(images, page_names):
87
+ output_path = os.path.join(output_directory, sample_name + ".png")
88
+ image.save(output_path, "PNG")
78
89
 
79
90
 
80
91
  # Create sample reconstruction plots
@@ -263,6 +274,7 @@ def spa_analyze(
263
274
  genome_build = A string. The reference genome build. List of supported genomes: "GRCh37", "GRCh38", "mm9", "mm10" and "rn6". The default value is "GRCh37". If the selected genome is not in the supported list, the default genome will be used.
264
275
  verbose = Boolean. Prints statements. Default value is False.
265
276
  exome = Boolean. Defines if the exome renormalized signatures will be used. The default value is False.
277
+ sample_reconstruction_plots (str): Select output format for sample reconstruction plots. Valid options are {'pdf', 'png', 'both', 'none'}. Default is 'none'.
266
278
 
267
279
  Values:
268
280
  The files below will be generated in the output folder.
@@ -951,8 +963,10 @@ def spa_analyze(
951
963
  cosmic_sig_ref = processAvg.copy(deep=True)
952
964
  cosmic_sig_ref.reset_index(inplace=True)
953
965
  else:
966
+
954
967
  try:
955
968
  processAvg = pd.read_csv(signature_database, sep="\t", index_col=0)
969
+
956
970
  except:
957
971
  sys.exit(
958
972
  "Something is wrong with the format of signature database, Pass a text file of signatures in the format of COSMIC sig database"
@@ -1061,7 +1075,8 @@ def spa_analyze(
1061
1075
  recon_output_types = ["png", "pdf", "both"]
1062
1076
  # Generate sample reconstruction plots
1063
1077
  if (
1064
- sample_reconstruction_plots in recon_output_types
1078
+ isinstance(sample_reconstruction_plots, str)
1079
+ and sample_reconstruction_plots.lower() in recon_output_types
1065
1080
  and mutation_type == "96"
1066
1081
  and signature_database is None
1067
1082
  ):