# Create example trend data
trend_long <- data.frame(
module = rep(c("Glycolysis", "OXPHOS"), each = 30),
mPT_bin = rep(seq(0, 1, length.out = 30), 2),
score_smooth = c(sin(seq(0, pi, length.out = 30)),
cos(seq(0, pi, length.out = 30)))
)
# Create example switchpoint data
switchpoints <- data.frame(
module = c("Glycolysis", "OXPHOS"),
mPT_switch = c(0.5, 0.3)
)
# Plot
p <- scMetaTraj_plot_trend_multi(trend_long, switchpoints)
print(p)
Run the code above in your browser using DataLab