Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running tutorial and dependencies #18

Open
leonardogolinelli opened this issue Aug 11, 2023 · 0 comments
Open

Running tutorial and dependencies #18

leonardogolinelli opened this issue Aug 11, 2023 · 0 comments

Comments

@leonardogolinelli
Copy link

leonardogolinelli commented Aug 11, 2023

Hello,
I tried to run the tutorial locally and encountered some problems, here is the list of problems and solutions:

1) Jax method ShapedArray is deprecated.
ImportError: cannot import name 'ShapedArray' from 'jax'
solution: downgrade Jax to 0.4.7

2) error on velocity graph computation using scvelo
ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 2 dimensions. The detected shape was (1, 4) + inhomogeneous part.
solution:
install scvelo from the master branch (as already explained in scvelo repo issues)

3) multi dimensional indexing on pandas is deprecated.
"Multi-dimensional indexing (e.g. obj[:, None]) is no longer supported. Convert to a numpy array before indexing instead."
solution:
add line:
scaling = scaling.to_numpy()
before:
adata.layers["fit_t"] = latent_time.values * scaling[np.newaxis, :]
in function:
add_velovi_outputs_to_adata

4) df output is tuple instead of dataframe in the function:
compute_extrinisic_uncertainty
solution:
substitute:
df = _compute_directional_statistics_tensor(extrapolated_cells, n_jobs=-1, n_cells=adata.n_obs)
with:
df, cosine_sims = _compute_directional_statistics_tensor(extrapolated_cells, n_jobs=-1, n_cells=adata.n_obs)
(this was already reported in #15 )

Here's how I installed the environment on linux (the order sometimes is important):
remark 1 - recommend using mamba instead of conda whenever possible
remark 2 -Probably better to follow these steps when using an active gpu

  1. install pytorch following https://pytorch.org/ - mamba install.. (follow link)
  2. install conda notebook - mamba install -c anaconda notebook
  3. install scvelo from master branch - cd to scvelo cloned repo then pip install .
  4. install velovi from master branch - cd to velovi cloned repo then pip install .
  5. downgrade jax to 0.4.7 - mamba install -c conda-forge jax=0.4.7

Hope it helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant