Argument assay.type.ref was not taken into account - #306
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
A regression test covering the assay.type.ref behavior should be added (and the introduced tab indentation fixed) to prevent future breakage.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR fixes a bug in SingleR() where the reference assay selection (assay.type.ref) was not propagated into the internal trainSingleR() call, causing failures when the normalized assay in the reference dataset was not named "logcounts".
Changes:
- Pass
assay.type.refintotrainSingleR()via itsassay.typeargument. - Minor formatting change in the
trainSingleR()argument list (indentation).
File summaries
| File | Description |
|---|---|
| R/SingleR.R | Ensures assay.type.ref is respected when training on reference objects with non-default assay names. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| restrict = restrict, | ||
| test.genes=rownames(test), | ||
| check.missing=check.missing.ref, | ||
| assay.type=assay.type.ref, |
Spaces instead of tabs Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Add test for SingleR with renamed assay types
|
Thanks for the fix. Looks mostly good, though I would use Did Copilot invite itself in? I don't remember enabling this. |
Sure, should I make the change, or do you take care of this?
Yes 😂 |
|
I'll take care of it, I need to do a little administrivia anyway (e.g., NEWS, DESCRIPTION). Also need to figure out how to kick copilot out of this repo. Its involvement here is pretty innocuous but you never know when it'll slip in some proprietary code. |
This caused
SingleRto fail if the normalized assay was not calledlogcountsin the reference dataset.I simply added it in the
trainSingleR()call