Skip to content

Commit

Permalink
use match.ags to check imput parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
sdgamboa committed Jun 24, 2024
1 parent d8fe5a6 commit 71e3b0e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
15 changes: 11 additions & 4 deletions R/bugphyzz.R
Original file line number Diff line number Diff line change
Expand Up @@ -164,17 +164,24 @@ importBugphyzz <- function(
#' sigs <- purrr::list_flatten(sigs, name_spec = "{inner}")
#'
makeSignatures <- function(
dat, taxIdType = "NCBI_ID",
taxLevel = "mixed",
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
) {
taxIdType <- match.arg(arg = taxIdType, several.ok = FALSE)
taxLevel <- match.arg(arg = taxLevel, several.ok = TRUE)
evidence <- match.arg(arg = evidence, several.ok = TRUE)
frequency <- match.arg(arg = frequency, several.ok = TRUE)

attrType <- unique(dat$Attribute_type)
if ("mixed" %in% taxLevel) {
taxLevel <- c(
"kingdom", "phylum", "class", "order", "family", "genus", "species",
"strain"
"superkingdom", "phylum", "class", "order", "family", "genus",
"species", "strain"
)
}
dat <- dat |>
Expand Down
5 changes: 3 additions & 2 deletions man/makeSignatures.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 71e3b0e

Please sign in to comment.