View source: R/plotMarkerHeatmap.R
plotMarkerHeatmap | R Documentation |
Create a heatmap of the log-normalized expression for the most interesting markers of a particular label.
plotMarkerHeatmap(
results,
test,
label,
other.labels = NULL,
assay.type = "logcounts",
display.row.names = NULL,
use.pruned = FALSE,
order.by = "rank.logFC.cohen",
top = 20,
BPPARAM = SerialParam()
)
results |
A DataFrame containing the output from |
test |
A numeric matrix of log-normalized expression values where rows are genes and columns are cells.
Each row should be named with the same gene name that was used to compute Alternatively, a SummarizedExperiment object containing such a matrix. |
label |
String specifying the label of interest. |
other.labels |
Character vector specifying the other labels to be compared to |
assay.type |
Integer scalar or string specifying the matrix of expression values to use if |
display.row.names |
Character vector of length equal to the number of rows of |
use.pruned |
Logical scalar indicating whether the pruned labels should be used instead. |
order.by |
String specifying the column of the output of |
top |
Integer scalar indicating the top most interesting markers to show in the heatmap. |
BPPARAM |
A BiocParallelParam object specifying the parallelization scheme to use for marker scoring. |
This function creates a heatmap where each row is a marker gene for label
and each column is a cell in the test dataset.
The aim is to check the effectiveness of the reference-derived markers for distinguishing between labels in the test dataset.
Useful markers from the reference should show strong upregulation in label
compared to all other.labels
.
We identify such markers by scoring all reference-derived markers with scoreMarkers
on the test
expression.
The top
markers based on the specified order.by
field are shown in the heatmap.
If only one label is present, markers are ranked by average abundance intead.
The output of pheatmap
is returned showing the heatmap on the current graphics device.
Aaron Lun
# Running the SingleR() example.
example(SingleR, echo=FALSE)
plotMarkerHeatmap(pred, test, pred$labels[1])
plotMarkerHeatmap(pred, test, pred$labels[1], use.pruned=TRUE)
plotMarkerHeatmap(pred, test, pred$labels[1], order.by="rank.AUC")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.