scverse / scverse/scanpy

Is automatic sanitisation necessary?

Open
#1,747 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

In several Scanpy functions sanitize_anndata() is called which converts most string columns in obs/var to categorical columns. Often this seems to be a precaution rather than really necessary and as a user it's frustrating to have things changed in a way you have no control over. Just wondering if you have considered how required this is and whether it would be better to let users control when/if this happens.

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 locating the Scanpy functions that call sanitize_anndata() and inspect how string columns in obs and var are converted to categorical columns. Determine which callers require this behavior and whether user control is feasible. Done means the necessity and desired control behavior are resolved and reflected in the relevant implementation or documentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.