Comments (4)
This is due to the new behavior of naming .value_counts()
output to count
or proportion
. I will fix this soon. Before this, you can downgrade pandas to < 2.0.0 as a temporary solution.
https://pandas.pydata.org/docs/whatsnew/v2.0.0.html#value-counts-sets-the-resulting-name-to-count
from celltypist.
Due to some considerations, we have isolated the harmonization and integration modules into a separate tool CellHint, and now CellTypist will be retained as a cell-type-classification-focused tool. If you still have any questions, please refer to CellHint repo, open an issue or let us know.
from celltypist.
@rgranit, do you mind showing all tracebacks?
from celltypist.
@ChuanXu1 sure, here it is:
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
Cell In[26], line 1
----> 1 celltypist.sankeyplot(alignment)
File [~/miniconda3/envs/celltypist_1.5/lib/python3.8/site-packages/celltypist/contro/plot.py:357](https://vscode-remote+ssh-002dremote-002bsuerat-005froy-005fpass.vscode-resource.vscode-cdn.net/homefolder/royg/misc/~/miniconda3/envs/celltypist_1.5/lib/python3.8/site-packages/celltypist/contro/plot.py:357), in sankeyplot(alignment, node_color, novel_node_color, remain_node_color, link_color, title, show, save, width, height, layout_dict, trace_dict, expand_label)
354 else:
355 raise TypeError(
356 f"🛑 Please provide correct input - either a DistanceAlignment or a data frame")
--> 357 trace = _relation_to_data(relation, return_sankey = True)[1]
358 #relation2new_relation is run twice actually, but time cost is negligible; this new relation is row ordered
359 new_relation = _identify_relation_groups(relation, group_prefix = 'Group', order_row = True, order_column = False)[1]
File [~/miniconda3/envs/celltypist_1.5/lib/python3.8/site-packages/celltypist/contro/plot.py:170](https://vscode-remote+ssh-002dremote-002bsuerat-005froy-005fpass.vscode-resource.vscode-cdn.net/homefolder/royg/misc/~/miniconda3/envs/celltypist_1.5/lib/python3.8/site-packages/celltypist/contro/plot.py:170), in _relation_to_data(relation, return_sankey)
168 vc[['source', 'target']] = vc['index'].str.split(SEP2, expand=True).values
169 vc.rename(columns = {0: 'value'}, inplace = True)
--> 170 link = pd.concat([link, vc[['source', 'target', 'value']]])
171 source = refer.loc[link.source.values, 'index'].values
172 target = refer.loc[link.target.values, 'index'].values
File [~/miniconda3/envs/celltypist_1.5/lib/python3.8/site-packages/pandas/core/frame.py:3767](https://vscode-remote+ssh-002dremote-002bsuerat-005froy-005fpass.vscode-resource.vscode-cdn.net/homefolder/royg/misc/~/miniconda3/envs/celltypist_1.5/lib/python3.8/site-packages/pandas/core/frame.py:3767), in DataFrame.__getitem__(self, key)
3765 if is_iterator(key):
3766 key = list(key)
-> 3767 indexer = self.columns._get_indexer_strict(key, "columns")[1]
3769 # take() does not accept boolean indexers
...
5938 raise KeyError(f"None of [{key}] are in the [{axis_name}]")
5940 not_found = list(ensure_index(key)[missing_mask.nonzero()[0]].unique())
-> 5941 raise KeyError(f"{not_found} not in index")
KeyError: "['value'] not in index"
Output is truncated. View as a [scrollable element](command:cellOutput.enableScrolling?2bc49026-6fac-44f7-bf3a-a334c431fd91) or open in a [text editor](command:workbench.action.openLargeOutput?2bc49026-6fac-44f7-bf3a-a334c431fd91). Adjust cell output [settings](command:workbench.action.openSettings?%5B%22%40tag%3AnotebookOutputLayout%22%5D)...
from celltypist.
Related Issues (20)
- Harmonizing datasets with missing annotations HOT 1
- type error when the input is Anndata HOT 8
- 503 error in models.download_models HOT 2
- download_models corrupts models.json when the server is unavailable HOT 3
- Issue with downloading models: 503 Server Error HOT 4
- reannotation returns many "UNASSIGNED" cells HOT 2
- T helper cells HOT 1
- `ImportError` with `sklearn==1.3.0` HOT 3
- impatiently waiting for V2 (but very excited) HOT 2
- SGDClassifier / InvalidParameterError: The 'loss' parameter of SGDClassifier must be a str HOT 2
- certificate verification failed when trying to load models HOT 2
- Can not import celltypist HOT 1
- Error in downloading models
- Error happened in models HOT 8
- Invalid expression matrix in `.X`, expect log1p normalized expression to 10000 counts per cell; will try the `.raw` attribute HOT 10
- KeyError when insert conf of majority_voting under `porb match` mode HOT 2
- Preparing custom reference files HOT 2
- Error running celltypist HOT 10
- Allow to specify the AnnData var field that has the gene_symbols instead of only relying on var_names HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from celltypist.