Create heatmap for pairwise DEG analysis result
plotPairwiseDEGHeatmap(
object,
result,
group = NULL,
topN = 20,
absLFCThresh = 1,
padjThresh = 0.05,
pctInThresh = 50,
pctOutThresh = 50,
downsampleSize = 200,
useCellMeta = NULL,
column_title = NULL,
seed = 1,
...
)A HeatmapList-class object.
A liger object, with normalized data and metadata to annotate available.
The data.frame returned by runPairwiseDEG.
The test group name among the result to be shown. Must specify
only one if multiple tests are available (i.e. split test). Default
NULL works with single-test result and raises error with split-test
result.
Maximum number of top significant features to be plot for up- and
down-regulated genes. Default 20.
Hard threshold on absolute logFC value. Default 1.
Hard threshold on adjusted P-value. Default 0.05.
Threshold on expression percentage. These
mean that a feature will only pass the filter if it is expressed in more than
pctInThresh percent of cells in the corresponding cluster. Similarly
for pctOutThresh. Only applied when these metrics are available.
Default 50 percent for both.
Maximum number of downsampled cells to be shown in the
heatmap. The downsampling is balanced on the cells involved in the test
specified. Default 200.
Cell metadata variable names for cell grouping. Default
NULL includes dataset source and the default cluster.
Title on the column. Default NULL.
Random seed for reproducibility. Default 1.
Arguments passed on to .plotHeatmap
transposeLogical, whether to "rotate" the heatmap by 90 degrees so
that cell information is displayed by row. Default FALSE.
showCellLabel,showFeatureLabelLogical, whether to show cell barcodes,
gene symbols or factor names. Default TRUE for gene/factors but
FALSE for cells.
cellAnnColList,featureAnnColListList object, with each element a
named vector of R-interpretable color code. The names of the list elements
are used for matching the annotation variable names. The names of the colors
in the vectors are used for matching the levels of a variable (factor object,
categorical). Default NULL generates ggplot-flavor categorical colors.
scaleLogical, whether to take z-score to scale and center gene
expression. Applied after dataScaleFunc. Default FALSE.
trimNumeric vector of two values. Limit the z-score value into this
range when scale = TRUE. Default c(-2, 2).
baseSizeOne-parameter control of all text sizes. Individual text element sizes can be controlled by other size arguments. "Title" sizes are 2 points larger than "text" sizes when being controlled by this.
cellTextSize,featureTextSize,legendTextSizeSize of cell barcode
labels, gene/factor labels, or legend values. Default NULL.
cellTitleSize,featureTitleSize,legendTitleSizeSize of titles of the
cell slices, gene/factor slices, or the legends. Default NULL.
viridisOption,viridisDirectionSee argument option and
direction of viridis. Default "A"
and -1.
RColorBrewerOptionWhen scale = TRUE, heatmap color will be
mapped with brewer.pal. This is passed to
name. Default "RdBu".
# \donttest{
defaultCluster(pbmc) <- pbmcPlot$leiden_cluster
pbmc$condition_cluster <- interaction(pbmc$dataset, pbmc$defaultCluster)
deg <- runPairwiseDEG(pbmc, 'stim.0', 'stim.1', 'condition_cluster')
pbmc <- normalize(pbmc)
plotPairwiseDEGHeatmap(pbmc, deg, 'stim.0')
# }
Run the code above in your browser using DataLab