etal / cnvkit

Copy number variant detection from targeted DNA sequencing
http://cnvkit.readthedocs.org
Other
502 stars 163 forks source link

make command failed in /test folder #782

Closed JiayangZhou closed 1 year ago

JiayangZhou commented 1 year ago

I am using latest python script, after installed python and R dependencies according to the README, I cd to the /test folder and attempted with a make command, however, it failed with errors which I could not understand, hope someone could enlighten me, thanks.

OS MAC 13.0.1 Python3 3.9.1 Rscript (R) version 4.2.2 (2022-10-31)

make             
python3 ../cnvkit.py segment --rscript-path Rscript -p 2 --drop-low-coverage -t .01 build/p2-5_5.cnr -o build/p2-5_5.cns
Segmenting with method 'cbs', significance threshold 0.01, in 2 processes
concurrent.futures.process._RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/concurrent/futures/process.py", line 243, in _process_worker
    r = call_item.fn(*call_item.args, **call_item.kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/concurrent/futures/process.py", line 202, in _process_chunk
    return [fn(*args) for args in chunk]
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/concurrent/futures/process.py", line 202, in <listcomp>
    return [fn(*args) for args in chunk]
  File "/Users/jiayangzhou/TeaBag/Code/cnvkit/cnvlib/segmentation/__init__.py", line 89, in _ds
    return _do_segmentation(*args)
  File "/Users/jiayangzhou/TeaBag/Code/cnvkit/cnvlib/segmentation/__init__.py", line 161, in _do_segmentation
    seg_out = core.call_quiet(rscript_path,
  File "/Users/jiayangzhou/TeaBag/Code/cnvkit/cnvlib/core.py", line 31, in call_quiet
    raise RuntimeError("Subprocess command failed:\n$ %s\n\n%s"
RuntimeError: Subprocess command failed:
$ Rscript --no-restore --no-environ /var/folders/9k/6dzvmf4j73v1b05bq9xt8sxh0000gn/T/tmpg71dm19s

b"Error: package or namespace load failed for \xe2\x80\x98DNAcopy\xe2\x80\x99 in dyn.load(file, DLLpath = DLLpath, ...):\n unable to load shared object '/Library/Frameworks/R.framework/Versions/4.2/Resources/library/DNAcopy/libs/DNAcopy.so':\n  dlopen(/Library/Frameworks/R.framework/Versions/4.2/Resources/library/DNAcopy/libs/DNAcopy.so, 0x0006): Symbol not found: __gfortran_os_error_at\n  Referenced from: <5736DAD5-1D8E-3BB4-A80A-70AB7A7E4DEE> /Library/Frameworks/R.framework/Versions/4.2/Resources/library/DNAcopy/libs/DNAcopy.so\n  Expected in:     <5B0F7278-9D16-3B60-A413-59EEF538E568> /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libgfortran.5.dylib\nExecution halted\n"
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/jiayangzhou/TeaBag/Code/cnvkit/test/../cnvkit.py", line 9, in <module>
    args.func(args)
  File "/Users/jiayangzhou/TeaBag/Code/cnvkit/cnvlib/commands.py", line 666, in _cmd_segment
    results = segmentation.do_segmentation(cnarr, args.method, args.threshold,
  File "/Users/jiayangzhou/TeaBag/Code/cnvkit/cnvlib/segmentation/__init__.py", line 61, in do_segmentation
    rets = list(pool.map(_ds, ((ca, method, threshold, variants,
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/concurrent/futures/process.py", line 559, in _chain_from_iterable_of_lists
    for element in iterable:
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/concurrent/futures/_base.py", line 600, in result_iterator
    yield fs.pop().result()
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/concurrent/futures/_base.py", line 440, in result
    return self.__get_result()
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/concurrent/futures/_base.py", line 389, in __get_result
    raise self._exception
RuntimeError: Subprocess command failed:
$ Rscript --no-restore --no-environ /var/folders/9k/6dzvmf4j73v1b05bq9xt8sxh0000gn/T/tmpg71dm19s

b"Error: package or namespace load failed for \xe2\x80\x98DNAcopy\xe2\x80\x99 in dyn.load(file, DLLpath = DLLpath, ...):\n unable to load shared object '/Library/Frameworks/R.framework/Versions/4.2/Resources/library/DNAcopy/libs/DNAcopy.so':\n  dlopen(/Library/Frameworks/R.framework/Versions/4.2/Resources/library/DNAcopy/libs/DNAcopy.so, 0x0006): Symbol not found: __gfortran_os_error_at\n  Referenced from: <5736DAD5-1D8E-3BB4-A80A-70AB7A7E4DEE> /Library/Frameworks/R.framework/Versions/4.2/Resources/library/DNAcopy/libs/DNAcopy.so\n  Expected in:     <5B0F7278-9D16-3B60-A413-59EEF538E568> /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libgfortran.5.dylib\nExecution halted\n"
make: *** [build/p2-5_5.cns] Error 1
AlirezaDoustmohammadi commented 1 year ago

Hi. Install CNVKIT using conda. Most errors solve in this way.

etal commented 1 year ago

This looks like an R environment issue. You could try conda or the latest Docker image so that the R package is precompiled for you.