cnvkit
cnvkit copied to clipboard
cnvkit.py segment error
Hi, I'm running CNVkit on RNAseq data. I managed to run import-rna
and got the *.cnr
files. Now I'm trying to run the segment
step and I'm experiencing the following error:
cnvkit.py segment \
--output BIT5.cns \
--method cbs \
--processes 0 \
--smooth-cbs \
BIT5.cnr
Segmenting with method 'cbs', significance threshold 0.0001, in 0 processes
Dropped 96 / 1270 bins on chromosome 1
Dropped 89 / 543 bins on chromosome 2
Dropped 84 / 1017 bins on chromosome 1
Dropped 263 / 1006 bins on chromosome 2
Dropped 41 / 1081 bins on chromosome 3
Dropped 7 / 241 bins on chromosome 3
Dropped 7 / 175 bins on chromosome 4
Dropped 55 / 650 bins on chromosome 4
Dropped 10 / 369 bins on chromosome 6
Dropped 9 / 198 bins on chromosome 5
Dropped 25 / 736 bins on chromosome 6
Dropped 10 / 418 bins on chromosome 7
Dropped 34 / 914 bins on chromosome 5
Dropped 28 / 828 bins on chromosome 7
Dropped 13 / 304 bins on chromosome 8
Dropped 55 / 533 bins on chromosome 8
Dropped 1 / 280 bins on chromosome 9
Dropped 12 / 659 bins on chromosome 9
Dropped 1 / 172 bins on chromosome 10
Dropped 17 / 412 bins on chromosome 11
Dropped 26 / 641 bins on chromosome 10
Dropped 39 / 793 bins on chromosome 11
concurrent.futures.process._RemoteTraceback:
"""
Traceback (most recent call last):
File "/opt/conda/lib/python3.10/concurrent/futures/process.py", line 246, in _process_worker
r = call_item.fn(*call_item.args, **call_item.kwargs)
File "/opt/conda/lib/python3.10/concurrent/futures/process.py", line 205, in _process_chunk
return [fn(*args) for args in chunk]
File "/opt/conda/lib/python3.10/concurrent/futures/process.py", line 205, in <listcomp>
return [fn(*args) for args in chunk]
File "/opt/conda/lib/python3.10/site-packages/cnvlib/segmentation/__init__.py", line 126, in _ds
return _do_segmentation(*args)
File "/opt/conda/lib/python3.10/site-packages/cnvlib/segmentation/__init__.py", line 238, in _do_segmentation
segarr = transfer_fields(segarr, cnarr)
File "/opt/conda/lib/python3.10/site-packages/cnvlib/segmentation/__init__.py", line 347, in transfer_fields
seg_gn = ",".join(subgenes)
TypeError: sequence item 3: expected str instance, float found
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/conda/bin/cnvkit.py", line 8, in <module>
sys.exit(main())
File "/opt/conda/lib/python3.10/site-packages/cnvlib/cnvkit.py", line 10, in main
args.func(args)
File "/opt/conda/lib/python3.10/site-packages/cnvlib/commands.py", line 1022, in _cmd_segment
results = segmentation.do_segmentation(
File "/opt/conda/lib/python3.10/site-packages/cnvlib/segmentation/__init__.py", line 81, in do_segmentation
rets = list(
File "/opt/conda/lib/python3.10/concurrent/futures/process.py", line 575, in _chain_from_iterable_of_lists
for element in iterable:
File "/opt/conda/lib/python3.10/concurrent/futures/_base.py", line 621, in result_iterator
yield _result_or_cancel(fs.pop())
File "/opt/conda/lib/python3.10/concurrent/futures/_base.py", line 319, in _result_or_cancel
return fut.result(timeout)
File "/opt/conda/lib/python3.10/concurrent/futures/_base.py", line 458, in result
return self.__get_result()
File "/opt/conda/lib/python3.10/concurrent/futures/_base.py", line 403, in __get_result
raise self._exception
TypeError: sequence item 3: expected str instance, float found
I tried to install CNVkit using both conda and docker (the output above is from a docker run) but I always get the same error.
The head of the .cnr
file looks like that:
chromosome start end gene log2 depth gc tx_length weight
1 12010 13670 DDX11L1 0.92298 12.5 0.5912 632 0.339448
1 14696 24886 WASH7P -0.101195 7.89855 0.5657 1380 0.445155
1 131025 134836 CICP27 0.109838 3.17419 0.5971 3812 0.230832
1 141474 173862 nan 0.344426 3.86831 0.4496 4860 0.323938
1 185217 195411 WASH9P 0.0415028 16.5354 0.5654 1397 0.24177
1 258568 259024 nan -0.320253 12.6915 0.5077 457 0.25314
1 347982 348366 RPL23AP24 0.397249 1.81818 0.5039 385 0.236658
1 485026 485208 nan -0.282081 61.7486 0.4044 183 0.23707
1 487101 489906 CICP7 0.216113 0.242229 0.6169 2477 0.249926
Any idea? Thank you in advance!