PseudobulkingDEHeatmap | R Documentation |
This is a plotting function that formats the FilterPseudobulkingContrasts logic to plot a heatmap of log fold changes for a given gene space. It is recommended that you filter this gene space through some kind of feature selection, but full transcriptome heatmaps are possible.
PseudobulkingDEHeatmap(
seuratObj,
geneSpace = NULL,
contrastField = NULL,
negativeContrastValue = NULL,
positiveContrastValue = NULL,
subgroupingVariable = NULL,
showRowNames = FALSE,
assayName = "RNA",
sampleIdCol = "cDNA_ID",
minCountsPerGene = 1,
subsetExpression = NULL
)
seuratObj |
A pseudobulked Seurat object. |
geneSpace |
An optional vector of gene names that specify which genes should populate the heatmap. It is recommended that you perform some kind of feature selection upstream of this to select genes for plotting. If NULL, all rows in the assay object will be used. |
contrastField |
The primary grouping variable to display (on top of the heatmap). |
negativeContrastValue |
The value of contrastField to be treated as "downregulated". |
positiveContrastValue |
An optional variable to define a specific positive contrast value. While negativeContrastValue determines the log fold changes, this argument operates primarily as a filtering variable to eliminate groups and show a particular value of the contrast field. |
subgroupingVariable |
If there is a second relevant grouping variable, you can supply a second metadata column to group the data by. |
showRowNames |
a passthrough variable for ComplexHeatmap controlling if the gene names should be shown or not in the heatmap. |
assayName |
the name of the assay in the seurat object storing the count matrix. |
sampleIdCol |
The metadata column denoting the variable containing the sample identifier (for grouping). |
minCountsPerGene |
Passthrough variable for PerformGlmFit, used for filtering out lowly expressed genes. |
subsetExpression |
An optional string containing an expression to subset the Seurat object. This is useful for selecting an exact subpopulation to in which to show DEGs. Please note that for string-based metadata fields, you will need to mix single and double quotes to ensure your expression is properly parsed. For instance, note the double quotes around the word unvax in this expression: subsetExpression = 'vaccine_cohort == "unvax"'. |
A list containing the filtered dataframe used for plotting and the heatmap plot itself.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.