broadinstitute / infercnv

Inferring CNV from Single-Cell RNA-Seq
Other
557 stars 164 forks source link

Error in step 18 "Run Bayesian Network Model on HMM predicted CNVs" when using more cells? #590

Open ahdee opened 1 year ago

ahdee commented 1 year ago

Hi my command is a follow

infercnv_obj = CreateInfercnvObject(raw_counts_matrix=counts_matrix,
                                    annotations_file="annotation2.tab",
                                    delim="\t",
                                    gene_order_file="hg38_gencode_v27.txt",
                                    ref_group_names= unique ( annt[grepl ( "Normal", annt$V2), ]$V2 ),
                                    max_cells_per_group = 1200 # downsampling - may be set 1K 
)

infercnv_obj2 = infercnv::run(infercnv_obj,
                              cutoff=0.1, # cutoff=1 works well for Smart-seq2, and cutoff=0.1 works well for 10x Genomics
                              out_dir=out_dir, 
                              cluster_by_groups=TRUE, 
                              denoise=TRUE,
                              cluster_references = F,
                              HMM=TRUE
                              , num_threads = 15 
                              )

the above runs fine to completion, however when I set max_cells_per_group = to something like 5000 I get the error below. I even try reducing the num_threads but results in the same error. Its not memory bc I'm only using half of what is available.

STEP 18: Run Bayesian Network Model on HMM predicted CNVs

INFO [2023-08-23 21:37:11] Initializing new MCM InferCNV Object.
INFO [2023-08-23 21:37:11] validating infercnv_obj
INFO [2023-08-23 21:37:12] Total CNV's:  476
INFO [2023-08-23 21:37:12] Loading BUGS Model.
INFO [2023-08-23 21:37:15] Running Sampling Using Parallel with  10 Cores
INFO [2023-08-24 11:00:27] Obtaining probabilities post-sampling
Error in do.call(rbind, mcmc[[j]]) : second argument must be a list
In addition: Warning message:
In parallel::mclapply(seq_along(obj@cell_gene), FUN = par_func,  :
  scheduled core 10 did not deliver a result, all values of the job will be affected

verion: infercnv_1.10.1

thanks in advance!