makeSignatures Creates signatures for a list of bug signatures from a tidy data.frame imported through the importBugphyzz function. Please run browseVignettes("bugphyz") for detailed examples.

makeSignatures(
  dat,
  taxIdType = c("NCBI_ID", "Taxon_name"),
  taxLevel = c("mixed", "superkingdom", "phylum", "class", "order", "family", "genus",
    "species", "strain"),
  evidence = c("exp", "igc", "tas", "nas", "tax", "asr"),
  frequency = c("always", "usually", "sometimes", "unknown"),
  minSize = 10,
  min = NULL,
  max = NULL
)

Arguments

dat

A data.frame.

taxIdType

A character string. Valid options: NCBI_ID, Taxon_name.

taxLevel

A character vector. Taxonomic rank. Valid options: superkingdom, kingdom, phylum, class, order, family, genus, species, strain. They can be combined. "mixed" is equivalent to select all valid ranks.

evidence

A character vector. Valid options: exp, igc, nas, tas, tax, asr. They can be combined. Default is all.

frequency

A character vector. Valid options: always, usually, sometimes, rarely, unknown. They can be combined. By default, "rarely" is excluded.

minSize

Minimum number of bugs in a signature. Default is 10.

min

Minimum value (inclusive). Only for numeric attributes. Default is NULL.

max

Maximum value (inclusive). Only for numeric attributes. Default is NULL.

Value

A list of character vectors with scientific names or taxids.

Examples


bp <- importBugphyzz()
#> Using data downloaded on 2024-10-30 16:09:43.
sigs <- purrr::map(bp, makeSignatures)
sigs <- purrr::list_flatten(sigs, name_spec = "{inner}")