Skip to contents
0.16.6 documentation

Complete canonical API text; task articles explain the workflows. Tutorials

Site guide · find your task

Splits paired protein intervals wherever either CDS crosses a segment boundary, retaining query/subject roles and genomic endpoint directions. This is a codon-coordinate correspondence, not a new nucleotide alignment. Source protein identity and length remain prefixed metadata and are never emitted as nucleotide pident or alignment length. General gapped alignments require explicit per-column alignment information and cannot be projected by this endpoint-only helper.

Usage

Code
project_ggchord_links(link_data, cds, ungapped = FALSE)

Arguments

Data frame with qfeature_id, sfeature_id identifying CDS models and ordered inclusive protein qstart, qend, sstart, send. Query and subject residue spans must be equal. If present, gapopen must be zero and source length must equal this residue span.

cds

A map from build_ggchord_cds().

ungapped

Must explicitly be TRUE, confirming an ungapped residue correspondence rather than inferring it from equal endpoint spans.

Value

A paired genomic interval table with CDS parent IDs, source row, piece number, genomic strands, projected_bases, source-prefixed input metadata and projection provenance. No alignment identity is computed.

Examples

Code
library(dplyr)
data(plasmid_example_pUC19)
feature_source <- find_common_features(plasmid_example_pUC19)
features <- feature_source |>
  select(accver, start, end, strand, type, anno)
coding <- features |>
  filter(anno == "AmpR", type == "CDS") |>
  select(accver, start, end, strand) |>
  mutate(feature_id = paste(accver, "AmpR", sep = ":"), phase = 0)
cds <- build_ggchord_cds(coding, genetic_code = 11)
# Self-correspondence of one real CDS, solely to demonstrate coordinate conversion.
# The same observed residues are paired, so the correspondence is ungapped.
selected <- tibble(
  qfeature_id = coding$feature_id, sfeature_id = coding$feature_id,
  qstart = 1, qend = 20, sstart = 1, send = 20
)
project_ggchord_links(selected, cds, ungapped = TRUE)