cnvkit
cnvkit copied to clipboard
`segment` function fails
When using batch command, .cns file is not generated and no error is thrown.
However, when I run segment function separately, it gives the below error:
# cnvkit.py segment -o my_sample.cns my_sample.cnr
Segmenting with method 'cbs', significance threshold 0.0001, in 1 processes
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/cnvlib/core.py", line 23, in call_quiet
proc = subprocess.run(args, check=True, capture_output=True)
File "/usr/local/lib/python3.10/subprocess.py", line 526, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '('Rscript', '--no-restore', '--no-environ', '/tmp/tmpl21bppqx')' returned non-zero exit status 1.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/bin/cnvkit.py", line 10, in <module>
sys.exit(main())
File "/usr/local/lib/python3.10/site-packages/cnvlib/cnvkit.py", line 10, in main
args.func(args)
File "/usr/local/lib/python3.10/site-packages/cnvlib/commands.py", line 1022, in _cmd_segment
results = segmentation.do_segmentation(
File "/usr/local/lib/python3.10/site-packages/cnvlib/segmentation/__init__.py", line 81, in do_segmentation
rets = list(
File "/usr/local/lib/python3.10/site-packages/cnvlib/segmentation/__init__.py", line 126, in _ds
return _do_segmentation(*args)
File "/usr/local/lib/python3.10/site-packages/cnvlib/segmentation/__init__.py", line 209, in _do_segmentation
seg_out = core.call_quiet(
File "/usr/local/lib/python3.10/site-packages/cnvlib/core.py", line 30, in call_quiet
raise RuntimeError(
RuntimeError: Subprocess command failed:
$ Rscript --no-restore --no-environ /tmp/tmpl21bppqx
Command '('Rscript', '--no-restore', '--no-environ', '/tmp/tmpl21bppqx')' returned non-zero exit status 1.
I am using the Docker image:
quay.io/biocontainers/cnvkit:0.9.11--pyhdfd78af_0
It turns out to be version 0.9.11 does not accept weight column to be blank anywhere. If I modify the .cnr file by inserting 1 to the empty rows in weight column, it works.
Related: #436
I merged a possible fix in #914. Could you try pulling the latest development version and see if the problem is fixed now?