scverse / scverse/scanpy

sc.tl.rank_genes_groups truncates gene ids to 50 bytes/char

Open
#949 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Ran in to this problem becouse I have gene names longer than U50
as found in this line
https://github.com/theislab/scanpy/blob/master/scanpy/tools/_rank_genes_groups.py#L433

This silently truncates rank genes to 50 characters and the gene groups can't be used to plot or otherwise search indices of my data.

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 in scanpy/tools/_rank_genes_groups.py around line 433 and reproduce the issue with gene identifiers longer than 50 characters. Trace how the truncated identifiers are stored and used for plotting or index lookup; done means rank_genes_groups preserves the original identifiers so downstream searches and plots work.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
bioinformatics
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.