I am having issues getting CNVkit up and running.
I installed from source to a local directory because I do not have root privileges on our cluster:
git clone https://github.com/etal/cnvkit.git
python setup.py build
python setup.py install --prefix=$HOME/local
I installed all of the python and R dependencies, and made sure that my PYTHONPATH
and R_LIBS
environment variables were set correctly.
When I run make
in the test/
directory, I get the following output/error:
python ../cnvkit.py segment -t .01 build/p2-5_5.cnr -o build/p2-5_5.cns
Dropped 1 outlier bins:
chromosome start end gene log2 weight
0 chr16 29466010 29466278 BOLA2B -26.849 0.437268
Traceback (most recent call last):
File "../cnvkit.py", line 13, in <module>
args.func(args)
File "/path/to/cnvkit/cnvlib/commands.py", line 714, in _cmd_segment
rlibpath=args.rlibpath)
File "/path/to/cnvkit/cnvlib/segmentation/__init__.py", line 61, in do_segmentation
sample_id=cnarr.sample_id)
File "/path/to/cnvkit/cnvlib/tabio/__init__.py", line 69, in read
dframe = reader(infile, **kwargs)
File "/path/to/cnvkit/cnvlib/tabio/seg.py", line 48, in read_seg
for sid, dframe in results:
File "/path/to/cnvkit/cnvlib/tabio/seg.py", line 102, in parse_seg
engine="python",
File "/path/to/local/lib/python2.7/site-packages/pandas/io/parsers.py", line 562, in parser_f
return _read(filepath_or_buffer, kwds)
File "/path/to/local/lib/python2.7/site-packages/pandas/io/parsers.py", line 315, in _read
parser = TextFileReader(filepath_or_buffer, **kwds)
File "/path/to/local/lib/python2.7/site-packages/pandas/io/parsers.py", line 645, in __init__
self._make_engine(self.engine)
File "/path/to/local/lib/python2.7/site-packages/pandas/io/parsers.py", line 805, in _make_engine
self._engine = klass(self.f, **self.options)
File "/path/to/local/lib/python2.7/site-packages/pandas/io/parsers.py", line 1608, in __init__
self.columns, self.num_original_columns = self._infer_columns()
File "/path/to/local/lib/python2.7/site-packages/pandas/io/parsers.py", line 1907, in _infer_columns
line = self._buffered_line()
File "/path/to/local/lib/python2.7/site-packages/pandas/io/parsers.py", line 1975, in _buffered_line
return self._next_line()
File "/path/to/local/lib/python2.7/site-packages/pandas/io/parsers.py", line 2006, in _next_line
orig_line = next(self.data)
_csv.Error: line contains NULL byte
make: *** [build/p2-5_5.cns] Error 1
I get a very similar error (_csv.Error: line contains NULL byte
) when I try to run CNVkit on my own data.
Any help is greatly appreciated! I can't seem to figure out what is causing the problem.
Thank you so much for this thorough answer! I ended up installing CNVkit through anaconda, and re-downloaded the repository (this time as a .zip). Running
make
in the test directory now seems to complete, although 'all-diagrams.pdf' and 'all-scatters.pdf' are empty. I was able to process my files without any obvious error, and am taking a detailed look at them now. Thanks again!Great! The all-diagrams/scatters.pdf files are optional and will be empty if you don't have the command-line program "pdfunite", part of the Poppler package (e.g. "poppler-utils" on Ubuntu). If the other PDF files were created successfully, you're all set.