scverse / scverse/scanpy

Can't implicitly convert non-string objects to strings. Bug about tl.filter_rank_genes_groups and tl.rank_genes_groups

Open
#2,666 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Closing candidate Needs info❔
Dominant language
Python
Stars
2.6k
Forks
779
Avg merge
1d 4h
Merged PRs (30d)
27

Description

Please make sure these conditions are met
  • I have checked that this issue has not already been reported.
  • I have confirmed this bug exists on the latest version of scanpy.
  • (optional) I have confirmed this bug exists on the master branch of scanpy.
What happened?

When I use sc.tl.filter_rank_genes_groups or sc.tl.filter_rank_genes_groups, I can not write the result file until I delete the output files stored as adata.uns['rank_genes_groups_filtered'] and adata.uns['rank_genes_groups']

Minimal code sample
sc.tl.filter_rank_genes_groups
sc.tl.filter_rank_genes_groups
Both default use
Error output
TypeError: Can't implicitly convert non-string objects to strings

Above error raised while writing key 'names' of <class 'h5py._hl.group.Group'> to /
Versions

anndata: 0.9.2
scanpy version: 1.9.5

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the write failure after using scanpy's tl.filter_rank_genes_groups and tl.rank_genes_groups with the stored adata.uns['rank_genes_groups_filtered'] and adata.uns['rank_genes_groups'] results. Inspect how the names output is written and confirm that the result file can be written without deleting those entries.

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
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.