{"action":"opened","issue":{"url":"https://api.github.com/repos/raphael-group/NAIBR/issues/5","repository_url":"https://api.github.com/repos/raphael-group/NAIBR","labels_url":"https://api.github.com/repos/raphael-group/NAIBR/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/raphael-group/NAIBR/issues/5/comments","events_url":"https://api.github.com/repos/raphael-group/NAIBR/issues/5/events","html_url":"https://github.com/raphael-group/NAIBR/issues/5","id":273564507,"number":5,"title":"ValueError when no reads (same as #3)","user":{"login":"kautto","id":5281754,"avatar_url":"https://avatars3.githubusercontent.com/u/5281754?v=4","gravatar_id":"","url":"https://api.github.com/users/kautto","html_url":"https://github.com/kautto","followers_url":"https://api.github.com/users/kautto/followers","following_url":"https://api.github.com/users/kautto/following{/other_user}","gists_url":"https://api.github.com/users/kautto/gists{/gist_id}","starred_url":"https://api.github.com/users/kautto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kautto/subscriptions","organizations_url":"https://api.github.com/users/kautto/orgs","repos_url":"https://api.github.com/users/kautto/repos","events_url":"https://api.github.com/users/kautto/events{/privacy}","received_events_url":"https://api.github.com/users/kautto/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-11-13T20:20:31Z","updated_at":"2017-11-13T20:20:31Z","closed_at":null,"author_association":"NONE","body":"I'm still getting the same issues as described in #3 , when there are chromosomes that have no reads. I've had this occur both when looking at a single chromosome (in my case, chromosome 8) or when looking at whole genome data (in which case it gets to ...21>22>X>Y>MT and breaks). \r\n\r\n```/igm/apps/python/Python-2.7.12_install_static/lib/python2.7/site-packages/scipy-0.18.1-py2.7-linux-x86_64.egg/scipy/stats/_distn_infrastructure.py:405: RuntimeWarning: Mean of empty slice.\r\n  mu = data.mean()\r\n/igm/apps/python/Python-2.7.12_install_static/lib/python2.7/site-packages/numpy-1.13.3-py2.7-linux-x86_64.egg/numpy/core/_methods.py:80: RuntimeWarning: invalid value encountered in double_scalars\r\n  ret = ret.dtype.type(ret / rcount)\r\n/igm/apps/python/Python-2.7.12_install_static/lib/python2.7/site-packages/scipy-0.18.1-py2.7-linux-x86_64.egg/scipy/stats/_distn_infrastructure.py:406: RuntimeWarning: Mean of empty slice.\r\n  m2 = ((data - mu)**2).mean()\r\n/igm/apps/python/Python-2.7.12_install_static/lib/python2.7/site-packages/scipy-0.18.1-py2.7-linux-x86_64.egg/scipy/stats/_distn_infrastructure.py:407: RuntimeWarning: Mean of empty slice.\r\n  m3 = ((data - mu)**3).mean()\r\n/igm/apps/python/Python-2.7.12_install_static/lib/python2.7/site-packages/scipy-0.18.1-py2.7-linux-x86_64.egg/scipy/stats/_distn_infrastructure.py:2286: RuntimeWarning: Mean of empty slice.\r\n  muhat = tmp.mean()\r\n/igm/apps/python/Python-2.7.12_install_static/lib/python2.7/site-packages/scipy-0.18.1-py2.7-linux-x86_64.egg/scipy/stats/_distn_infrastructure.py:2287: RuntimeWarning: Degrees of freedom <= 0 for slice\r\n  mu2hat = tmp.var()\r\n/igm/apps/python/Python-2.7.12_install_static/lib/python2.7/site-packages/numpy-1.13.3-py2.7-linux-x86_64.egg/numpy/core/_methods.py:105: RuntimeWarning: invalid value encountered in true_divide\r\n  arrmean, rcount, out=arrmean, casting='unsafe', subok=False)\r\n/igm/apps/python/Python-2.7.12_install_static/lib/python2.7/site-packages/numpy-1.13.3-py2.7-linux-x86_64.egg/numpy/core/_methods.py:127: RuntimeWarning: invalid value encountered in double_scalars\r\n  ret = ret.dtype.type(ret / rcount)\r\nTraceback (most recent call last):\r\n  File \"NAIBR.py\", line 88, in <module>\r\n    main()\r\n  File \"NAIBR.py\", line 59, in main\r\n    data = parallel_execute(run_NAIBR,chroms)\r\n  File \"src/utils.py\", line 386, in parallel_execute\r\n    data = map(function,input_list)\r\n  File \"NAIBR.py\", line 33, in run_NAIBR\r\n    cands,p_len,p_rate = get_candidates(discs,reads_by_LR)\r\n  File \"src/get_reads.py\", line 150, in get_candidates\r\n    p_len,p_rate,barcode_overlap = get_distributions(reads_by_LR)\r\n  File \"src/distributions.py\", line 114, in get_distributions\r\n    p_rate = get_rate_distr(LRs)\r\n  File \"src/distributions.py\", line 139, in get_rate_distr\r\n    alpha,loc,beta = scipy.stats.gamma.fit(rate)\r\n  File \"/igm/apps/python/Python-2.7.12_install_static/lib/python2.7/site-packages/scipy-0.18.1-py2.7-linux-x86_64.egg/scipy/stats/_continuous_distns.py\", line 2011, in fit\r\n    return super(gamma_gen, self).fit(data, *args, **kwds)\r\n  File \"/igm/apps/python/Python-2.7.12_install_static/lib/python2.7/site-packages/scipy-0.18.1-py2.7-linux-x86_64.egg/scipy/stats/_distn_infrastructure.py\", line 2171, in fit\r\n    start = self._fitstart(data)\r\n  File \"/igm/apps/python/Python-2.7.12_install_static/lib/python2.7/site-packages/scipy-0.18.1-py2.7-linux-x86_64.egg/scipy/stats/_continuous_distns.py\", line 2000, in _fitstart\r\n    return super(gamma_gen, self)._fitstart(data, args=(a,))\r\n  File \"/igm/apps/python/Python-2.7.12_install_static/lib/python2.7/site-packages/scipy-0.18.1-py2.7-linux-x86_64.egg/scipy/stats/_distn_infrastructure.py\", line 2019, in _fitstart\r\n    loc, scale = self._fit_loc_scale_support(data, *args)\r\n  File \"/igm/apps/python/Python-2.7.12_install_static/lib/python2.7/site-packages/scipy-0.18.1-py2.7-linux-x86_64.egg/scipy/stats/_distn_infrastructure.py\", line 2239, in _fit_loc_scale_support\r\n    data_a = np.min(data)\r\n  File \"/igm/apps/python/Python-2.7.12_install_static/lib/python2.7/site-packages/numpy-1.13.3-py2.7-linux-x86_64.egg/numpy/core/fromnumeric.py\", line 2372, in amin\r\n    out=out, **kwargs)\r\n  File \"/igm/apps/python/Python-2.7.12_install_static/lib/python2.7/site-packages/numpy-1.13.3-py2.7-linux-x86_64.egg/numpy/core/_methods.py\", line 29, in _amin\r\n    return umr_minimum(a, axis, None, out, keepdims)\r\nValueError: zero-size array to reduction operation minimum which has no identity\r\n```\r\n\r\nThere's nothing odd about my config file:\r\n```\r\n# minimum mapping quality (default=40)\r\nmin_mapq=40\r\n\r\n# input bam file\r\nbam_file=./KAUTTO_Esko/data/17-0020-04_H1576_Tumor.chr8.bam\r\n\r\n# output directory (default=.)\r\noutdir=./KAUTTO_Esko/output/NAIBR/17-0020-04_H1576_Tumor/chr8\r\n\r\n# list of intervals not to be intcluded in analysis (default=None)\r\nblacklist=None\r\n\r\n# list in BEDPE format of novel adjacencies to be scored by NAIBR (default=None)\r\ncandidates=None\r\n\r\n# maximum distance between read-pairs in a linked-read (default=10000)\r\nd=10000\r\n\r\n# minimum size of structural variant (default=lmax)\r\nmin_sv=1000\r\n\r\n# number of cores (default=1)\r\ncores=4\r\n\r\n# minimum number of barcode overlaps supporting a candidate NA (default = 3)\r\nk=3\r\n```\r\n\r\nAnd I'm using the newest commit eb591664f2c737e983a3fe265673945d2606e0e5 , so that shouldn't be the issue.. any ideas? Thanks!"}}
{"actor":{"display_login":"kautto"}}