Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Denovo fit of SV signatures #50

Closed
Avramis opened this issue Nov 1, 2022 · 1 comment
Closed

Denovo fit of SV signatures #50

Avramis opened this issue Nov 1, 2022 · 1 comment
Assignees

Comments

@Avramis
Copy link

Avramis commented Nov 1, 2022

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.

@mdbarnesUCSD
Copy link
Collaborator

mdbarnesUCSD commented Nov 3, 2022

This issue has been resolved in release v0.0.18. Please reach out if you encounter other issues. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants