Repairs marker trajectories by swapping the data columns of detected swap pairs from the swap frame onward.
Arguments
- pe
A PhysioExperiment with position assays.
- swaps
A
data.frameas returned bydetectSwaps(), containing at minimumframe,marker_a,marker_b, andconfidencecolumns.- assay_prefix
Prefix for position assay names. Default
"position".- min_confidence
Minimum confidence threshold for applying a correction. Swaps below this threshold are skipped. Default 0.5.
Examples
if (FALSE) { # \dontrun{
swaps <- detectSwaps(pe)
pe_fixed <- correctSwaps(pe, swaps, min_confidence = 0.3)
} # }