theislab / scvelo

RNA Velocity generalized through dynamical modeling
https://scvelo.org
BSD 3-Clause "New" or "Revised" License
410 stars 102 forks source link

ValueError in scv.tl.rank_dynamical_genes #294

Closed plath997 closed 3 years ago

plath997 commented 3 years ago

I am trying to use the rank dynamical genes function using 'groupby' and I keep getting this error. Any advice would be appreciated.

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/.local/lib/python3.6/site-packages/scvelo/tools/dynamical_model.py", line 1074, in rank_dynamical_genes
    [n for n in rankings_gene_names], dtype=[(f"{rn}", "U50") for rn in groups],
  File "/home/data1/miniconda3/lib/python3.6/site-packages/numpy/core/records.py", line 667, in fromarrays
    raise ValueError("mismatch between the number of fields "
ValueError: mismatch between the number of fields and the number of arrays

Versions:

scvelo==0.2.2 scanpy==1.6.0 anndata==0.7.4 loompy==2.0.17 numpy==1.19.2 scipy==1.5.2 matplotlib==3.3.1 sklearn==0.23.2 pandas==0.24.2

qoiopipq commented 3 years ago

same problem

yunkaizhang commented 3 years ago

same here, even with the demo data

WeilerP commented 3 years ago

@plath997, @qoiopipq, @yunkaizhang could you please provide a minimum working example s.t. the problem can be identified?

yunkaizhang commented 3 years ago

previously I was using 0.2.2 and it happens with the demo pancreas dataset, after I upgrade to 0.2.3 the issue seemed to be gone now