Description Usage Arguments Value Examples
This crops a result from geneSmoothFit
to a particular pseudotime range. Can be used to split a smoothed result into segments in order to label them separately or combine them for use with plotSmoothFitMultiCascade
.
1 | cropSmoothFit(smoothed.fit, pt.min = -Inf, pt.max = Inf)
|
smoothed.fit |
(List) Result from |
pt.min |
(Numeric) Minimum pseudotime to retain |
pt.max |
(Numeric) Maximum pseudotime to retain |
(List) Result from geneSmoothFit
, but cropped to the range of pt.min
and pt.max
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | # Identify the pseudotime of the branchpoint
pt.crop <- as.numeric(unlist(hydra.en.tree@tree$segment.pseudotime.limits)[1])
# Crop according to the pseudotime of the branchpoint
foot.only.spline <- cropSmoothFit(tentacle.spline, pt.max = pt.crop)
hypostome.only.spline <- cropSmoothFit(hypo.spline, pt.min = pt.crop)
tentacle.only.spline <- cropSmoothFit(tentacle.spline, pt.min = pt.crop)
# Combine into a list
# Names in the plots are determined by names of the smooth objects in the list
splines <- list(foot.only.spline, tentacle.only.spline, hypostome.only.spline)
names(splines) <- c("Foot/Body", "Tentacle", "Hypostome")
# Plot expression of genes on the curves
endoderm.genes.plot <- c("t14194aep|WNT3_MOUSE", "t20768aep|BRAC_CANLF",
"t25396aep|NKX26_HUMAN", "t18735aep|FOXA2_ORYLA")
plotSmoothFitMultiCascade(smoothed.fits = splines,
genes = endoderm.genes.plot, scaled = F,
colors = c(`Foot/Body` = "#FF8C00", Hypostome = "#1E90FF",
Tentacle = "#32CD32"
)
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.