Generates boxplots of scaled feature values across two data splits (X and Y), stratified by a grouping column, optionally for specified features.
Usage
plot_feature(
X,
Y,
MX,
MY,
x_var,
fill_var,
features = NULL,
title = NULL,
x_label = NULL,
y_label = NULL
)
Arguments
- X
A numeric matrix or data frame for the test split
- Y
A numeric matrix or data frame for the inference split
- MX
Metadata for X, containing IDs and group information
- MY
Metadata for Y, containing IDs and group information
- features
Character vector of feature names to plot. Defaults to first 9 common features if NULL.
- title
Optional title for the plot
- g_col
Column name in metadata indicating the group
- a_col
Column name in metadata indicating the ancestry
- id_col
Column name in metadata for sample identifiers (assumes rownames of matrix are IDs)