@@ -229,7 +229,6 @@ def signature_plotting_text(value, text, Type):
229229 name_list = []
230230 total = np .sum (np .array (value ))
231231 for i in value :
232-
233232 if Type == "integer" :
234233 i = int (i )
235234 p = round (i / total * 100 , 1 )
@@ -243,7 +242,6 @@ def signature_plotting_text(value, text, Type):
243242
244243
245244def make_letter_ids (idlenth = 10 , mtype = "SBS96" ):
246-
247245 listOfSignatures = []
248246 letters = list (string .ascii_uppercase )
249247 letters .extend ([i + b for i in letters for b in letters ])
@@ -422,7 +420,6 @@ def signature_decomposition(
422420 merger = PdfMerger ()
423421
424422 for i , j in zip (range (signatures .shape [1 ]), denovo_signature_names ):
425-
426423 # Only for context SBS96
427424 if signatures .shape [0 ] == 96 :
428425 lognote = open (
@@ -566,16 +563,16 @@ def signature_decomposition(
566563
567564 if mtype == "1536" :
568565 mtype_par = "1536"
569- # elif mtype == "288":
570- # mtype_par = "288"
571- # elif mtype == "96":
572- # mtype_par = "96"
573- # elif mtype == "DINUC" or mtype == "78":
574- # mtype_par = "78"
575- # elif mtype == "INDEL" or mtype == "83":
576- # mtype_par = "83"
577- # elif mtype == "CNV" or mtype == "48":
578- # mtype_par = "48"
566+ elif mtype == "288" :
567+ mtype_par = "288"
568+ elif mtype == "96" :
569+ mtype_par = "96"
570+ elif mtype == "DINUC" or mtype == "78" :
571+ mtype_par = "78"
572+ elif mtype == "INDEL" or mtype == "83" :
573+ mtype_par = "83"
574+ elif mtype == "CNV" or mtype == "48" :
575+ mtype_par = "48"
579576 elif mtype == "SV" or mtype == "32" :
580577 mtype_par = "32"
581578 else :
@@ -586,7 +583,6 @@ def signature_decomposition(
586583 and make_decomposition_plots == True
587584 and signature_database is None
588585 ):
589-
590586 # reformat the first column of cosmic signature dataframe
591587 cosmic_sigs_DF = sigDatabases_DF .copy (deep = True )
592588 cosmic_sigs_DF .columns = ["MutationType" ] + cosmic_sigs_DF .columns [
@@ -765,7 +761,6 @@ def make_final_solution(
765761 denovo_refit_option = True ,
766762 exome = False ,
767763):
768-
769764 if processAvg .shape [0 ] == allgenomes .shape [0 ] and processAvg .shape [0 ] != 96 :
770765 collapse_to_SBS96 = False
771766
@@ -862,7 +857,6 @@ def make_final_solution(
862857
863858 init_decomposed_sigs = []
864859 for de_novo_sig in init_sigs :
865-
866860 init_decomposed_sigs = union (
867861 init_decomposed_sigs , list (attribution [de_novo_sig ])
868862 )
@@ -1459,7 +1453,6 @@ def make_final_solution(
14591453 custom_signatures_plot (processes , layer_directory + "/Signatures" )
14601454
14611455 if export_probabilities == True :
1462-
14631456 probability = probabilities (
14641457 processAvg , exposureAvg , index , allsigids , allcolnames
14651458 )
@@ -1645,7 +1638,6 @@ def cor_sim(a, b):
16451638
16461639################################################### Generation of probabilities for each processes given to A mutation type ############################################
16471640def probabilities (W , H , index , allsigids , allcolnames ):
1648-
16491641 # setting up the indices
16501642 rows = index
16511643 cols = allcolnames
@@ -1658,7 +1650,6 @@ def probabilities(W, H, index, allsigids, allcolnames):
16581650
16591651 result = 0
16601652 for i in range (H .shape [1 ]): # here H.shape is the number of sample
1661-
16621653 M = genomes [:, i ][np .newaxis ]
16631654 probs = W * H [:, i ] / M .T
16641655 probs = pd .DataFrame (probs )
0 commit comments