as_tidygenomes: Create a new tidygenomes object

View source: R/importers.R

as_tidygenomesR Documentation

Create a new tidygenomes object

Description

This function creates a new tidygenomes object from a genome table, pangenome table, genome tree or genome pair table.

Usage

as_tidygenomes(data)

Arguments

data

A data type that can be converted into a tidygenomes object

Details

data should be one of the following:

  • a genome table: contains a variable genome, with unique values

  • a pangenome table: contains the variables gene, genome and orthogroup

  • a genome tree: should be of class phylo

  • a genome pair table: contains the variables genome_1 and genome_2, with only unique combinations and without self-pairs

Value

A tidygenomes object: this is a list consisting of a genome table and optionally extra data objects related to the genomes in the genome table

Examples

genomes <- data.frame(genome = c("genome 1", "genome 2"))
tg <- as_tidygenomes(genomes)


SWittouck/tidyorthogroups documentation built on Feb. 2, 2023, 12:45 a.m.