View source: R/plot_contribution.R
| plot_contribution | R Documentation |
Create a stacked area plot showing the contribution of each phylostratum to the overall transcriptomic index across developmental stages or cell types.
plot_contribution(phyex_set, type = c("stacked", "line"))
phyex_set |
A PhyloExpressionSet object (BulkPhyloExpressionSet or ScPhyloExpressionSet) |
type |
One of "stacked" or "line". If stacked, will show the lines stacked in a cumulative area plot, otherwise they will not be stacked. |
This function visualizes how different phylostrata contribute to the overall transcriptomic index pattern across developmental stages (bulk data) or cell types (single-cell data). Each area represents the contribution of a specific phylostratum, with older strata typically shown in darker colors and younger strata in lighter colors.
The plot uses the PS_colours function to create a consistent color scheme that matches other myTAI visualizations.
A ggplot2 object showing phylostratum contributions as a stacked area plot
# Create contribution plot for bulk data
contrib_plot <- plot_contribution(example_phyex_set)
# Create contribution plot for single-cell data
contrib_plot_sc <- plot_contribution(example_phyex_set_sc)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.