Skip to contents

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.

Usage

# S4 method for class 'PHGMetrics'
seqnames(x) <- value

Arguments

x

A PHGMetrics object.

value

A data.frame object containing old_id and new_id columns for ID replacement.

Value

The PHGMetrics object with updated sequence names.

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
} # }