Skip to content

Multiple time series where some sequences are all 0 in some time series #4

@elsherbini

Description

@elsherbini

I have 5 time series that I'm interested in using Ananke on. Some sequences overlap between the time series, but others are totally absent from one or more of the time series. It appears that having a sequence with all zeros causes an error. (It is also possible that I am getting this error for another reason, but I believe it is the same error I had earlier when I was doing a single time series and I fixed it by removing sequences that were all 0)

Full Traceback below

ananke cluster -i 18S_ananke_count_averaged_Eukaryota_min1000total_min2samples.h5  -n 16 -l 0.1 -u 100 -s 0.05 --clr
Loading time-series database file
Importing time-series matrix
Traceback (most recent call last):
  File "/home/josephe/miniconda3/envs/dada2v1.4/bin/ananke", line 11, in <module>
    load_entry_point('ananke==0.3.0', 'console_scripts', 'ananke')()
  File "/home/josephe/miniconda3/envs/dada2v1.4/lib/python3.5/site-packages/ananke-0.3.0-py3.5.egg/ananke/ananke.py", line 169, in main
    args.u, args.s, args.clr)
  File "/home/josephe/miniconda3/envs/dada2v1.4/lib/python3.5/site-packages/ananke-0.3.0-py3.5.egg/ananke/_cluster.py", line 310, in run_cluster
    normal_matrix = normalize_clr(matrix)
  File "/home/josephe/miniconda3/envs/dada2v1.4/lib/python3.5/site-packages/ananke-0.3.0-py3.5.egg/ananke/_cluster.py", line 248, in normalize_clr
    colmins = np.apply_along_axis(lambda x: x[np.nonzero(x)].min(), 0, X2)
  File "/home/josephe/miniconda3/envs/dada2v1.4/lib/python3.5/site-packages/numpy/lib/shape_base.py", line 139, in apply_along_axis
    buff[ind] = asanyarray(func1d(inarr_view[ind], *args, **kwargs))
  File "/home/josephe/miniconda3/envs/dada2v1.4/lib/python3.5/site-packages/ananke-0.3.0-py3.5.egg/ananke/_cluster.py", line 248, in <lambda>
    colmins = np.apply_along_axis(lambda x: x[np.nonzero(x)].min(), 0, X2)
  File "/home/josephe/miniconda3/envs/dada2v1.4/lib/python3.5/site-packages/numpy/matrixlib/defmatrix.py", line 822, in min
    return N.ndarray.min(self, axis, out, keepdims=True)._collapse(axis)
  File "/home/josephe/miniconda3/envs/dada2v1.4/lib/python3.5/site-packages/numpy/core/_methods.py", line 29, in _amin
    return umr_minimum(a, axis, None, out, keepdims)
ValueError: zero-size array to reduction operation minimum which has no identity

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions