-
Notifications
You must be signed in to change notification settings - Fork 46
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
Proper use of the "Lineages" Parameter for Lineage Drivers #1182
Comments
@jwalewski please provide a code snippet to understand the exact workflow and the versions of the Python packages. |
The exact code snippet would be:
Package versions:
|
Thanks, @jwalewski. We need a complete code snippet of the workflow, i.e., especially the CellRank part; ideally, you can also share how you processed the data. |
Understood. I'll address the versions questions first as the code block is long. So, I attempted to create a new conda enviornment with the most up to date version of cellrank (and ONLY that), however, I got an error with scanpy:
So naturally, I tried upgrading scanpy and then conda wanted me to downgrade CellRank back to 2.0.0 - any idea of what's going on here?
Here's the entire code block for my CellRank analysis- and the portion about CellRank's combined kernels are at the end.
|
also facing issue Code
import scvelo as scv
import scanpy as sc
import cellrank as cr
import numpy as np
import pandas as pd
import anndata as ad
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
Cell In[14], line 3
1 import scvelo as scv
2 import scanpy as sc
----> 3 import cellrank as cr
4 import numpy as np
5 import pandas as pd
File [~/miniforge3/envs/scFates/lib/python3.11/site-packages/cellrank/__init__.py:3](http://localhost:8888/lab/tree/~/miniforge3/envs/scFates/lib/python3.11/site-packages/cellrank/__init__.py#line=2)
1 from importlib import metadata
----> 3 from cellrank import datasets, estimators, kernels, logging, models, pl
4 from cellrank._utils._lineage import Lineage
5 from cellrank.settings import settings
File [~/miniforge3/envs/scFates/lib/python3.11/site-packages/cellrank/pl/__init__.py:2](http://localhost:8888/lab/tree/~/miniforge3/envs/scFates/lib/python3.11/site-packages/cellrank/pl/__init__.py#line=1)
1 from cellrank.pl._aggregate_fate_probs import aggregate_fate_probabilities
----> 2 from cellrank.pl._circular_projection import circular_projection
3 from cellrank.pl._cluster_trends import cluster_trends
4 from cellrank.pl._gene_trend import gene_trends
File [~/miniforge3/envs/scFates/lib/python3.11/site-packages/cellrank/pl/_circular_projection.py:17](http://localhost:8888/lab/tree/~/miniforge3/envs/scFates/lib/python3.11/site-packages/cellrank/pl/_circular_projection.py#line=16)
14 from matplotlib.colors import LinearSegmentedColormap, LogNorm
16 from anndata import AnnData
---> 17 from scanpy._utils import deprecated_arg_names
19 from cellrank import logging as logg
20 from cellrank._utils import Lineage
ImportError: cannot import name 'deprecated_arg_names' from 'scanpy._utils' ([/Users/administrateur/miniforge3/envs/scFates/lib/python3.11/site-packages/scanpy/_utils/__init__.py](http://localhost:8888/Users/administrateur/miniforge3/envs/scFates/lib/python3.11/site-packages/scanpy/_utils/__init__.py))
|
Seems like we are running into the issue described in #1183. Meanwhile, the "lineages" parameter question remains open. |
Thanks a lot for spotting this @jwalewski , will take a look at this. |
Hey, once again checking in on this. So, with updating everything to newest versions cellrank, the driver genes can now be put in a CSV. However, the plots for gene trends are still not working, with the following error:
I've tried hunting down this bug too, and it's ultimately come down (at least I think) to the Here's the code:
And the
Here's the output:
|
@jwalewski I assume this is the line which fails drivers_per_cluster = current_model.compute_lineage_drivers(lineages=current_model.terminal_states.categories) The |
Okay, this works now, but in a similar way I get a similar issue with:
Despite:
Should I keep discussing this here? or create a new issue? |
Hello,
I am attempting to run compute_lineage_drivers(), but no matter what value I set for "lineages" I keep getting a value error.:
The tutorial has it equal to
lineages=["Delta"]
, for example, but when I've tried an array of strings containing the names of states of my cell population, I still get the same value error. I've also tried the slice[:]
on my entire array, and other ways of setting the indices.What's wrong with the way I'm doing it? Any insight is appreciated.
The text was updated successfully, but these errors were encountered: