plot_phenotypes_from_impact
Converts an impact table to phenotype glyph fields with impact_to_phenos() and renders the annotated lineage graph, in one call.
plot_phenotypes_from_impact(
cell_state_graph,
impact_table,
power_tbl = NULL,
presence_tbl = NULL,
powered_thresh = 0.8,
abundance_q_cut = 0.05,
filter_by_group = FALSE,
cell_types = NULL,
show_node_labels = FALSE,
label_font_size = 3,
label_font_size_pt = NULL,
show_group_labels = FALSE,
group_label_font_size = 2,
...
)
Arguments
-
cell_state_graph
cell_state_graph
A plattcell_state_graphobject with node coordinates and layout metadata. -
impact_table
data frame
Per-cell-type phenotype calls (seeimpact_to_phenos()). -
power_tbl
data frame
Optional per-cell-type abundance statistics: a cell identity column (cell_typeorcell_group),delta_log_abund,delta_q_value, and optionallypowerandpresent_above_thresh. When provided, node sizes reflect statistical power and absent cell types are grayed out. DefaultNULL. -
presence_tbl
data frame
Optional full, unfiltered abundance table used only to decide which cell types are present (present_above_thresh). It takes precedence overpower_tblfor presence, so absent cell types are still grayed out whenpower_tblhas been filtered down. DefaultNULL. -
powered_thresh
numeric
Threshold on thepowercolumn above which a cell type is considered powered. Default0.8. -
abundance_q_cut
numeric
Numeric q-value cutoff used to decide whether an abundance call survives into the glyph. Must match theabundance_q_cutthat producedimpact_table's codes (seeassign_abundance_code()): a looser value re-admits rows the cascade rejected, a stricter one silently rewrites called rows to"A0 No change". Default0.05. -
filter_by_group
logical
IfTRUEandcell_typesis set, restrict to the same grouping box. -
cell_types
character vector
Optional subset of cell types to keep. -
show_node_labels
logical
Label all nodes, unless a subset is given vialabel_cell_typesin.... -
label_font_size, label_font_size_pt
numeric
Node-label size in ggplot/ggrepel units, or in points iflabel_font_size_ptis set (overrides the former). -
show_group_labels, group_label_font_size
Draw and size text labels for grouping boxes. -
...
Additional arguments forwarded toplot_phenotypes_glyphs().
Value
A ggplot object.
Examples
plot_phenotypes_from_impact(muscle_state_graph,
tbx16_impact_table,
show_node_labels = TRUE
)