跳到正文
0.16.6 文档

本页完整说明已译为现代汉语;函数、参数、代码和原始数据标识保留原样。 使用教程

全站目录 · 按任务查找

任一 CDS 跨越分段边界时切分成对蛋白区间,保留 query/subject 角色和基因组端点方向。这是密码子坐标对应,不是新的核苷酸比对。蛋白相似度和长度保留为带前缀元数据,不输出为核苷酸 pident 或比对 length。一般含缺口比对需要显式逐列信息,本端点工具无法投影。

用法

代码
project_ggchord_links(link_data, cds, ungapped = FALSE)

参数

数据框,以 qfeature_id、sfeature_id 标识 CDS 模型,并提供有序闭区间蛋白坐标 qstart、qend、sstart、send。两端残基跨度须相等;若存在 gapopen 则必须为零,源 length 须等于残基跨度。

cds

由 build_ggchord_cds() 创建的映射。

ungapped

须显式设为 TRUE,确认无缺口残基对应,不能仅由端点跨度相等推断。

返回值

成对基因组区间表,保留 CDS 父级 ID、源行、片段编号、链、projected_bases、带源前缀的输入元数据及投影来源。不计算比对相似度。

示例

代码
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)