sc.tl.score_genes use_raw = None does not default to True
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.6k
- Forks
- 779
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 27
Description
- I have checked that this issue has not already been reported.
- I have confirmed this bug exists on the latest version of scanpy.
- (optional) I have confirmed this bug exists on the master branch of scanpy.
Hi, in sc.tl.score_genes, there's nothing to catch use_raw=None before this line:
https://github.com/theislab/scanpy/blob/4e4e6abe9f073bcf87db4f3f3d9c8964765c8921/scanpy/tools/_score_genes.py#L102
Hence use_raw = None is the same as use_raw = False, even if _check_raw happens later.
The current description says:
use_raw
Whether to use `raw` attribute of `adata`. Defaults to `True` if `.raw` is present.
Linking the relevant code from the start of function to line of issue:
https://github.com/theislab/scanpy/blob/4e4e6abe9f073bcf87db4f3f3d9c8964765c8921/scanpy/tools/_score_genes.py#L40-L111
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in scanpy/tools/_score_genes.py at the sc.tl.score_genes code around the linked line. Reproduce the behavior with use_raw=None when an AnnData object has raw data, then verify the documented default is honored and add regression coverage for that case.
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
- 55/100