
ROC Analysis for Glycomics and Glycoproteomics Data
gly_roc.RdPerform Receiver Operating Characteristic (ROC) analysis for binary classification of glycomics or glycoproteomics data. The function calculates ROC curves and Area Under the Curve (AUC) values for each variable to assess their discriminatory power between two groups.
Arguments
- exp
A
glyexp::GlycomicSE()orglyexp::GlycoproteomicSE()object, or anotherSummarizedExperimentcontaining an expression matrix and sample information.- group_col
A character string specifying the column name of the grouping variable in the sample information. Default is
"group". The grouping variable must have exactly 2 levels for binary classification.- pos_class
A character string specifying which group level should be treated as the positive class. If
NULL(default), the second level (alphabetically) will be used as the positive class.- add_info
A logical value. If TRUE (default), variable information from the experiment will be added to the result tibbles. If FALSE, only the ROC analysis results are returned.
Value
A list with three elements:
tidy_result: A list containing two tibbles:auc: A tibble containing AUC values for each variable with the following columns:variable: Variable nameauc: Area Under the Curve valueauc_ci_low: Lower bound of 95% confidence interval for AUCauc_ci_high: Upper bound of 95% confidence interval for AUC
coords: A tibble containing ROC curve coordinates with the following columns:variable: Variable namethreshold: Threshold value for classificationspecificity: Specificity (True Negative Rate)sensitivity: Sensitivity (True Positive Rate)
raw_result: A list ofpROCobjectsmeta_data: A list containing metadata from the input experiment The list has classesglystats_roc_resandglystats_res.
Details
For each variable, a ROC curve is computed using the expression values as predictor and the binary group labels as response.
The function requires exactly 2 groups in the specified grouping variable. If more than 2 groups are present, an error will be thrown.
Underlying Function:
ROC analysis is performed using
pROC::roc()Coordinates are extracted using
pROC::coords()
Required packages
This function requires the pROC package to be installed for ROC curve computation.