Given a gene identifier, return the most likely gene_id type.

guess_id(gene, regulondb)

Arguments

gene

Character vector of gene identifiers (id, name, bnumber or gi).

regulondb

A regulondb() object.

Value

A character(1) vector with the name column guessed value.

Author

Jesús Emiliano Sotelo Fonseca

Examples

## Connect to the RegulonDB database if necessary
if (!exists("regulondb_conn")) regulondb_conn <- connect_database()
#> snapshotDate(): 2021-10-20

## Build the regulon db object
e_coli_regulondb <-
    regulondb(
        database_conn = regulondb_conn,
        organism = "E.coli",
        database_version = "1",
        genome_version = "1"
    )

## Lists all available identifiers for "araC"
## Guess name
guess_id("araC", e_coli_regulondb)
#> [1] "name"

## Guess id
guess_id("ECK120000050", e_coli_regulondb)
#> [1] "id"

## Guess bnumber
guess_id("b0064", e_coli_regulondb)
#> [1] "bnumber"