Set Sequence Names for PHGMetrics Object
Source:R/class_phg_metrics.R
seqNames-set-PHGMetrics-data.frame-method.RdThis method replaces old IDs with new IDs in the PHGMetrics object.
It ensures that both metricAlign and metricGvcf fields are updated
with the new sequence names provided in the value data frame.
Usage
# S4 method for class 'PHGMetrics,data.frame'
seqNames(object) <- valueDetails
The method first validates that the value data frame contains the
necessary columns (old_id and new_id). Then, it replaces the old IDs
with the new IDs in both metricAlign and metricGvcf fields of the
PHGMetrics object. If a replacement ID is not found, the original ID is
retained.
Examples
if (FALSE) { # \dontrun{
newIds <- data.frame(
old_id = c("old_1", "old_2", "old_3"),
new_id = c("new_01", "new_02", "new_03")
)
# Assume 'met' is a PHGMetrics object
seqNames(met) <- newIds
} # }