r – Plotting infercnv results

I’m working with matched single cell data, where we have treated and untreated samples for the same patient. I ran CNV analysis using the infercnv package.

I’ve followed the tutorial:

# data matrix
counts_matrix <- scData@assays$RNA@counts
meta = data.frame(labels = Idents(scData), row.names = names(Idents(scData)))
unique(meta$labels) # check the cell labels
# Create the infercnv object
infercnv_obj <- CreateInfercnvObject(raw_counts_matrix = counts_matrix,
                                     annotations_file = meta,
                                     delim = "\t",
                                     gene_order_file = "hg38_gencode_v27.txt",
                                     ref_group_names = NULL)
# perform infercnv operations to reveal cnv signal
infercnv_obj = infercnv::run(infercnv_obj,
                             cutoff=1,  # use 1 for smart-seq, 0.1 for 10x-genomics
                             out_dir="output_dir",  # dir is auto-created for storing outputs
                             cluster_by_groups=T,   # cluster
                             denoise=T,
                             HMM=T
                             )

Now, I’m not sure how to plot the results. Any help would be appreciated.

Read more here: Source link