Hello ,
I looked for a way to get a VCF (from lofreq) to the proper input format for CNVkit but to no avail.
I have seen in the code that the frequency of the alleles are calculated from the VCF data. Now in my VCF I already have the AF calculated. Would not it be simpler to recover this value directly?
Otherwise I pooste here an extract from my VCF as well as the error console.
CHROM POS ID REF ALT QUAL FILTER INFO
chr2 29446202 . G A . PASS DP=1050;AF=0.538095;SB=0;DP4=245,236,290,275;CONSVAR
chr2 212569983 . G A . PASS DP=312;AF=1.000000;SB=0;DP4=0,0,184,128;CONSVAR
Traceback (most recent call last):
File "/usr/local/bin/cnvkit.py", line 5, in <module>
pkg_resources.run_script('CNVkit==0.8.3.dev0', 'cnvkit.py')
File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 739, in run_script
self.require(requires)[0].run_script(script_name, ns)
File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1501, in run_script
exec(script_code, namespace, namespace)
File "/usr/local/lib/python2.7/site-packages/CNVkit-0.8.3.dev0-py2.7.egg/EGG-INFO/scripts/cnvkit.py", line 13, in <module>
File "build/bdist.linux-x86_64/egg/cnvlib/commands.py", line 848, in _cmd_call
File "build/bdist.linux-x86_64/egg/cnvlib/commands.py", line 869, in do_call
File "build/bdist.linux-x86_64/egg/cnvlib/vary.py", line 53, in baf_by_ranges
File "build/bdist.linux-x86_64/egg/cnvlib/genome/gary.py", line 398, in into_ranges
File "build/bdist.linux-x86_64/egg/cnvlib/genome/intersect.py", line 69, in into_ranges
File "/usr/local/lib/python2.7/site-packages/pandas/core/frame.py", line 1997, in __getitem__
return self._getitem_column(key)
File "/usr/local/lib/python2.7/site-packages/pandas/core/frame.py", line 2004, in _getitem_column
return self._get_item_cache(key)
File "/usr/local/lib/python2.7/site-packages/pandas/core/generic.py", line 1350, in _get_item_cache
values = self._data.get(item)
File "/usr/local/lib/python2.7/site-packages/pandas/core/internals.py", line 3290, in get
loc = self.items.get_loc(item)
File "/usr/local/lib/python2.7/site-packages/pandas/indexes/base.py", line 1947, in get_loc
return self._engine.get_loc(self._maybe_cast_indexer(key))
File "pandas/index.pyx", line 137, in pandas.index.IndexEngine.get_loc (pandas/index.c:4154)
File "pandas/index.pyx", line 159, in pandas.index.IndexEngine.get_loc (pandas/index.c:4018)
File "pandas/hashtable.pyx", line 675, in pandas.hashtable.PyObjectHashTable.get_item (pandas/hashtable.c:12368)
File "pandas/hashtable.pyx", line 683, in pandas.hashtable.PyObjectHashTable.get_item (pandas/hashtable.c:12322)
KeyError: 'alt_freq'
Thank you
Please use
ADD COMMENT
to answer to earlier posts as such this thread remains logically structured and easy to follow.Is there a FORMAT column and at least one sample column in your VCF? If so, which keys are available there?