Skip to contents
0.16.6 documentation

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

Site guide · find your task

Checks relational keys without deriving genome membership, changing sequence order or joining contigs into a continuous sequence. Original input tables and their metadata are returned unchanged. Sequence lengths and annotation coordinates can be checked separately with validate_ggchord_data().

Usage

Code
validate_ggchord_hierarchy(seq_data, genomes, strict = FALSE)

Arguments

seq_data

A data frame containing accver and genome foreign keys.

genomes

A data frame containing a unique genome primary key.

strict

Logical. Stop if relational errors are present; warnings about genomes without contigs do not cause failure.

Value

A list with valid, unchanged seq_data and genomes, an issues data frame (table, row, column, category, severity, message), and contigs, a genome-order table with genome, n_contigs, and sequence_rows/accvers list-columns for each valid unique genome key.

Details

A sequence belongs to exactly one genome. Sequence accver values must be globally unique, including when local contig names would be reused by two genomes. Supply distinct explicit identifiers before validation; this function never prefixes or rewrites them. Genome rows with no contigs are reported as warnings, and remain in the returned genome table.

Examples

Code
library(dplyr)
data(seq_data_example)
seqs <- seq_data_example |>
  select(accver, length)
contigs <- seqs |>
  mutate(genome = accver)
genomes <- tibble(genome = seqs$accver)
validate_ggchord_hierarchy(contigs, genomes)