
Prediction Wrangler
int_prediction_wrangler.RdInternal function called by get_glm_scores.
Not meant for out-of-package usage.
Usage
int_prediction_wrangler(
these_predictions = NULL,
these_samples_metadata = NULL,
sample_id_col = NULL,
row_to_col = FALSE,
subtype_class = "5_class",
categorical_factor = NULL,
scale = NULL,
bin_scores = FALSE,
n_bins = 10,
surv_time = NULL,
surv_event = NULL,
this_subtype = NULL,
return_all = FALSE
)Arguments
- these_predictions
Required. Output from
classify_samples().- these_samples_metadata
Required. Metadata associated with he prediction output. Also possible for the user to provide a metadata subset with samples of interest, the return will be restricted to the samples within the specified group.
- sample_id_col
Optional parameter dictating the column name with sample IDs, the function expects this column to be sample_id but the user can override this if they know the name for this column.
- row_to_col
Boolean parameter. Set to TRUE to transform row names of the metadata to a new column called sample_id. Default is FALSE.
- subtype_class
Can be one of the following; 5_class or 7_class. Default is 5_class.
- categorical_factor
Required parameter. This should be the categorical variable that is intended for testing. In addition, this should also be a variable of type factor, with exactly 2 levels.
- scale
Optional parameter. A numeric value to scale the numeric scores. If provided, all numeric scores will be multiplied by this value.
- bin_scores
Boolean parameter. Set to TRUE to bin the numeric scores into discrete bins. Default is FALSE.
- n_bins
Optional parameter. The number of bins to use when binning numeric scores. Default is 10.
- surv_time
Optional, should be the column name for the survival time (numeric) in the metadata.
- surv_event
Optional, should be the column name for survival event (factor) in the metadata.
- this_subtype
Optional parameter. Allows the user to subset the return to a specific subtype within the selected class. If not specified, the function will return a data frame based on all subtypes in the specified class.
- return_all
Boolean parameter, set to TRUE to return all metadata columns. Default is FALSE.
Details
Takes an output from classify_samples() together with
associated metadata and pre-processing it so that statistical tests can be executed on this data.
For more info, see the documentation of get_glm_scores.