Skip to content

Commit

Permalink
hide function for checking ids
Browse files Browse the repository at this point in the history
  • Loading branch information
sdgamboa committed Mar 22, 2024
1 parent 5ca6d1b commit 51e9717
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 52 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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(
Expand Down
8 changes: 0 additions & 8 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Generated by roxygen2: do not edit by hand

export(check_valid_ncbi_ids)
export(getTaxonSignatures)
export(importBugphyzz)
export(makeSignatures)
Expand All @@ -12,24 +11,17 @@ 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)
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)
Expand Down
24 changes: 1 addition & 23 deletions R/check_valid_ids.R
Original file line number Diff line number Diff line change
@@ -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))
Expand Down
19 changes: 0 additions & 19 deletions man/check_valid_ncbi_ids.Rd

This file was deleted.

2 changes: 1 addition & 1 deletion vignettes/articles/checks.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down

0 comments on commit 51e9717

Please sign in to comment.