plot_subclusters: Plot a heatmap of the data in the infercnv object with the...

View source: R/inferCNV_tumor_subclusters.R

plot_subclustersR Documentation

Plot a heatmap of the data in the infercnv object with the subclusters being displayed as annotations.

Description

Formats the data and sends it for plotting.

Usage

plot_subclusters(
  infercnv_obj,
  out_dir,
  output_filename = "subcluster_as_annotations"
)

Arguments

infercnv_obj

infercnv object

out_dir

Directory in which to output.

output_filename

Filename to save the figure to.

Value

infercnv_obj the modified infercnv object that was plotted where subclusters are assigned as annotation groups

Examples

# data(infercnv_data_example)
# data(infercnv_annots_example)
# data(infercnv_genes_example)

# infercnv_object_example <- infercnv::CreateInfercnvObject(raw_counts_matrix=infercnv_data_example, 
#                                                           gene_order_file=infercnv_genes_example,
#                                                           annotations_file=infercnv_annots_example,
#                                                           ref_group_names=c("normal"))

# infercnv_object_example <- infercnv::run(infercnv_object_example,
#                                          cutoff=1,
#                                          out_dir=tempfile(), 
#                                          cluster_by_groups=TRUE, 
#                                          denoise=TRUE,
#                                          HMM=FALSE,
#                                          num_threads=2,
#                                          no_plot=TRUE)

data(infercnv_object_example)

plot_subclusters(infercnv_object_example,
                 out_dir=tempfile(),
                 output_filename="subclusters_as_annotations"
                 )


broadinstitute/inferCNV documentation built on Jan. 3, 2024, 6:32 p.m.