Create a PCA plot showing genes in expression space with ideal expression patterns overlaid as reference points.
Usage
plot_gene_space(
phyex_set,
top_p = 0.2,
genes = NULL,
colour_by = c("identity", "strata")
)
Arguments
- phyex_set
A PhyloExpressionSet object (BulkPhyloExpressionSet or ScPhyloExpressionSet)
- top_p
Proportion of most dynamic genes to include when genes=NULL (default: 0.2)
- genes
Character vector of specific genes to plot. If NULL, uses top dynamic genes
- colour_by
Character string specifying coloring scheme: "identity" (by peak expression stage/identity) or "strata" (by phylostratum) (default: "identity")
Details
This function creates a PCA visualization of genes in expression space, with ideal expression patterns (early, mid, late, reverse mid) overlaid as reference points. The analysis uses log-transformed and standardized expression values. Genes are colored either by their phylostratum or by their peak expression stage.