This function visualizes log fold-change (logFC) trajectories of genes
classified by multi-round monotonic time-course patterns (e.g. Up1,
Down2). Individual gene trajectories are shown as semi-transparent
lines, while the group-level mean trajectory is overlaid for each pattern.
Value
A ggplot object showing logFC trajectories faceted by gene trend group.
Details
Genes are grouped according to their assigned trend group, and facets
are ordered by round index, with Up* and Down* displayed
as paired groups within each round.
The function performs the following steps:
Convert the
SummarizedExperimentobject to a gene-level data frame usingse2conc().Retain only genes classified as
UporDown.Reshape logFC values into long format for plotting.
Reorder gene groups as paired rounds (
Up1,Down1,Up2,Down2, ...).Plot individual gene trajectories and overlay group-level mean trends.
Facet labels include the number of genes (n) in each group.
Examples
if (FALSE) { # \dontrun{
p <- plot_FC_trend(se, group_by = "condition")
print(p)
} # }