Learn R Programming

henna

henna provides nine versatile visualization utilities. They are designed with scRNA-seq data analysis in mind, but can be used for a variety of other applications as well.

Installation

To install the version of henna currently available on CRAN, run the following R code:

install.packages("henna")

Alternatively, you can install the most recent development version using this code:

devtools::install_github("andrei-stoica26/henna")

At present, both versions are the same (0.3.4).

Visualization tools

All tools are demonstrated here using the human Baron pancreas (HBP) dataset, available as part of the scRNAseq package.

classPlot

This function creates a bar plot for a set of items grouped by class, ordering the items and classes based on counts. An application is representing data coming from two categorical columns of a scRNA-seq expression object. Here, we render selected donor and label information from the HBP dataset:

correlationPlot

This function plots a correlation matrix. We use gene expression data from the HBP dataset:

densityPlot

This function creates a density plot for a set of points, optionally displaying segements between each point and its nearest neighbor. Here, we subject expression data from the HBP dataset to a distance matrix calculation and subsequent MDS reduction in order to generate the coordinates of the points:

hullPlot

This function plots a set of points together with the convex hull. Optionally, it divides the points into 2 or 4 classes of different colors by drawing a vertical and/or a horizontal line that intersects the hull.

An application is visualizing shared cluster markers. Here, we display the shared markers of the alpha and delta clusters from the HBP dataset, highlighting the top ones in purple:

networkPlot

This function plots a graph using different colors for nodes that are part of different connected components.

An application is visualizing genes with a strong overlapping expression in terms of cells showing the highest (90th percentile and above) expression of the gene.

radialPlot

This function plots positive integer-valued points over concentric circles, with points located more centrally representing higher values.

It can be used to showcase genes involved in a network. Just like networkPlot, radialPlot can distinguish genes belonging to different connected components:

rankPlot

This function aggregates multiple ranks available for a group of items in a single plot. Average ranks can be displayed on the plot. Here, we visualize the ranks of 12 genes as markers of the alpha, beta, delta and gamma clusters in the HBP dataset:

riverPlot

This function generates an alluvial plot for a data frame with two categorical columns and a weights column. As an example, it can represent the significance overlaps between cell type markers and donor markers in the HBP dataset. Stronger overlaps correspond to thicker connecting curves:

tilePlot

This function plots a numeric matrix. Here, we use shared cluster markers as an example:

Copy Link

Version

Install

install.packages('henna')

Monthly Downloads

186

Version

0.3.4

License

MIT + file LICENSE

Maintainer

Andrei-Florian Stoica

Last Published

October 19th, 2025

Functions in henna (0.3.4)

vertexComponents

Return the connected components of vertices
isPointOnSeg

Check if a point is on a segment
tilePlot

Plot a numeric matrix or data frame
splitInTwo

Split the convex hull in two along an input line
riverPlot

Create an alluvial plot
rankSummary

Create a rank summary
pointsOnCircle

Generate the coordinates of points on a circle centered at origin
networkPlotDF

Prepare data frame for network plot
rankPlot

Create a rank plot
radialPlot

Draw radial plot for a data frame with positive integer-valued points
pointsToSegments

Construct a data frame of segments from a data frame of points
quadBorders

Find the coordinates of the points establishing the four divisions of the hull
classPlot

Plot item bars grouped by class
dfPoint

Extract point from data frame of points.
dfEuclidean

Find the Euclidean distance between two points in a data frame
circleCoords

Store the radii of the circles and the corresponding values
connectedComponents

Find the connected components of a graph data frame
networkPlot

Plot graph with the option of using different colors for connected components
densityPlot

Create density plot
correlationPlot

Plot a correlation matrix
labelPoints

Label points in a ggplot object
convexHull

Construct the convex hull of a set of points
borderCoords

Find the coordinates where a vertical or horizontal line intersects the hull
centerTitle

Add a centered title to a plot
isPointOnBoundary

Check if a point is on a polygon boundary
hullPlot

Plot the convex hull of a set of points
hpColors

Create the default hullPlot palette
distFreq

Map values to distances from the center and find the frequency of these distances
rpColors

Create a palette designed to represent dots over a viridis background
dpColors

Create a palette designed for densityPlot
splitHull

Split the convex hull in four parts along two input lines