diff --git a/DESCRIPTION b/DESCRIPTION index f95e35f7..ee56f5d9 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: bugphyzz Title: A harmonized data resource and software for enrichment analysis of microbial physiologies -Version: 0.0.1.8 +Version: 0.0.1.9 Authors@R: c( person( diff --git a/NAMESPACE b/NAMESPACE index 25fefd12..8d9bfce0 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,6 +1,5 @@ # Generated by roxygen2: do not edit by hand -export(check_valid_ncbi_ids) export(getTaxonSignatures) export(importBugphyzz) export(makeSignatures) @@ -12,13 +11,10 @@ importFrom(crayon,red) importFrom(dplyr,across) importFrom(dplyr,bind_rows) importFrom(dplyr,group_by) -importFrom(dplyr,left_join) importFrom(dplyr,mutate) -importFrom(dplyr,relocate) importFrom(dplyr,rename) importFrom(dplyr,select) importFrom(dplyr,summarise) -importFrom(magrittr,"%>%") importFrom(magrittr,set_colnames) importFrom(methods,as) importFrom(purrr,discard) @@ -26,10 +22,6 @@ importFrom(purrr,map) importFrom(purrr,map2) importFrom(purrr,modify_depth) importFrom(purrr,set_names) -importFrom(taxize,classification) -importFrom(taxizedb,taxid2name) -importFrom(tibble,as_tibble) -importFrom(tibble,tibble) importFrom(tidyselect,starts_with) importFrom(utils,capture.output) importFrom(utils,head) diff --git a/R/check_valid_ids.R b/R/check_valid_ids.R index 28e365b6..d01c141e 100644 --- a/R/check_valid_ids.R +++ b/R/check_valid_ids.R @@ -1,26 +1,4 @@ -#' Check that NCBI IDs are valid -#' -#' \code{check_valid_ncbi_ids} checks that the NCBI IDs in a dataset from -#' bugphyzz are valid. -#' -#' @param dat Dataset imported from bugphyzz. -#' -#' @return A dataframe with the positions and values that must be corrected, -#' If no errors are found, the output is NULL. -#' -#' @importFrom magrittr %>% -#' @importFrom taxizedb taxid2name -#' @importFrom taxize classification -#' @importFrom tibble tibble -#' @importFrom dplyr bind_rows -#' @importFrom tibble as_tibble -#' @importFrom dplyr left_join -#' @importFrom dplyr relocate -#' -#' @export -#' -check_valid_ncbi_ids <- function(dat) { - +.check_valid_ncbi_ids <- function(dat) { ncbi_ids <- dat[['NCBI_ID']] ncbi_ids <- ncbi_ids[!is.na(ncbi_ids)] ncbi_ids <- unique(as.character(ncbi_ids)) diff --git a/man/check_valid_ncbi_ids.Rd b/man/check_valid_ncbi_ids.Rd deleted file mode 100644 index d7dbbde7..00000000 --- a/man/check_valid_ncbi_ids.Rd +++ /dev/null @@ -1,19 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/check_valid_ids.R -\name{check_valid_ncbi_ids} -\alias{check_valid_ncbi_ids} -\title{Check that NCBI IDs are valid} -\usage{ -check_valid_ncbi_ids(dat) -} -\arguments{ -\item{dat}{Dataset imported from bugphyzz.} -} -\value{ -A dataframe with the positions and values that must be corrected, -If no errors are found, the output is NULL. -} -\description{ -\code{check_valid_ncbi_ids} checks that the NCBI IDs in a dataset from -bugphyzz are valid. -} diff --git a/vignettes/articles/checks.Rmd b/vignettes/articles/checks.Rmd index 498b7869..a501eae9 100644 --- a/vignettes/articles/checks.Rmd +++ b/vignettes/articles/checks.Rmd @@ -144,7 +144,7 @@ while taxizedb behaves like https://www.ncbi.nlm.nih.gov/taxonomy/. ```{r, message=FALSE, warning=FALSE, eval=FALSE} -id_err <- lapply(phys, check_valid_ncbi_ids) %>% +id_err <- lapply(phys, bugphyzz:::.check_valid_ncbi_ids) %>% purrr::discard(is.null) %>% bind_rows(.id = 'dataset')