Skip to contents

Builds a tales object from a data frame of TALE array parts: one row per (array, slot).

Usage

tales(x, dom_code_namespace = NULL, sanitize = FALSE)

Arguments

x

A data frame with at least array_id and position_in_array columns, plus at least one of rvd or dom_code. Other recognised columns (domain_type, position_in_crd, aa_seq, dna_seq, seqnames, source_directory) are validated if present. Any further column is preserved untouched.

dom_code_namespace

Optional scalar string, see tales_namespace.

sanitize

Which arrays to remove, among those tales_anomalies lists:

  • FALSE (default): none. tales() warns about the anomalies, and the odd predictions stay in the object for inspection.

  • TRUE: the arrays whose data are inconsistent or incomplete (anomalies of kind "integrity"), with a warning naming them and why. Non-canonical TALEs, such as truncTALEs or TALEs lacking a terminus, are kept, with a message.

  • "canonical": every array with an anomaly, so that only canonical TALEs remain.

Structural corruption is an error either way.

Value

A validated tales object.

Examples

parts <- data.frame(
  array_id = c("A1", "A1", "A1", "A2", "A2", "A2"),
  position_in_array = c(1L, 2L, 3L, 1L, 2L, 3L),
  domain_type = c("N-terminus", "repeat", "C-terminus",
                  "N-terminus", "repeat", "C-terminus"),
  rvd = c("NTERM", "HD", "CTERM", "NTERM", "NI", "CTERM")
)
tales(parts)
#> <tales> 2 arrays, 6 parts
#>   layers: rvd   |   1 other column
#>       rvd
#>   A1  NTERM HD CTERM
#>   A2  NTERM NI CTERM