SONGDONGYUAN1994 / scDesign3

scDesign3 generates realistic in silico data for multimodal single-cell and spatial omics
https://songdongyuan1994.github.io/scDesign3/docs/index.html
MIT License
86 stars 24 forks source link

Error in UseMethod("family"): no applicable method for 'family' applied to an object of class "NULL" #64

Open MohammadIzadi opened 1 month ago

MohammadIzadi commented 1 month ago

Hi, Thanks for developing scDesign3. I have SingleCellExperiment object. I want to simiulate it with scDesign3. but i get this error.

example_simu <- scdesign3(

  • sce = data,
  • assay_use = "counts",
  • celltype = "celltype",
  • pseudotime = NULL,
  • spatial = NULL,
  • other_covariates = NULL,
  • mu_formula = "celltype",
  • sigma_formula = "celltype",
  • family_use = "gaussian",
  • n_cores = 1,
  • corr_formula = "celltype",
  • )

Input Data Construction Start Input Data Construction End Start Marginal Fitting Marginal Fitting End Start Copula Fitting Convert Residuals to Multivariate Gaussian Error: BiocParallel errors 1 remote errors, element index: 1 5 unevaluated and other errors first remote error: Error in UseMethod("family"): no applicable method for 'family' applied to an object of class "NULL".

Can you help me to fix it please?

SONGDONGYUAN1994 commented 1 month ago

Hi,

Could you check the format of your input data? I saw you used assay_use = 'counts' (count data rather than log transformed data), which usually means family_use should be nb or poisson rather than gaussian.