AlexandrovLab/SigProfilerExtractorR

Runtime error when using example data

waemm opened this issue · 1 comments

waemm commented

Hi,

I pip installed your tool and ran the example, get the following error:

Any help would be appreciated!

Thanks

======== Error:

Starting matrix generation for SNVs and DINUCs...Starting matrix generation for SNVs and DINUCs...Starting matrix generation for SNVs and DINUCs...Starting matrix generation for SNVs and DINUCs...Starting matrix generation for SNVs and DINUCs...Starting matrix generation for SNVs and DINUCs...Completed! Elapsed time: 4.77 seconds.
Matrices generated for 2 samples with 5997 errors. Total of 1909 SNVs, 49 DINUCs, and 0 INDELs were successfully analyzed.
Extracting signature 1 for mutation type 96
The matrix normalizig cutoff is 9600

Traceback (most recent call last):
File "", line 1, in
File "/shared/pipeline-user/bcbio/anaconda/lib/python3.6/multiprocessing/spawn.py", line 105, in spawn_main
exitcode = _main(fd)
File "/shared/pipeline-user/bcbio/anaconda/lib/python3.6/multiprocessing/spawn.py", line 114, in _main
prepare(preparation_data)
File "/shared/pipeline-user/bcbio/anaconda/lib/python3.6/multiprocessing/spawn.py", line 225, in prepare
_fixup_main_from_path(data['init_main_from_path'])
File "/shared/pipeline-user/bcbio/anaconda/lib/python3.6/multiprocessing/spawn.py", line 277, in _fixup_main_from_path
run_name="mp_main")
File "/shared/pipeline-user/bcbio/anaconda/lib/python3.6/runpy.py", line 263, in run_path
pkg_name=pkg_name, script_name=fname)
File "/shared/pipeline-user/bcbio/anaconda/lib/python3.6/runpy.py", line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
File "/shared/pipeline-user/bcbio/anaconda/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/shared/pipeline-user/run_data/Exome_data_neogenomics/Tumor_only_neo_batch4_wrapper_run/tumor_only_neobatch4/sigprof/run_sig.py", line 9, in
main_function()
File "/shared/pipeline-user/run_data/Exome_data_neogenomics/Tumor_only_neo_batch4_wrapper_run/tumor_only_neobatch4/sigprof/run_sig.py", line 8, in main_function
sig.sigProfilerExtractor("vcf", "example_output", "vcftest", minimum_signatures=1, maximum_signatures=3,reference_genome="GRCh38",exome=True)
File "/shared/pipeline-user/bcbio/anaconda/lib/python3.6/site-packages/SigProfilerExtractor/sigpro.py", line 818, in sigProfilerExtractor
i = i)
File "/shared/pipeline-user/bcbio/anaconda/lib/python3.6/site-packages/SigProfilerExtractor/subroutines.py", line 789, in decipher_signatures
results = parallel_runs(excecution_parameters, genomes=genomes, totalProcesses=totalProcesses, verbose = False)
File "/shared/pipeline-user/bcbio/anaconda/lib/python3.6/site-packages/SigProfilerExtractor/subroutines.py", line 685, in parallel_runs
pool = multiprocessing.Pool()
File "/shared/pipeline-user/bcbio/anaconda/lib/python3.6/multiprocessing/context.py", line 119, in Pool
context=self.get_context())
File "/shared/pipeline-user/bcbio/anaconda/lib/python3.6/multiprocessing/pool.py", line 174, in init
self._repopulate_pool()
File "/shared/pipeline-user/bcbio/anaconda/lib/python3.6/multiprocessing/pool.py", line 239, in _repopulate_pool
w.start()
File "/shared/pipeline-user/bcbio/anaconda/lib/python3.6/multiprocessing/process.py", line 105, in start
self._popen = self._Popen(self)
File "/shared/pipeline-user/bcbio/anaconda/lib/python3.6/multiprocessing/context.py", line 284, in _Popen
return Popen(process_obj)
File "/shared/pipeline-user/bcbio/anaconda/lib/python3.6/multiprocessing/popen_spawn_posix.py", line 32, in init
super().init(process_obj)
File "/shared/pipeline-user/bcbio/anaconda/lib/python3.6/multiprocessing/popen_fork.py", line 19, in init
self._launch(process_obj)
File "/shared/pipeline-user/bcbio/anaconda/lib/python3.6/multiprocessing/popen_spawn_posix.py", line 42, in _launch
prep_data = spawn.get_preparation_data(process_obj._name)
File "/shared/pipeline-user/bcbio/anaconda/lib/python3.6/multiprocessing/spawn.py", line 143, in get_preparation_data
_check_not_importing_main()
File "/shared/pipeline-user/bcbio/anaconda/lib/python3.6/multiprocessing/spawn.py", line 136, in _check_not_importing_main
is not going to be frozen to produce an executable.''')
RuntimeError:
An attempt has been made to start a new process before the
current process has finished its bootstrapping phase.

    This probably means that you are not using fork to start your
    child processes and you have forgotten to use the proper idiom
    in the main module:

        if __name__ == '__main__':
            freeze_support()
            ...

    The "freeze_support()" line can be omitted if the program
    is not going to be frozen to produce an executable.
waemm commented

This is related to AlexandrovLab/SigProfilerExtractor#27

Need to use the "main" idiom:

if name == 'main':
run()