TypeError: bbknn() got an unexpected keyword argument 'n_trees'
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.6k
- Forks
- 779
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 27
Description
Hello, When I use sc.external.pp.bbknn(adata, batch_key='group'), group is batch in my datasets. something wrongs :
TypeError Traceback (most recent call last)
/tmp/ipykernel_173326/699274021.py in <module>
----> 1 sc.external.pp.bbknn(adata, batch_key='group')
~/.local/lib/python3.7/site-packages/scanpy/external/pp/_bbknn.py in bbknn(adata, batch_key, approx, metric, copy, n_pcs, trim, n_trees, use_faiss, set_op_mix_ratio, local_connectivity, **kwargs)
118 set_op_mix_ratio=set_op_mix_ratio,
119 local_connectivity=local_connectivity,
--> 120 **kwargs,
121 )
~/.local/lib/python3.7/site-packages/bbknn/__init__.py in bbknn(adata, batch_key, use_rep, approx, use_annoy, metric, copy, **kwargs)
123 #call BBKNN proper
124 bbknn_out = bbknn_matrix(pca=pca, batch_list=batch_list, approx=approx,
--> 125 use_annoy=use_annoy, metric=params['metric'], **kwargs)
126 #store the parameters in .uns['neighbors']['params'], add use_rep and batch_key
127 adata.uns['neighbors'] = {}
TypeError: bbknn() got an unexpected keyword argument 'n_trees'
How to deal with it ?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The traceback points to scanpy/external/pp/_bbknn.py and the installed bbknn/init.py; start by comparing the versions and function signatures used at those entry points. Reproduce the sc.external.pp.bbknn call and confirm the selected dependency versions handle n_trees without raising TypeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- bioinformatics
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100