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

SigProfilerSimulator gives "UnboundLocalError: local variable 'dinuc_mat' referenced before assignment" #9

Open
burcakotlu opened this issue Jan 24, 2025 · 1 comment

Comments

@burcakotlu
Copy link

Dear all,

I'm running SigProfilerTopography while simulating mutations with a bed file (chrom_based=True, seqInfo=True, exome=None, cushion=0).

You can reach the python here: /tscc/nfs/home/burcak/developer/SigProfilerTopographyRuns/Mutographs_ESCC_552/pbs_py_files/all_escc_552_samples_ENCFF169EST_H3K4me1_simulations.py

As you can find in the SPT call python file, bed file is here and has no Y chromosome :
bed_file = "/tscc/lustre/restricted/alexandrov-ddn/users/burcak/data/bed_for_SPS/ENCFF169EST_H3K4me1_regions_for_simulator.bed"

Again as you can see from the SPT call python file, input files are under
inputDir= '/tscc/lustre/restricted/alexandrov-ddn/users/burcak/SigProfilerTopographyRuns/Mutographs_ESCC_552/all_escc_552_samples_ENCFF169EST_H3K4me1_simulations'

However, SPMG gives the following error:

Traceback (most recent call last):
File "/tscc/nfs/home/burcak/developer/SigProfilerTopographyRuns/Mutographs_ESCC_552/pbs_py_files/all_escc_552_samples_ENCFF169EST_H3K4me1_simulations.py", line 51, in
topography.runAnalyses(genome,
File "/tscc/nfs/home/burcak/.local/lib/python3.9/site-packages/SigProfilerTopography/Topography.py", line 2138, in runAnalyses
simulator.SigProfilerSimulator(jobname,
File "/tscc/nfs/home/burcak/.local/lib/python3.9/site-packages/SigProfilerSimulator/SigProfilerSimulator.py", line 291, in SigProfilerSimulator
matGen.SigProfilerMatrixGeneratorFunc(project, genome, project_path ,plot=False, exome=exome, bed_file=bed_file, chrom_based=True, cushion=cushion)
File "/tscc/nfs/home/burcak/.local/lib/python3.9/site-packages/SigProfilerMatrixGenerator/scripts/SigProfilerMatrixGeneratorFunc.py", line 2078, in SigProfilerMatrixGeneratorFunc
matrices["DINUC"] = dinuc_mat
UnboundLocalError: local variable 'dinuc_mat' referenced before assignment

SPMG log files are under:
/tscc/lustre/restricted/alexandrov-ddn/users/burcak/SigProfilerTopographyRuns/Mutographs_ESCC_552/all_escc_552_samples_ENCFF169EST_H3K4me1_simulations/logs

I hope you can help me to resolve this issue asap.

Best wishes,
Burcak

@burcakotlu
Copy link
Author

My concern is the bed file.

This bed file contains the H3K4me1 regions and their left (100KB) and right (100KB) flanking regions.
bed_file = "/tscc/lustre/restricted/alexandrov-ddn/users/burcak/data/bed_for_SPS/ENCFF169EST_H3K4me1_regions_for_simulator.bed"

Due to the flanking regions, it might have overlapping regions. Might this create a problem?

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

1 participant