View source: R/plot_ccposition_den.R
plot_ccposition_den | R Documentation |
The function will compute and plot cell cycle position kernel density.
theta.v |
The cell cycle position - a numeric vector with range between 0 to 2pi. |
color_var.v |
A factor variable to stratify |
color_name |
The name of the color_var.v to be used in the legend. |
palette.v |
A string vector to give the color names. It should has the length of the number of levels of |
fig.title |
The title of the figure. Default: NULL |
type |
It can be either of 'linear' or 'circular'. 'linear' corresponds to Cartesian coordinate system and 'circular' for polar coordinate system. Default: 'linear' |
bw |
The smoothing bandwidth to be used. It is equal to the concentration parameter of the von Mises distribution. See |
weighted |
Whether the density should be weighted on the percentage of each level of |
line.size |
The size of the line used by |
line.alpha |
The alpha value of the line used by |
addRug |
Whether to add rug on the bottom of the linear density plot or an inner circle on the circular plot to show the continuous scale of theta. Default: TRUE |
RugPalette.v |
The palette used for the rug plot. If not given, it will used the same default palette as in |
... |
Other arguments accepted by |
The function first estimates kernel density using the von Mises distribution. Then,
it plots out the density in the polar coordinate system or Cartesian coordinate system. Different colors
represents different levels of color_var.v
and the dashed black line is the marginal distribution of all cells.
A ggplot object
Shijie C. Zheng
estimate_Schwabe_stage
, for inferring 5 stages of cell cycle
data(neurosphere_example, package = "tricycle") neurosphere_example <- estimate_cycle_position(neurosphere_example) plot_ccposition_den(neurosphere_example$tricyclePosition, neurosphere_example$sample, "sample") neurosphere_example <- estimate_Schwabe_stage(neurosphere_example, gname.type = "ENSEMBL", species = "mouse") plot_ccposition_den(neurosphere_example$tricyclePosition, neurosphere_example$CCStage, "CCStage")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.