bbknn integrates multiple variables
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.6k
- Forks
- 779
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 27
Description
Dear author,
Can bbknn integrate multiple variables?such as Platform and Individual.
Looking forward your reply
Siyu
sc.external.pp.bbknn(mydata, batch_key=["Platform","Individual_2"],n_pcs=50,set_op_mix_ratio=ratio)
computing batch balanced neighbors
Traceback (most recent call last):
File "", line 1, in
File "/home/scCell2/miniconda3/lib/python3.8/site-packages/scanpy/external/pp/_bbknn.py", line 134, in bbknn
return bbknn(
File "/home/scCell2/miniconda3/lib/python3.8/site-packages/bbknn/init.py", line 110, in bbknn
if batch_key not in adata.obs:
File "/home/scCell2/miniconda3/lib/python3.8/site-packages/pandas/core/generic.py", line 1721, in contains
return key in self._info_axis
File "/home/scCell2/miniconda3/lib/python3.8/site-packages/pandas/core/indexes/base.py", line 4071, in contains
hash(key)
TypeError: unhashable type: 'list
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
Start at the sc.external.pp.bbknn entry point and read scanpy/external/pp/_bbknn.py together with bbknn/init.py, the locations shown in the traceback. Run the reported call with multiple batch keys first; done means multiple variables are accepted without the shown TypeError and the integration behavior is verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data, machine-learning
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100