@@ -167,7 +167,12 @@ def spa_analyze(samples, output, input_type='matrix', context_type="96", signatu
167167 os .makedirs (output )
168168 except :
169169 print ("The {} folder could not be created" .format ("output" ))
170-
170+
171+ # Add sequence parameter to control the tmbplot y-axis scale
172+ if exome == True :
173+ sequence = 'exome'
174+ else :
175+ sequence = 'genome'
171176
172177 #################
173178 # Denovo refiting #
@@ -251,7 +256,7 @@ def spa_analyze(samples, output, input_type='matrix', context_type="96", signatu
251256
252257 if devopts == None :
253258 exposureAvg = sub .make_final_solution (processAvg , genomes , allsigids , layer_directory1 , mutation_type , index , colnames ,
254- cosmic_sigs = True , attribution = attribution , denovo_exposureAvg = exposureAvg_dummy ,
259+ cosmic_sigs = True , attribution = attribution , denovo_exposureAvg = exposureAvg_dummy , sequence = sequence ,
255260 background_sigs = background_sigs , verbose = verbose , genome_build = genome_build ,
256261 add_penalty = nnls_add_penalty , remove_penalty = nnls_remove_penalty ,
257262 initial_remove_penalty = init_rem_denovo ,connected_sigs = connected_sigs ,refit_denovo_signatures = False ,
@@ -263,10 +268,9 @@ def spa_analyze(samples, output, input_type='matrix', context_type="96", signatu
263268 signature_stats = devopts ['signature_stats' ]
264269 sequence = devopts ['sequence' ]
265270 processSTE = devopts ['processSTE' ]
266- sequence = devopts ['sequence' ]
267271
268272 exposureAvg = sub .make_final_solution (processAvg , genomes , allsigids , layer_directory1 , mutation_type , index , colnames ,
269- cosmic_sigs = True , attribution = attribution , denovo_exposureAvg = exposureAvg_dummy , sequence = sequence ,
273+ cosmic_sigs = True , attribution = attribution , denovo_exposureAvg = exposureAvg_dummy , sequence = sequence ,
270274 background_sigs = background_sigs , verbose = verbose , genome_build = genome_build , signature_total_mutations = signature_total_mutations ,
271275 add_penalty = nnls_add_penalty , remove_penalty = nnls_remove_penalty , process_std_error = processSTE , signature_stabilities = signature_stabilities ,
272276 initial_remove_penalty = init_rem_denovo ,connected_sigs = connected_sigs ,refit_denovo_signatures = True ,export_probabilities = export_probabilities )
@@ -360,7 +364,7 @@ def spa_analyze(samples, output, input_type='matrix', context_type="96", signatu
360364
361365 print ("\n Assigning decomposed signature" )
362366 result = sub .make_final_solution (processAvg , genomes , allsigids , layer_directory2 , mutation_type , index , colnames ,
363- cosmic_sigs = True , attribution = attribution , denovo_exposureAvg = exposureAvg ,
367+ cosmic_sigs = True , attribution = attribution , denovo_exposureAvg = exposureAvg , sequence = sequence ,
364368 background_sigs = background_sigs , verbose = verbose , genome_build = genome_build ,
365369 add_penalty = nnls_add_penalty , remove_penalty = nnls_remove_penalty ,
366370 initial_remove_penalty = initial_remove_penalty ,connected_sigs = connected_sigs ,
@@ -473,7 +477,7 @@ def spa_analyze(samples, output, input_type='matrix', context_type="96", signatu
473477
474478
475479 sub .make_final_solution (processAvg , genomes , allsigids , layer_directory3 , mutation_type , index , colnames ,
476- cosmic_sigs = True , attribution = attribution , denovo_exposureAvg = exposureAvg_dummy ,
480+ cosmic_sigs = True , attribution = attribution , denovo_exposureAvg = exposureAvg_dummy , sequence = sequence ,
477481 background_sigs = background_sigs , verbose = verbose , genome_build = genome_build ,
478482 add_penalty = nnls_add_penalty , remove_penalty = nnls_remove_penalty ,
479483 initial_remove_penalty = initial_remove_penalty ,connected_sigs = connected_sigs ,
0 commit comments