Jiaxin-Fan / MuSiC2

cell type deconvolution for multi-condition bulk RNA-seq data
22 stars 2 forks source link

argument "bulk.mtx" is missing, with no default #7

Open agctu-zhang opened 1 year ago

agctu-zhang commented 1 year ago

Hi, I'm learning how to use MuSiC2. When I'm running the sample code in tutorial, an error happened to me. So, how to deal it.

///

music2 deconvolution

set.seed(1234) est.prop = MuSiC2::music2_prop(bulk.eset = benchmark.eset, sc.eset = seger.eset, condition='group', control='healthy', case='t2d', clusters = 'cellType', samples = 'sampleID', select.ct = c('acinar','alpha','beta','delta','ductal','gamma'), n_resample=20, sample_prop=0.5,cutoff_c=0.05,cutoff_r=0.01)$Est.prop

Error in rownames(bulk.mtx) : argument "bulk.mtx" is missing, with no default

My code

# BiocManager::install('TOAST')
# devtools::install_github( repo = "crhisto/xbioc")

# install devtools if necessary
if (!"devtools" %in% rownames(installed.packages())) {
  install.packages('devtools')
}
# install MuSiC package
if (!"MuSiC" %in% rownames(installed.packages())) {
  devtools::install_github('xuranw/MuSiC')
}
# install the MuSiC2 package
if (!"MuSiC2" %in% rownames(installed.packages())) {
  devtools::install_github('Jiaxin-Fan/MuSiC2')
}
library(MuSiC)
library(MuSiC2)
###################用示例数据学习一下结构#################
## Bulk RNA-seq data
benchmark.eset = readRDS("~/MuSiC2-master/vignettes/data/bulk-eset.rds")
benchmark.eset
# clinical conditions
table(benchmark.eset$group)
## scRNA-seq data
seger.eset = readRDS("~/MuSiC2-master/vignettes/data/single-eset.rds")
seger.eset
# music2 deconvolution
set.seed(1234)
est.prop = MuSiC2::music2_prop(bulk.eset = benchmark.eset, sc.eset = seger.eset, condition='group', control='healthy',
                       case='t2d', clusters = 'cellType', samples = 'sampleID', 
                       select.ct = c('acinar','alpha','beta','delta','ductal','gamma'), 
                       n_resample=20, sample_prop=0.5,cutoff_c=0.05,cutoff_r=0.01)$Est.prop
laura-munatx commented 1 year ago

Hi @Siva-Zhang ! I have the same problem using my own data. Have you found a way to resolve it?

Thanks!

agctu-zhang commented 1 year ago

Try this tutorial -- https://xuranw.github.io/MuSiC/articles/pages/MuSiC2.html

Laura Sans @.***> 于2023年4月12日周三 18:41写道:

Hi @Siva-Zhang https://github.com/Siva-Zhang ! I have the same problem using my own data. Have you found a way to resolve it?

Thanks!

— Reply to this email directly, view it on GitHub https://github.com/Jiaxin-Fan/MuSiC2/issues/7#issuecomment-1505054016, or unsubscribe https://github.com/notifications/unsubscribe-auth/A632OKKP5NWCFIYYT5772G3XA2BGVANCNFSM6AAAAAAWODHMM4 . You are receiving this because you were mentioned.Message ID: @.***>

spatts14 commented 1 year ago

Did anyone get this working?

laura-munatx commented 1 year ago

@spatts14 hi, I tried the tutorial @Siva-Zhang posted and worked. For me there was a problem with the installation for MuSiC. I uninstalled everything and I did followed the tutorial installing only MuSiC (not MuSiC2) from scratch like this:

# install devtools if necessary
[install.packages](https://rdrr.io/r/utils/install.packages.html)('devtools')

# install the MuSiC package
devtools::[install_github](https://remotes.r-lib.org/reference/install_github.html)('xuranw/MuSiC')

# load
[library](https://rdrr.io/r/base/library.html)([MuSiC](https://github.com/xuranw/MuSiC))
spatts14 commented 1 year ago

I'll give that a shot! Thanks so much! @laura-munatx did you end up running MuSic or MuSci2 for your data?

Also - I got this error now: Error in h(simpleError(msg, call)) : error in evaluating the argument 'j' in selecting a method for function '[': no slot of name "colData" for this object of class "ExpressionSet"

Is that something you experienced as well?

laura-munatx commented 1 year ago

@spatts14 i ran MuSiC which has the functions of MuSiC2 as well.

No, I did not get this error. Maybe try running their whole example/tutorial and then looking at the data format at each step so you know your own data is the same format.

spatts14 commented 1 year ago

I tried running the example and thats the error I got :( @laura-munatx When you downloaded the data, did you download it from the MuSic or MuSci2 data? Im wondering if its a file issue...

laura-munatx commented 1 year ago

For me was a problem of mix of versions MuSiC vs MuSiC2. I uninstalled everything and only focused on the tutorial having only MuSiC installed.

spatts14 commented 1 year ago

@laura-munatx Thanks! I'll troubleshoot and sort it out. Really appreciate your responses!

I got it working - the issue was I wasn't able to download the correct data files with the link provided as the scRNAseq data link was broken.