Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not getting the reference part of the heatmap #667

Open
Cristinacondel1 opened this issue Jun 13, 2024 · 2 comments
Open

Not getting the reference part of the heatmap #667

Cristinacondel1 opened this issue Jun 13, 2024 · 2 comments

Comments

@Cristinacondel1
Copy link

Dear All,

I'm running the code for inferCNV and everything gets generated correctly but in all the heatmaps generated the reference cell heatmap is missing.

Screenshot 2024-06-13 at 13 56 36

The code I'm using for the run is as follows:

# Create the inferCNV object
  infercnv_obj <- CreateInfercnvObject(
    raw_counts_matrix = HNSC_matrix,
    annotations_file = annotation_file_path,
    delim = ",",
    gene_order_file = "/omics/odcf/analysis/OE0509_projects/hnscc/single_cell/Single_Cell_Analysis/Single_Cell_Datasets/All_Cells_Together/Integration/InferCNV/hg38_gencode_v27.txt",
    ref_group_names = c("Immune", "Stromal"),
    chr_exclude = c("chrM")
  )

   # Perform inferCNV operations to reveal CNV signal
   
  infercnv_obj <- infercnv::run(
    infercnv_obj,
    cutoff = 0.1,
    out_dir = paste0("output_dir_", dataset_id), 
    cluster_by_groups = TRUE,
    denoise = TRUE,
    HMM = TRUE
  )

At one point I got the following error message, but already all the heatmaps were generated:

Error in heatmap.cnv(obs_data, Rowv = obs_dendrogram, Colv = FALSE, cluster.by.row = TRUE,  :
  'RowIndividualColors' must be a character vector of length nrow(x)
Calls: <Anonymous> ... plot_subclusters -> plot_cnv -> .plot_cnv_observations -> heatmap.cnv
In addition: Warning messages:
1: In cbind(row_groupings, get_group_color_palette()(length(table(hcl_obs_annotations_groups)))[hcl_obs_annotations_groups]) :
  number of rows of result is not a multiple of vector length (arg 2)
2: In cbind(split_groups, row_groupings[, 1], hcl_obs_annotations_groups,  :
  number of rows of result is not a multiple of vector length (arg 3)
Execution halted 

But I'm not sure how to proceed after trying out and checking that all input files are in the right format.

@hayden-bell
Copy link

I had the same issue. It is possible that it is related to the size of the your reference and the Cairo back-end is then unable to generate a matrix of that size.

See https://github.com/broadinstitute/infercnv/wiki/Infercnv-runs-successfully-and-generated-plots-but-they-are-blank

@peizhu1205
Copy link

output_format="pdf": Changing the output format to PDF can resolve this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants