broadinstitute / infercnv

Inferring CNV from Single-Cell RNA-Seq
Other
555 stars 163 forks source link

error using scale_data and HMM #443

Open msherafatian opened 2 years ago

msherafatian commented 2 years ago

Hi Thank you for helping us resolving the issues. I have references from a different scRNA-seq experiment, so I am using the scale_data = T. When I use this option with HMM = T, I get this error:

Error in nn2(t(tumor_expr_data), k = k_nn) : NA/NaN/Inf in foreign function call (arg 1) In addition: There were 50 or more warnings (use warnings) to see the first 50)

My code:

infercnv_obj_default = infercnv::run( infercnv_obj, scale_data = T, cutoff=0.1, out_dir = out_dir, cluster_by_groups = T, cluster_references = F, sd_amplifier = 1.95, ref_subtract_use_mean_bounds = F, denoise=TRUE, HMM=T, analysis_mode = "subclusters" )

GeorgescuC commented 2 years ago

Hi @msherafatian ,

The scale_data option is not something we really use anymore so I am not sure what is happening. However since the error is happening in the Leiden subclustering, I recommend updating your install to the master branch of infercnv (will be released as a new version soon) as it replaces the library used and improves on how it is performed. This should also get ride of the warnings.

Regards, Christophe.