scverse / scverse/scanpy

Violin plot should allow to specify gene_symbols column in .var to use

Open
#1,794 1 comment 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

  • Additional function parameters / changed functionality / changed defaults?
  • New analysis tool: A simple analysis tool you have been using and are missing in sc.tools?
  • New plotting function: A kind of plot you would like to seein sc.pl?
  • External tools: Do you know an existing package that should go into sc.external.*?
  • Other?

Currently for most plots (where it makes sense) you can specify the column of .var which contains gene symbols. This doesn't seem to work for sc.pl.violin because

https://github.com/theislab/scanpy/blob/c488909a54e9ab1462186cca35b537426e4630db/scanpy/plotting/_anndata.py#L727

is not getting passed a gene_symbols argument when called from violin (that method does accept that argument). This should be an easy fix and make violin plot behave a bit more closely to the other plots. Happy to submit a PR.

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

Open scanpy/plotting/_anndata.py around line 727 and trace the sc.pl.violin call. Verify how the called method accepts gene_symbols and confirm that violin plots use the selected .var column when the option is provided.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-visualization
Issue type
Feature
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.