broadinstitute / infercnv

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

Error in NGCHM::chmNewColorMap after updating inferCNV #607

Open frsil opened 11 months ago

frsil commented 11 months ago

Hello, I recently updated inferCNV from version 1.14.2 to version 1.17.0 and I am now getting an error when I try to create an infercnv.ngchm file from an inferCNV object.

This is the code I am using, which used to work for inferCNV objects generated using the previous version:

library(infercnv)
library(infercnvNGCHM)
library(NGCHM)
library(tsvio)
library(RColorBrewer)
library(NGCHMSupportFiles)

infercnv_outdir = "path/to/infercnv/output"
infercnv_obj = readRDS(paste(infercnv_outdir,"run.final.infercnv_obj",sep=""))
ngchm(infercnv_obj = infercnv_obj,
        out_dir = infercnv_outdir,
        path_to_shaidyMapGen = NULL 
)

The error message I get is the following one: Error in NGCHM::chmNewColorMap(values = as.vector(dendrogram_unique_group), : chmNewColorMap: number of values (1676) does not equal number of color (1272). It should.

I initially thought this might be related to the fact that the new version of inferCNV shows subcluster information on the left-most color bar, which now contains lots of different colors in my heatmap. However, I was not able to fix it and I was wondering if you could kindly help me.

Thank you! Francesca