broadinstitute / infercnv

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

Error while plotting obs_dendrogram #588

Closed ahdee closed 1 year ago

ahdee commented 1 year ago

Hi, thanks for an awesome tool.

I ran this without error until it hit step 15: is there anyway perhaps to just turn of dendogram drawing? is it due to the downsampling?

Error in obs_dendrogram[[1]] : subscript out of bounds
In addition: Warning message:
In max(nchar(obs_annotations_names)) :
  no non-missing arguments to max; returning -Inf

my commands are as follow: verions: infercnv_1.10.1

infercnv_obj = CreateInfercnvObject(raw_counts_matrix=counts_matrix,
                                    annotations_file="annotation.tab",
                                    delim="\t",
                                    gene_order_file="hg38_gencode_v27.txt",
                                    ref_group_names= unique ( pbmc_harmony@meta.data$celltype_fix ),
                                    max_cells_per_group = 1500 # 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,
                             HMM=TRUE)

Here is a more detail log starting in step 12.

STEP 12: removing average of reference data (after smoothing)

INFO [2023-08-22 03:40:26] ::subtract_ref_expr_from_obs:Start inv_log=FALSE, use_bounds=TRUE
INFO [2023-08-22 03:40:26] subtracting mean(normal) per gene per cell across all data
INFO [2023-08-22 03:40:38] -subtracting expr per gene, use_bounds=TRUE
INFO [2023-08-22 03:40:48] -mirroring for hspike
INFO [2023-08-22 03:40:48] ::subtract_ref_expr_from_obs:Start inv_log=FALSE, use_bounds=TRUE
INFO [2023-08-22 03:40:48] subtracting mean(normal) per gene per cell across all data
INFO [2023-08-22 03:40:53] -subtracting expr per gene, use_bounds=TRUE
INFO [2023-08-22 03:42:23] 

    STEP 14: invert log2(FC) to FC

INFO [2023-08-22 03:42:23] invert_log2(), computing 2^x
INFO [2023-08-22 03:42:25] -mirroring for hspike
INFO [2023-08-22 03:42:25] invert_log2(), computing 2^x
INFO [2023-08-22 03:44:09] 

    STEP 15: Clustering samples (not defining tumor subclusters)

INFO [2023-08-22 03:44:09] define_signif_tumor_subclusters(p_val=0.1
INFO [2023-08-22 03:44:09] define_signif_tumor_subclusters(), tumor: chondroblastic
INFO [2023-08-22 03:44:58] cut tree into: 1 groups
INFO [2023-08-22 03:44:58] -processing chondroblastic,chondroblastic_s1
INFO [2023-08-22 03:44:58] define_signif_tumor_subclusters(), tumor: Osteoblast_immature
INFO [2023-08-22 03:46:23] cut tree into: 1 groups
INFO [2023-08-22 03:46:23] -processing Osteoblast_immature,Osteoblast_immature_s1
INFO [2023-08-22 03:46:23] define_signif_tumor_subclusters(), tumor: Osteoblast_int
INFO [2023-08-22 03:47:18] cut tree into: 1 groups
INFO [2023-08-22 03:47:18] -processing Osteoblast_int,Osteoblast_int_s1
INFO [2023-08-22 03:47:18] define_signif_tumor_subclusters(), tumor: myeloid
INFO [2023-08-22 03:48:29] cut tree into: 1 groups
INFO [2023-08-22 03:48:29] -processing myeloid,myeloid_s1
INFO [2023-08-22 03:48:29] define_signif_tumor_subclusters(), tumor: Osteoblast_mature
INFO [2023-08-22 03:49:48] cut tree into: 1 groups
INFO [2023-08-22 03:49:48] -processing Osteoblast_mature,Osteoblast_mature_s1
INFO [2023-08-22 03:49:48] define_signif_tumor_subclusters(), tumor: Stem cell
INFO [2023-08-22 03:51:15] cut tree into: 1 groups
INFO [2023-08-22 03:51:15] -processing Stem cell,Stem cell_s1
INFO [2023-08-22 03:51:15] define_signif_tumor_subclusters(), tumor: Unknown
INFO [2023-08-22 03:52:18] cut tree into: 1 groups
INFO [2023-08-22 03:52:18] -processing Unknown,Unknown_s1
INFO [2023-08-22 03:52:18] define_signif_tumor_subclusters(), tumor: Osteoblast_imm_int
INFO [2023-08-22 03:53:07] cut tree into: 1 groups
INFO [2023-08-22 03:53:07] -processing Osteoblast_imm_int,Osteoblast_imm_int_s1
INFO [2023-08-22 03:53:07] define_signif_tumor_subclusters(), tumor: Osteoclast
INFO [2023-08-22 03:53:55] cut tree into: 1 groups
INFO [2023-08-22 03:53:55] -processing Osteoclast,Osteoclast_s1
INFO [2023-08-22 03:53:55] define_signif_tumor_subclusters(), tumor: Osteocyte
INFO [2023-08-22 03:55:22] cut tree into: 1 groups
INFO [2023-08-22 03:55:22] -processing Osteocyte,Osteocyte_s1
INFO [2023-08-22 03:55:22] define_signif_tumor_subclusters(), tumor: Neutrophils
INFO [2023-08-22 03:56:11] cut tree into: 1 groups
INFO [2023-08-22 03:56:11] -processing Neutrophils,Neutrophils_s1
INFO [2023-08-22 03:56:11] define_signif_tumor_subclusters(), tumor: Es
INFO [2023-08-22 03:57:00] cut tree into: 1 groups
INFO [2023-08-22 03:57:00] -processing Es,Es_s1
INFO [2023-08-22 03:57:00] define_signif_tumor_subclusters(), tumor: MSC
INFO [2023-08-22 03:57:23] cut tree into: 1 groups
INFO [2023-08-22 03:57:23] -processing MSC,MSC_s1
INFO [2023-08-22 03:57:23] define_signif_tumor_subclusters(), tumor: Neural Progenitor cells
INFO [2023-08-22 03:58:23] cut tree into: 1 groups
INFO [2023-08-22 03:58:23] -processing Neural Progenitor cells,Neural Progenitor cells_s1
INFO [2023-08-22 03:58:23] -mirroring for hspike
INFO [2023-08-22 03:58:23] define_signif_tumor_subclusters(p_val=0.1
INFO [2023-08-22 03:58:23] define_signif_tumor_subclusters(), tumor: spike_tumor_cell_chondroblastic
INFO [2023-08-22 03:58:23] cut tree into: 1 groups
INFO [2023-08-22 03:58:23] -processing spike_tumor_cell_chondroblastic,spike_tumor_cell_chondroblastic_s1
INFO [2023-08-22 03:58:23] define_signif_tumor_subclusters(), tumor: spike_tumor_cell_Osteoblast_immature
INFO [2023-08-22 03:58:23] cut tree into: 1 groups
INFO [2023-08-22 03:58:23] -processing spike_tumor_cell_Osteoblast_immature,spike_tumor_cell_Osteoblast_immature_s1
INFO [2023-08-22 03:58:23] define_signif_tumor_subclusters(), tumor: spike_tumor_cell_Osteoblast_int
INFO [2023-08-22 03:58:24] cut tree into: 1 groups
INFO [2023-08-22 03:58:24] -processing spike_tumor_cell_Osteoblast_int,spike_tumor_cell_Osteoblast_int_s1
INFO [2023-08-22 03:58:24] define_signif_tumor_subclusters(), tumor: spike_tumor_cell_myeloid
INFO [2023-08-22 03:58:24] cut tree into: 1 groups
INFO [2023-08-22 03:58:24] -processing spike_tumor_cell_myeloid,spike_tumor_cell_myeloid_s1
INFO [2023-08-22 03:58:24] define_signif_tumor_subclusters(), tumor: spike_tumor_cell_Osteoblast_mature
INFO [2023-08-22 03:58:24] cut tree into: 1 groups
INFO [2023-08-22 03:58:24] -processing spike_tumor_cell_Osteoblast_mature,spike_tumor_cell_Osteoblast_mature_s1
INFO [2023-08-22 03:58:24] define_signif_tumor_subclusters(), tumor: spike_tumor_cell_Stem cell
INFO [2023-08-22 03:58:24] cut tree into: 1 groups
INFO [2023-08-22 03:58:24] -processing spike_tumor_cell_Stem cell,spike_tumor_cell_Stem cell_s1
INFO [2023-08-22 03:58:24] define_signif_tumor_subclusters(), tumor: spike_tumor_cell_Unknown
INFO [2023-08-22 03:58:24] cut tree into: 1 groups
INFO [2023-08-22 03:58:24] -processing spike_tumor_cell_Unknown,spike_tumor_cell_Unknown_s1
INFO [2023-08-22 03:58:24] define_signif_tumor_subclusters(), tumor: spike_tumor_cell_Osteoblast_imm_int
INFO [2023-08-22 03:58:24] cut tree into: 1 groups
INFO [2023-08-22 03:58:24] -processing spike_tumor_cell_Osteoblast_imm_int,spike_tumor_cell_Osteoblast_imm_int_s1
INFO [2023-08-22 03:58:24] define_signif_tumor_subclusters(), tumor: spike_tumor_cell_Osteoclast
INFO [2023-08-22 03:58:24] cut tree into: 1 groups
INFO [2023-08-22 03:58:24] -processing spike_tumor_cell_Osteoclast,spike_tumor_cell_Osteoclast_s1
INFO [2023-08-22 03:58:24] define_signif_tumor_subclusters(), tumor: spike_tumor_cell_Osteocyte
INFO [2023-08-22 03:58:25] cut tree into: 1 groups
INFO [2023-08-22 03:58:25] -processing spike_tumor_cell_Osteocyte,spike_tumor_cell_Osteocyte_s1
INFO [2023-08-22 03:58:25] define_signif_tumor_subclusters(), tumor: spike_tumor_cell_Neutrophils
INFO [2023-08-22 03:58:25] cut tree into: 1 groups
INFO [2023-08-22 03:58:25] -processing spike_tumor_cell_Neutrophils,spike_tumor_cell_Neutrophils_s1
INFO [2023-08-22 03:58:25] define_signif_tumor_subclusters(), tumor: spike_tumor_cell_Es
INFO [2023-08-22 03:58:25] cut tree into: 1 groups
INFO [2023-08-22 03:58:25] -processing spike_tumor_cell_Es,spike_tumor_cell_Es_s1
INFO [2023-08-22 03:58:25] define_signif_tumor_subclusters(), tumor: spike_tumor_cell_MSC
INFO [2023-08-22 03:58:25] cut tree into: 1 groups
INFO [2023-08-22 03:58:25] -processing spike_tumor_cell_MSC,spike_tumor_cell_MSC_s1
INFO [2023-08-22 03:58:25] define_signif_tumor_subclusters(), tumor: spike_tumor_cell_Neural Progenitor cells
INFO [2023-08-22 03:58:25] cut tree into: 1 groups
INFO [2023-08-22 03:58:25] -processing spike_tumor_cell_Neural Progenitor cells,spike_tumor_cell_Neural Progenitor cells_s1
INFO [2023-08-22 03:58:25] define_signif_tumor_subclusters(), tumor: simnorm_cell_chondroblastic
INFO [2023-08-22 03:58:25] cut tree into: 1 groups
INFO [2023-08-22 03:58:25] -processing simnorm_cell_chondroblastic,simnorm_cell_chondroblastic_s1
INFO [2023-08-22 03:58:25] define_signif_tumor_subclusters(), tumor: simnorm_cell_Osteoblast_immature
INFO [2023-08-22 03:58:25] cut tree into: 1 groups
INFO [2023-08-22 03:58:25] -processing simnorm_cell_Osteoblast_immature,simnorm_cell_Osteoblast_immature_s1
INFO [2023-08-22 03:58:25] define_signif_tumor_subclusters(), tumor: simnorm_cell_Osteoblast_int
INFO [2023-08-22 03:58:26] cut tree into: 1 groups
INFO [2023-08-22 03:58:26] -processing simnorm_cell_Osteoblast_int,simnorm_cell_Osteoblast_int_s1
INFO [2023-08-22 03:58:26] define_signif_tumor_subclusters(), tumor: simnorm_cell_myeloid
INFO [2023-08-22 03:58:26] cut tree into: 1 groups
INFO [2023-08-22 03:58:26] -processing simnorm_cell_myeloid,simnorm_cell_myeloid_s1
INFO [2023-08-22 03:58:26] define_signif_tumor_subclusters(), tumor: simnorm_cell_Osteoblast_mature
INFO [2023-08-22 03:58:26] cut tree into: 1 groups
INFO [2023-08-22 03:58:26] -processing simnorm_cell_Osteoblast_mature,simnorm_cell_Osteoblast_mature_s1
INFO [2023-08-22 03:58:26] define_signif_tumor_subclusters(), tumor: simnorm_cell_Stem cell
INFO [2023-08-22 03:58:26] cut tree into: 1 groups
INFO [2023-08-22 03:58:26] -processing simnorm_cell_Stem cell,simnorm_cell_Stem cell_s1
INFO [2023-08-22 03:58:26] define_signif_tumor_subclusters(), tumor: simnorm_cell_Unknown
INFO [2023-08-22 03:58:26] cut tree into: 1 groups
INFO [2023-08-22 03:58:26] -processing simnorm_cell_Unknown,simnorm_cell_Unknown_s1
INFO [2023-08-22 03:58:26] define_signif_tumor_subclusters(), tumor: simnorm_cell_Osteoblast_imm_int
INFO [2023-08-22 03:58:26] cut tree into: 1 groups
INFO [2023-08-22 03:58:26] -processing simnorm_cell_Osteoblast_imm_int,simnorm_cell_Osteoblast_imm_int_s1
INFO [2023-08-22 03:58:26] define_signif_tumor_subclusters(), tumor: simnorm_cell_Osteoclast
INFO [2023-08-22 03:58:26] cut tree into: 1 groups
INFO [2023-08-22 03:58:26] -processing simnorm_cell_Osteoclast,simnorm_cell_Osteoclast_s1
INFO [2023-08-22 03:58:26] define_signif_tumor_subclusters(), tumor: simnorm_cell_Osteocyte
INFO [2023-08-22 03:58:27] cut tree into: 1 groups
INFO [2023-08-22 03:58:27] -processing simnorm_cell_Osteocyte,simnorm_cell_Osteocyte_s1
INFO [2023-08-22 03:58:27] define_signif_tumor_subclusters(), tumor: simnorm_cell_Neutrophils
INFO [2023-08-22 03:58:27] cut tree into: 1 groups
INFO [2023-08-22 03:58:27] -processing simnorm_cell_Neutrophils,simnorm_cell_Neutrophils_s1
INFO [2023-08-22 03:58:27] define_signif_tumor_subclusters(), tumor: simnorm_cell_Es
INFO [2023-08-22 03:58:27] cut tree into: 1 groups
INFO [2023-08-22 03:58:27] -processing simnorm_cell_Es,simnorm_cell_Es_s1
INFO [2023-08-22 03:58:27] define_signif_tumor_subclusters(), tumor: simnorm_cell_MSC
INFO [2023-08-22 03:58:27] cut tree into: 1 groups
INFO [2023-08-22 03:58:27] -processing simnorm_cell_MSC,simnorm_cell_MSC_s1
INFO [2023-08-22 03:58:27] define_signif_tumor_subclusters(), tumor: simnorm_cell_Neural Progenitor cells
INFO [2023-08-22 03:58:27] cut tree into: 1 groups
INFO [2023-08-22 03:58:27] -processing simnorm_cell_Neural Progenitor cells,simnorm_cell_Neural Progenitor cells_s1
INFO [2023-08-22 04:01:49] ::plot_cnv:Start
INFO [2023-08-22 04:01:49] ::plot_cnv:Current data dimensions (r,c)=6532,20480 Total=133860373.411565 Min=0.858918913212145 Max=2.7862378180742.
INFO [2023-08-22 04:01:49] ::plot_cnv:Depending on the size of the matrix this may take a moment.
INFO [2023-08-22 04:05:04] plot_cnv(): auto thresholding at: (0.915462 , 1.085809)
INFO [2023-08-22 04:05:09] plot_cnv_observation:Start
INFO [2023-08-22 04:05:09] Observation data size: Cells= 0 Genes= 6532
Error in obs_dendrogram[[1]] : subscript out of bounds
In addition: Warning message:
In max(nchar(obs_annotations_names)) :
  no non-missing arguments to max; returning -Inf
ahdee commented 1 year ago

made a mistake on ref_group_names such that ref was not defined correctly.