xuranw / MuSiC

Multi-subject Single Cell Deconvolution
https://github.com/xuranw/MuSiC
GNU General Public License v3.0
220 stars 83 forks source link

music_prop_t_statistics matrix vs ExpressionSet issue #107

Open jaclynbeck-sage opened 1 year ago

jaclynbeck-sage commented 1 year ago

The function music_prop_t_statistics seems to expect a matrix as input for both bulk.control.mtx and bulk.case.mtx, and works that way for most of the function. However, at one point it calls

case_s = exprs(bulk.case[exp_genel, colnames(bulk.case) %in% 
        id_d])

This fails because bulk.case is a matrix, not an ExpressionSet. But you can't call the music_prop_t_statistics function successfully using an ExpressionSet for arguments.

I think removing the exprs call should work? i.e.

case_s = bulk.case[exp_genel, colnames(bulk.case) %in% 
        id_d]
ProsperP commented 1 year ago

Hi @jaclynbeck-sage, I also ran in to this problem, and this is needed to be solved urgently. Besides, I think the correct function name should be music2_prop_t_statistics : ).

For myself, I solved this by copying music2_prop_t_statistics function to an R script file and modifying the code. Then, one can import the correct function by sourcing this R script through Source('path_to_R_script'). Hoping this could help, and hoping the problem could be solved officially. Thanks in advance @xuranw.

nadinegheziel commented 1 year ago

Hello ! I had the same issue but modifying the source code as you said worked for me @ProsperP

case_s = bulk.case[exp_genel, colnames(bulk.case) %in% id_d] It works @jaclynbeck-sage

Thank to both of you ! Nice day