Open Santanevrgivup opened 3 weeks ago
Hi,
The result means that the fit_marginal
fails for all the genes. This is usually caused by some errors in the input data (output of construct_data
). Could you set all n_cores = 1
and check the error message?
Best, Dongyuan
Dear Dongyuan, Following your suggestion, I set all n.cores values to 1 and checked the output of the construct_data function. I couldn't find any anomalies. So the output of fit_marginal still results in all empty values, and this process didn't produce any error messages. Could you please provide me with some further guidance? I greatly appreciate your help.
This is weird. Could you share your sce data with me? You can mask the gene names if you are worried about data leaking. I can check it.
Best, Dongyuan
Of course, it would be my pleasure!This data is public, so there are no concerns about data leakage. Please feel free to proceed without any worries.This compressed file contains three files: 'input_sce' is the sce_obj that has been preprocessed and is ready to be input into construct_data, 'code.R' contains part of the relevant code, and 'GSM418~' is the raw data. Thank you again! Santa Check.zip
@Santanevrgivup Hi Santa,
I found the problem. Please convert your spatial locations (spatial1, spatial2
) from chr
to numeric
. Now they are characheters so that the model cannot fit.
Best, Dongyuan
Hi Dongyuan,
The problem has been solved by following your suggestion! Thank you once again for your patient guidance. Sincerely wish you good health and lasting academic vigor!
Santa
my code: data <- construct_data( sce = sce, assay_use = "counts", celltype = "cell_type", pseudotime = NULL, spatial = c("spatial1", "spatial2"), other_covariates = NULL, corr_by = "1" ) marginal <- fit_marginal( data = data, predictor = "gene", mu_formula = "s(spatial1, spatial2, bs = 'gp', k= 50)", sigma_formula = "1", family_use = "nb", n_cores = 10, usebam = FALSE ) origin data is from tech DBiT-seq, and with dim(1988*1662) after preprocessed.
here is the output of fit_marginal function
so in the next step(fit_copula) also report errors like this : Error in
colnames<-
(*tmp*
, value = rownames(sce)) : attempt to set 'colnames' on an object with less than two dimensions Calls: fit_copula -> convert_n -> colnames<- In addition: Warning message: In mclapply(seq_len(n), do_one, mc.preschedule = mc.preschedule, : all scheduled cores encountered errors in user code Execution halted I would greatly appreciate your help!