Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edge case where all perturbations are NP #5

Open
chriswzou opened this issue Feb 26, 2024 · 1 comment
Open

Edge case where all perturbations are NP #5

chriswzou opened this issue Feb 26, 2024 · 1 comment

Comments

@chriswzou
Copy link

chriswzou commented Feb 26, 2024

Hi! Another issue - also happy to help fix this one if a quick PR is helpful. I was doing some testing of a single perturbation before starting a long run of them, and found that when perturbations all turn out to be NP, the RunMixscale function errors out.

It looks like it might be coming from this line of the code, where the cell types are drawn from the name of the first perturbation added to gv.list. In cases where gv.list is empty however—which I think happens when all the perturbations are NP—I get a subscript out of bounds error coming from trying to access gv.list[[1]].

One fix for this could be to derive the cell types from the splits variable.

@longmanz
Copy link
Collaborator

longmanz commented Mar 4, 2024

Hi @chriswzou ,
Thank you for catching this bug! You are definitely right that this is driven by the edge case when all perturbations are NP. We have commented out that line of code to avoid this.
Additionally, now we will throw a warning message to users if all the perturbations are NP and gv.list is empty.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants