scverse / scverse/scanpy

Simpler gene annotations in plotting functions

Open
#646 8 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

We typically have some marker information in the form of an Excel sheet, pandas DataFrame, and eventually a Python dictionary. Using these as gene annotations in various plotting functions (not pl.rank_genes_groups_* family but the others) is a very common task and it looks awesome thanks to @fidelram's var_group_* parameters.

It would be even more fantastic to be able to pass simple dict (e.g. the ones we already use in Malte's marker_gene_overlap) to plotting functions where var_group_positions and var_group_labels are populated automatically.

One caveat is that there might be genes covered by multiple keys, but this is similar to supplying overlapping var_group_positions in current api, which can exit with an error.

I already have a function for that but it's absolutely super ugly. I can send a PR after tidying it up, but if anyone else wants to do it, it's perfectly fine.

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 inspecting the plotting functions that accept var_group_positions and var_group_labels, then compare their inputs with the marker_gene_overlap API. Done means a simple gene-to-group dictionary automatically populates the group positions and labels for the applicable plotting functions, while preserving the existing behavior for overlapping genes.

Written by the indexing model from the issue text.

Assessment

Tech stack
pandas, python
Domain
data-visualization
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.