Description Usage Arguments Value Examples
View source: R/clonal_diversity.R
A line plot that tracks a diversity measure from selected samples of the SummarizedExperiment object plotted over a specified variable.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
your_SE |
Summarized Experiment object containing clonal tracking data as created by the barcodetrackR 'create_SE' function. |
plot_over |
The column of metadata that you want to be the x-axis of the plot. e.g. timepoint |
plot_over_display_choices |
Choice(s) from the column designated in plot_over that will be used for plotting. Defaults to all if left as NULL. |
keep_numeric |
If plot_over is numeric, whether to space the x-axis appropriately according to the numerical values. |
group_by |
The column of metadata you want to group by e.g. cell_type |
group_by_choices |
Choice(s) from the column designated in group_by that will be used for plotting. Defaults to all if left as NULL. |
index_type |
Character. One of "shannon", "shannon_count", "simpson", or "invsimpson". |
point_size |
Numeric. Size of points. |
line_size |
Numeric. Size of lines. |
text_size |
Numeric. Size of text in plot. |
your_title |
Character. The title for the plot. |
return_table |
Logical. IF set to TRUE, rather than returning the plot of clonal diversity, the function will return a dataframe containing the diversity index values for each specified sample. |
Outputs plot of a diversity measure tracked for groups over a factor. Or if return_table is set to true, a dataframe will be returned instead.
1 2 3 4 5 | data(wu_subset)
clonal_diversity(
your_SE = wu_subset, index_type = "shannon",
plot_over = "months", group_by = "celltype"
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.