Open JesseRop opened 2 years ago
@JesseRop, thanks for reporting this. Looks similar to #856. I'll check if I can reproduce the error on my side and get back to you ASAP. In general: If the dynamical mode does not work on your data, you shouldn't simply switch to another (less sophisticated) one. Both approaches rely on a specific shape of phase portraits and cell types aligned along it. See e.g. #216 or #462 for possible reasons for failure.
@JesseRop, the numpy
version is the issue. Not sure why, though. When downgrading to numpy<1.21
, the error is no longer thrown.
@michalk8, @ivirshup did you encounter something similar before by chance, or are aware of anything introduced in numpy>1.21
causing this?
Hi everyone! @WeilerP are you sure the numpy version is the only issue? Because I've been running scv.tl.velocity for multiple (5 other) samples and it raises this error only for one sample, how could it be working for the other samples if the numpy version is the same? It's not a memory issue either, because I tried running the command different times and it always raises the same error. Could you help me understand what it is the problem of this object?
My current np.__version__
is '1.21.1'
UPDATE ***
I managed to avoid the error by specifying enforce=True
during the normalization process carried out through this function: scv.pp.filter_and_normalize()
After enforce=True, the scv.tl.velocity()
function didn't raise anymore the "SVD did not converge" error :)
Another potential cause of this error if you are using adata exported from Seurat
. Ensure that the primary layer exported to adata is the counts
layer of the Seurat
object, which contains the raw counts. Then, execute scv.pp.filter_and_normalize()
on this layer. Avoid using the data
layer from Seurat
and run scv.pp.filter_and_normalize()
again, as it is already the log-normalized version of the counts
.
Hi @WeilerP , thanks for the great package and all your efforts in maintaining it!
I was able to replicate the error above as in the scripts below. I was wondering whether there's is a way to calculate RNA velocities and velocity streams independently per cluster (or batch) in the stochastic/deterministic mode so to allow the accounting of different dynamics per cluster (or batch). I'm aware of recalculating velocities while accounting for differential kinetics per cluster in the dynamical mode but the mode doesn't work well for my data. Do I have to subset the different clusters into separate anndata objects and run RNA velocities and then merge the objects back together? I was thinking 'groupby' can be used to condition for the different clusters but it seems it has to be used in combination with 'group' to restrict to RNA velocity calculation to just one(or more) cluster rather than perform RNA velocity for all cell conditioning for each cluster.
Error output
```pytb computing velocities --------------------------------------------------------------------------- LinAlgError Traceback (most recent call last) Input In [408], inVersions
```pytb scvelo==0.2.5.dev71+g85295fc scanpy==1.9.1 anndata==0.7.8 loompy==3.0.7 numpy==1.21.5 scipy==1.8.0 matplotlib==3.5.1 sklearn==1.0.2 pandas==1.4.2 Numba: Attempted to fork from a non-main thread, the TBB library may be in an invalid state in the child process. ERROR: XMLRPC request failed [code: -32500] RuntimeError: PyPI's XMLRPC API is currently disabled due to unmanageable load and will be deprecated in the near future. See https://status.python.org/ for more information. ```