Set Sequence Names for PHGMetrics Object
Source:R/class_phg_metrics.R
seqnames-set-PHGMetrics-method.Rd
This 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.
Details
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
} # }