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

music2 bug when select.ct = NULL #131

Open
ErikTheBlacksmith opened this issue Jul 10, 2024 · 0 comments
Open

music2 bug when select.ct = NULL #131

ErikTheBlacksmith opened this issue Jul 10, 2024 · 0 comments

Comments

@ErikTheBlacksmith
Copy link

ErikTheBlacksmith commented Jul 10, 2024

Howdy,
I was debugging music_prop2() in the music2.R file and came across an error that occurs when select.ct = NULL
the problem stems from line 91: ncell = length(select.ct). since select.ct = NULL, this results in a length of 0 instead of the actual number of cell types (all of them) and then MOD0 and MOD1 will be the wrong size.

I am not familiar with making pull requests (sorry about that), but this problem should be fixed by replacing that line (91) with something like:

if (isnull(select.ct)) {
  ncell = length(unique(  sc.sce@colData[, clusters]  ))
} else {
  ncell = length(select.ct)
}

I did not test it there, but it appears to also be the case for the other two functions in the file at lines 315 and 542. In addition, there is no default value for select.ct in all of those functions in that file instead of NULL as the documentation states.

I hope this is helpful,
Erik

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

1 participant