log1p warning when modifying several layers
Open
Beginner friendly
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.6k
- Forks
- 779
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 27
Description
Hi,
When running something like
sc.pp.log1p(adata)
sc.pp.log1p(adata, layer="spliced")
sc.pp.log1p(adata, layer="unspliced")
I'd get an output like
WARNING: adata.X seems to be already log-transformed.
WARNING: adata.X seems to be already log-transformed.
even though the last two lines supposedly don't touch X. It would be more useful if the check looked at the actual target layer.
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 src/scanpy/preprocessing/_simple.py at the referenced log1p implementation and trace how the warning check selects its data target. Run the three-layer reproduction from the issue, then verify that each warning check uses the requested layer rather than adata.X.
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
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 74/100