scverse / scverse/scanpy

sc.pp.regress_out and sc.pp.highly_variable interplay

Open
#722 3 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

Hi all,

I've been wondering about this for a while. As sc.pp.regress_out only leaves residuals, the resulting expression values have 0 mean. Thus, you can no longer use sc.pp.highly_variable afterwards (it bins by mean expression value per gene). This seems like a bad idea. An easy fix would be to also keep the intercept value and not only the residuals from sc.pp.regress_out. What do you guys think?

If this sounds like a good idea to you, I will put it on my todo list for a pull request.

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 reading the sc.pp.regress_out and sc.pp.highly_variable entry points mentioned in the issue. Verify how regress_out produces residuals and how highly_variable uses mean expression, then define done as preserving enough intercept information for highly_variable to work afterward. No specific files or tests are named, so locating the relevant implementation and coverage is part of the investigation.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
bioinformatics
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.