celldeconvplots: Draw box plot and heatmaps for cell deconvolution result

View source: R/scdeconv.R

celldeconvplotsR Documentation

Draw box plot and heatmaps for cell deconvolution result

Description

Draw box plot and heatmaps to compare cell deconvolution results between/ among different sample groups, or a box plot for only one sample group

Usage

celldeconvplots(
  cellcontres,
  pddat = NULL,
  title = NULL,
  titlesize = 15,
  textsize = 13,
  annotextsize = 6,
  face = "bold",
  annotextheight = 0.95
)

Arguments

cellcontres

A data frame or matrix recording the cell contents for the samples. Each column is one cell type and each row is one sample. The column names are the cell type names and the row names are the sample IDs.

pddat

A data frame recording the sample group information, and must include 2 columns. One is named as "sampleid", recording the sample IDs same as the row names of cellcontres, the other is "Samplegroup", recording the sample group to which each sample belongs. It can also be set as NULL, meaning all the samples are from the same group, and in this case, only a box plot showing the cell content for each cell type will be made, but if a data frame is provided to this parameter showing samples belong to different groups, for each cell type in the box plot, it will be further divided into different groups to compare their cell compositions, and also heatmaps will be generated to show the comparison results.

title

A string to define the prefixes of the plot titles, can also be set as NULL.

titlesize

A number to define the font size of the plot titles, and the default value is 15.

textsize

A number to define the base font size for the plots, except the title size and the annotation label size of the box plot, which are defined by the parameters titlesize and annotextsize. The default value is 13.

annotextsize

A number used to define the font size of the annotation labels in the box plot. Default is 6.

face

A string to define whether the text in the box plot should be bold or plain. Default is "bold".

annotextheight

A number to define the y-coordinate of the annotation text in the box plot. Default is 0.95, meaning the y-coordinate of these labels will be 95% of the box plot height.

Value

Generate a box plot to show the sample cell contents, and if these samples belong to different groups, also heatmaps will be made to show the cell content comparison results among/between different groups.


yuabrahamliu/scDeconv documentation built on March 28, 2024, 3:15 p.m.