add_patterns: Add presence/absence patterns to a tidygenomes object

View source: R/enhancers.R

add_patternsR Documentation

Add presence/absence patterns to a tidygenomes object

Description

This function determines unique orthogroup presence/absence patterns in genomes and adds this information to a tidygenomes object.

Usage

add_patterns(tg)

Arguments

tg

A tidygenomes object

Details

The following will be added to the tidygenomes object:

  • A variable pattern in the orthogroups table, with for each orthogroup its presence/absence pattern.

  • A table components, listing the genomes defining each presence/absence pattern.

  • A table patterns with for each pattern, the number of orthogroups that follow it.

Value

A tidygenomes object

Examples

genes <- data.frame(
  gene = c("gene A", "gene B", "gene C"),
  genome = c("genome 1", "genome 1", "genome 2"),
  orthogroup = c("og alpha", "og beta", "og alpha")
)
tg <- as_tidygenomes(genes)
tg <- add_patterns(tg)


SWittouck/tidygenomes documentation built on Feb. 1, 2023, 9:50 p.m.