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 issue: Error in MOD0 + mod0 : non-conformable arrays #106

Open
jaclynbeck-sage opened this issue Nov 7, 2022 · 8 comments
Open

Comments

@jaclynbeck-sage
Copy link

Running music2_prop, the following issue happens if 'select.ct' argument = NULL. It's allowed to be NULL in the original music_prop, and a NULL value means "use all cell types in the metadata" for that function. The documentation for music2_prop also says this. However there's no check or logic for the case where select.ct = NULL in music2_prop, so when it gets to the iteration loop it creates a MOD0 matrix with 0 rows:

ncell = length(select.ct) # returns 0 for select.ct = NULL
...
MOD0 = MOD1 = matrix(0L, nrow = ncell, ncol = length(exp_genel))

I can get around this by putting an actual value for select.ct when calling the function, however, could you change the documentation to match the code, or code to match documentation?

@jaclynbeck-sage
Copy link
Author

Also this same issue appears in music2_prop_toast and music2_prop_t_statistics.

@spatts14
Copy link

spatts14 commented Jun 22, 2023

Hi @jaclynbeck-sage, what exactly you put for the select.ct value? Im assuming you just put all the cell types once, not label a list per cell - correct? Does it need to in the form of a list? It looks like they did update it to be c("Cell type", "etc").

I got this error: Error in MOD0 + mod0 : non-conformable arrays
Calls: music2_prop_t_statistics

So Im trying to trouble shoot it . I had it set as NULL so it would use the single cell as default. Just double checking as this takes me a long time to run!

@jaclynbeck-sage
Copy link
Author

@spatts14 Yes, I just put a vector of cell types: c('type1', 'type2', 'type3', ..., 'typeZ') (unique values, not a list per cell). That seemed to work ok.

@JoyOtten
Copy link

Hi I still have the same problem even when I put the cell types in a character vector.

@gevro
Copy link

gevro commented Apr 19, 2024

Hi, I am getting the same issue.

@JoyOtten
Copy link

Hi, I think this issue has to do with the construction of your datasets. See here the code that I used for MuSiC (v1) version https://github.com/klengellab/Ska2/blob/main/Deconvolution_MuSic.R
This worked for me.

@gevro
Copy link

gevro commented Apr 19, 2024

Thanks, but the issue is specific to music2 functions. Music v1 works fine. So your code I don't think helps this issue.

@rob-meller
Copy link

Has there been any resolution to this issue.? When I run my two data sets individually through MuSiC using a vector of cell_types, they work. Then I run them together with MuSiC2 we get the "Error in MOD0 + mod0 : non-conformable arrays". THX

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

5 participants