q2-convexhull
(github)
Hi all, I'd like to share a plugin I've developed for calculating and visualizing dispersion in a dataset as done in Song et. al. 2021. q2-convexhull also provides standalone functionality in python for calculating convex hull volumes over time and visualizing them in 3D, tracking longitudinal changes in group dispersion, and individual variation over time.
A convex hull is a geometric figure defined by the smallest convex polygon that contains all given points in multidimensional space. In simpler terms the hull can be thought of as stretching plastic wrap around a 3D set of points. The convex hull describes the boundary within which all points lie, and the volume of the resulting figure thus serves as a measure of dispersion. Higher volumes indicate more dispersion while lower volumes indicate more homogeneity.
An example call is shown below and installation instructions can be found on the github page. q2-convexhull assumes a working QIIME2 environment 2023.5 or earlier:
qiime convexhull2 hulls-plots \
--i-ordination data/rpca-biplot.qza \
--m-metadata-file data/metadata.tsv \
--p-groupc 'exposure_type' \
--p-subjc 'host_subject_id' \
--p-timec 'age_match' \
--o-visualization data/hulls_out