Question: scatter plots with single chromosome gives IndexError
gravatar for fenrir.sivar
7 months ago by
fenrir.sivar0 wrote:

I'm using cnvkit from the BCBIO 1.0.9 pipeline to find a rearrangement on chromosome 8 and 21 of a sample against hg19, wgrs, 35x

I'm using the following commands to create some plots: scatter -s Sample.cns -o Sample.png Sample.cnr results in the ususal overview plot with all chromosomes in one plot

specifying a single chromosome chr1 results in a single plot of chr1 as expected scatter -s Sample.cns -c chr1 -o Sample.chr1.png Sample.cnr scatter -s Sample.cns -c chr21 -o Sample.chr21.png Sample.cnr

results in

IndexError: positional indexers are out-of-bounds error, same for all remaining chromosomes:
How can I get an overview per chromosome?

Traceback (most recent call last):
  File "/data/tools/bin/", line 13, in <module>
  File "/data/tools/bcbio/anaconda/lib/python2.7/site-packages/cnvlib/", line 899, in _cmd_scatter
  File "/data/tools/bcbio/anaconda/lib/python2.7/site-packages/cnvlib/", line 49, in do_scatter
    y_min, y_max, title, segment_color)
  File "/data/tools/bcbio/anaconda/lib/python2.7/site-packages/cnvlib/", line 216, in chromosome_scatter
    show_gene, window_width)
  File "/data/tools/bcbio/anaconda/lib/python2.7/site-packages/cnvlib/", line 341, in select_range_genes
    if cnarr else CNA([]))
  File "/data/tools/bcbio/anaconda/lib/python2.7/site-packages/skgenome/", line 369, in in_range
    return self.as_dataframe(next(results))
  File "/data/tools/bcbio/anaconda/lib/python2.7/site-packages/future/builtins/", line 59, in newnext
  File "/data/tools/bcbio/anaconda/lib/python2.7/site-packages/skgenome/", line 85, in iter_ranges
    subtable = table.iloc[region_idx]
  File "/data/tools/bcbio/anaconda/lib/python2.7/site-packages/pandas/core/", line 1478, in __getitem__
    return self._getitem_axis(maybe_callable, axis=axis)
  File "/data/tools/bcbio/anaconda/lib/python2.7/site-packages/pandas/core/", line 2091, in _getitem_axis
    return self._get_list_axis(key, axis=axis)
  File "/data/tools/bcbio/anaconda/lib/python2.7/site-packages/pandas/core/", line 2073, in _get_list_axis
    raise IndexError("positional indexers are out-of-bounds")
IndexError: positional indexers are out-of-bounds
bcbio cnvkit • 406 views
ADD COMMENTlink modified 3 months ago by biokoala3.6k • written 7 months ago by fenrir.sivar0
gravatar for Brad Chapman
3 months ago by
Brad Chapman9.3k
Boston, MA
Brad Chapman9.3k wrote:

Thanks for this report and apologies for missing this when initially posted. I was able to reproduce this problem and sent in a pull request to CNVkit that should fix the problem: Hope this small fix will work for you and comes in a reasonable time to help with your work.

ADD COMMENTlink written 3 months ago by Brad Chapman9.3k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1304 users visited in the last hour