You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to use the following command to decompose_fit to decompose SV signatures that were extracted from SigprofilerExtractor to a given SV reference database
Decomposing De Novo Signatures .....
Traceback (most recent call last):
File "", line 1, in
File "/Users/avraam/Downloads/SigProfilerAssignment-main/SigProfilerAssignment/Analyzer.py", line 5, in decompose_fit
decomp.spa_analyze(samples=samples, output=output, signatures=signatures, signature_database=signature_database,nnls_add_penalty=nnls_add_penalty, nnls_remove_penalty=nnls_remove_penalty, initial_remove_penalty=initial_remove_penalty,genome_build=genome_build, cosmic_version=cosmic_version, make_plots=make_plots, collapse_to_SBS96=collapse_to_SBS96,connected_sigs=connected_sigs, verbose=verbose,decompose_fit_option= True,denovo_refit_option=False,cosmic_fit_option=False,devopts=devopts,new_signature_thresh_hold=new_signature_thresh_hold,exclude_signature_subgroups=exclude_signature_subgroups,exome=exome,input_type=input_type,context_type=context_type,export_probabilities=export_probabilities)
File "/Users/avraam/Downloads/SigProfilerAssignment-main/SigProfilerAssignment/decomposition.py", line 354, in spa_analyze
final_signatures = sub.signature_decomposition(processAvg, mutation_type, layer_directory2, genome_build=genome_build,cosmic_version=cosmic_version,signature_database=signature_database, mutation_context=mutation_context, add_penalty=0.05, connected_sigs=connected_sigs,remove_penalty=0.01, make_decomposition_plots=make_plots, originalProcessAvg=originalProcessAvg,new_signature_thresh_hold=new_signature_thresh_hold,sig_exclusion_list=sig_exclusion_list,exome=exome, m_for_subgroups=m_for_subgroups)
UnboundLocalError: local variable 'm_for_subgroups' referenced before assignment
After investigating the issue it seems that the m_for_subgroups is not initiated because the SV matrix does not match the any of the dimensions in the if statements (lines 104 .. 109)
I edited the decomposition.py and added the following statement in line 110 if m=='32':
m_for_subgroups = 'SV'
The code finished executing and I got an output that seem ok. However, I do not know if it breaks the code at any other parts.
The text was updated successfully, but these errors were encountered:
I tried to use the following command to decompose_fit to decompose SV signatures that were extracted from SigprofilerExtractor to a given SV reference database
_from SigProfilerAssignment import Analyzer as Analyze
samples = "/Users/avraam/Desktop/NigData/SV_Matrices/Data.SV32.matrix.tsv"
output = "/Users/avraam/Desktop/NigData/Testing/"
sigs_DB = "Users/avraam/Desktop/NigData/RearrangmentSigsDB/RefSigv1_Rearr.tsv"
denovo_extracted_sigs = "/Users/avraam/Desktop/NigData/SigProResults2Check3/SV32/All_Solutions/SBSSV_7_Signatures/Signatures/SBSSV_S7_Signatures.txt"
Analyze.decompose_fit(samples,
output,
signatures=denovo_extracted_sigs,
signature_database=sigs_DB,
genome_build="GRCh38",
verbose=False,
new_signature_thresh_hold=0.8,
exclude_signature_subgroups=None,
exome=False)_
I got the following error
Decomposing De Novo Signatures .....
Traceback (most recent call last):
File "", line 1, in
File "/Users/avraam/Downloads/SigProfilerAssignment-main/SigProfilerAssignment/Analyzer.py", line 5, in decompose_fit
decomp.spa_analyze(samples=samples, output=output, signatures=signatures, signature_database=signature_database,nnls_add_penalty=nnls_add_penalty, nnls_remove_penalty=nnls_remove_penalty, initial_remove_penalty=initial_remove_penalty,genome_build=genome_build, cosmic_version=cosmic_version, make_plots=make_plots, collapse_to_SBS96=collapse_to_SBS96,connected_sigs=connected_sigs, verbose=verbose,decompose_fit_option= True,denovo_refit_option=False,cosmic_fit_option=False,devopts=devopts,new_signature_thresh_hold=new_signature_thresh_hold,exclude_signature_subgroups=exclude_signature_subgroups,exome=exome,input_type=input_type,context_type=context_type,export_probabilities=export_probabilities)
File "/Users/avraam/Downloads/SigProfilerAssignment-main/SigProfilerAssignment/decomposition.py", line 354, in spa_analyze
final_signatures = sub.signature_decomposition(processAvg, mutation_type, layer_directory2, genome_build=genome_build,cosmic_version=cosmic_version,signature_database=signature_database, mutation_context=mutation_context, add_penalty=0.05, connected_sigs=connected_sigs,remove_penalty=0.01, make_decomposition_plots=make_plots, originalProcessAvg=originalProcessAvg,new_signature_thresh_hold=new_signature_thresh_hold,sig_exclusion_list=sig_exclusion_list,exome=exome, m_for_subgroups=m_for_subgroups)
UnboundLocalError: local variable 'm_for_subgroups' referenced before assignment
After investigating the issue it seems that the m_for_subgroups is not initiated because the SV matrix does not match the any of the dimensions in the if statements (lines 104 .. 109)
I edited the decomposition.py and added the following statement in line 110
if m=='32':
m_for_subgroups = 'SV'
The code finished executing and I got an output that seem ok. However, I do not know if it breaks the code at any other parts.
The text was updated successfully, but these errors were encountered: