Hi,
cnvkit fails when I have --diagram option enabled in batch mode (the full invocation is cnvkit.py batch tumour.bam --method hybrid --reference cnv-reference.cnn --scatter --diagram). The error I receive is:
Traceback (most recent call last):
File "/opt/venv/bin/cnvkit.py", line 9, in <module>
args.func(args)
File "/opt/venv/lib/python3.8/site-packages/cnvlib/commands.py", line 875, in _cmd_diagram
outfname = diagram.create_diagram(cnarr, segarr, args.threshold,
File "/opt/venv/lib/python3.8/site-packages/cnvlib/diagram.py", line 55, in create_diagram
cnarr = cnarr.squash_genes()
File "/opt/venv/lib/python3.8/site-packages/cnvlib/cnary.py", line 221, in squash_genes
return self.as_rows(outrows)
File "/opt/venv/lib/python3.8/site-packages/skgenome/gary.py", line 104, in as_rows
out = self.from_rows(rows,
File "/opt/venv/lib/python3.8/site-packages/skgenome/gary.py", line 84, in from_rows
table = pd.DataFrame.from_records(rows, columns=columns)
File "/opt/venv/lib/python3.8/site-packages/pandas/core/frame.py", line 2222, in from_records
arrays, arr_columns = to_arrays(data, columns)
File "/opt/venv/lib/python3.8/site-packages/pandas/core/internals/construction.py", line 883, in to_arrays
content, columns = _finalize_columns_and_data(arr, columns, dtype)
File "/opt/venv/lib/python3.8/site-packages/pandas/core/internals/construction.py", line 985, in _finalize_columns_and_data
raise ValueError(err) from err
ValueError: 9 columns passed, passed data had 7 columns
I noticed similar issue from the past https://github.com/etal/cnvkit/issues/190 and so I tried to run the diagram separately. When I ran diagram with both .cns and .cnr files I received the same error, when I provided only .cns file the command worked (and created the pdf) and lastly when I used only .cnr file the command succeeded however the diagram was empty.
I'm currently running version 0.9.9, however when I tested the previous versions I noticed that the --diagram stopped working after version 0.9.6.
Could you point me at what is wrong? Many thanks,
Misha
Hi, cnvkit fails when I have --diagram option enabled in batch mode (the full invocation is
cnvkit.py batch tumour.bam --method hybrid --reference cnv-reference.cnn --scatter --diagram
). The error I receive is:I noticed similar issue from the past https://github.com/etal/cnvkit/issues/190 and so I tried to run the diagram separately. When I ran diagram with both .cns and .cnr files I received the same error, when I provided only .cns file the command worked (and created the pdf) and lastly when I used only .cnr file the command succeeded however the diagram was empty.
I'm currently running version 0.9.9, however when I tested the previous versions I noticed that the --diagram stopped working after version 0.9.6.
Could you point me at what is wrong? Many thanks, Misha