From 2a34c924112b80a95616b019d012b52cb6fa6fe9 Mon Sep 17 00:00:00 2001 From: Jeff Kimbrel Date: Fri, 29 Sep 2023 10:06:59 -0700 Subject: [PATCH] more internal function rearrangements --- DESCRIPTION | 2 +- NAMESPACE | 4 --- R/{ => internal}/abundance_validation.R | 0 .../gradient_pos_density_validation.R | 2 +- .../gradient_position_validation.R | 2 +- R/{ => internal}/isotope_validation.R | 2 +- _pkgdown.yml | 7 ++--- man/abundance_validation.Rd | 30 ------------------- man/gradient_pos_density_validation.Rd | 22 -------------- man/gradient_position_validation.Rd | 20 ------------- man/isotope_validation.Rd | 26 ---------------- 11 files changed, 7 insertions(+), 110 deletions(-) rename R/{ => internal}/abundance_validation.R (100%) rename R/{ => internal}/gradient_pos_density_validation.R (97%) rename R/{ => internal}/gradient_position_validation.R (97%) rename R/{ => internal}/isotope_validation.R (97%) delete mode 100644 man/abundance_validation.Rd delete mode 100644 man/gradient_pos_density_validation.Rd delete mode 100644 man/gradient_position_validation.Rd delete mode 100644 man/isotope_validation.Rd diff --git a/DESCRIPTION b/DESCRIPTION index 3a01407e..8a5e609a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: qSIP2 Title: qSIP Analysis -Version: 0.4.5.9006 +Version: 0.4.5.9007 Authors@R: person("Jeff", "Kimbrel", , "kimbrel1@llnl.gov", role = c("aut", "cre"), comment = c(ORCID = "YOUR-ORCID-ID")) diff --git a/NAMESPACE b/NAMESPACE index f5e75ae4..3452316c 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,13 +1,9 @@ # Generated by roxygen2: do not edit by hand -export(abundance_validation) export(add_gradient_pos_rel_amt) export(add_isotopolog_label) export(add_taxonomy) export(get_sample_counts) -export(gradient_pos_density_validation) -export(gradient_position_validation) -export(isotope_validation) export(plot_sample_curves) export(qsip_feature_data) export(qsip_sample_data) diff --git a/R/abundance_validation.R b/R/internal/abundance_validation.R similarity index 100% rename from R/abundance_validation.R rename to R/internal/abundance_validation.R diff --git a/R/gradient_pos_density_validation.R b/R/internal/gradient_pos_density_validation.R similarity index 97% rename from R/gradient_pos_density_validation.R rename to R/internal/gradient_pos_density_validation.R index 88c56571..9d85af09 100644 --- a/R/gradient_pos_density_validation.R +++ b/R/internal/gradient_pos_density_validation.R @@ -7,7 +7,7 @@ #' @return Returns `NULL` if the density values are valid, or a printed error #' #' @export -#' @keywords validation +#' @keywords internal gradient_pos_density_validation = function(gradient_pos_density, low = 1.55, high = 1.8) { diff --git a/R/gradient_position_validation.R b/R/internal/gradient_position_validation.R similarity index 97% rename from R/gradient_position_validation.R rename to R/internal/gradient_position_validation.R index 4662fcbf..126a0e99 100644 --- a/R/gradient_position_validation.R +++ b/R/internal/gradient_position_validation.R @@ -10,7 +10,7 @@ #' #' @export #' -#' @keywords validation +#' @keywords internal gradient_position_validation = function(gradient_position) { if (is.numeric(gradient_position)) { diff --git a/R/isotope_validation.R b/R/internal/isotope_validation.R similarity index 97% rename from R/isotope_validation.R rename to R/internal/isotope_validation.R index b6830251..41bf5ebf 100644 --- a/R/isotope_validation.R +++ b/R/internal/isotope_validation.R @@ -5,7 +5,7 @@ #' #' @return Returns `NULL` if the isotope strings are valid, or a printed error #' -#' @keywords validation +#' @keywords internal #' #' @export #' diff --git a/_pkgdown.yml b/_pkgdown.yml index f2f00c69..dff911fc 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -6,16 +6,15 @@ template: reference: - title: qSIP Objects contents: - - has_keyword("object") + - qsip_source_data + - qsip_sample_data + - qsip_feature_data - title: Sample Data contents: - has_keyword("sample_data") - title: Abundance Data contents: - has_keyword("abundance") -- title: Validation functions - contents: - - has_keyword("validation") - title: Data contents: - has_keyword("data") diff --git a/man/abundance_validation.Rd b/man/abundance_validation.Rd deleted file mode 100644 index d21fa8be..00000000 --- a/man/abundance_validation.Rd +++ /dev/null @@ -1,30 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/abundance_validation.R -\name{abundance_validation} -\alias{abundance_validation} -\title{Check the validity of an abundance table} -\usage{ -abundance_validation(data, id) -} -\arguments{ -\item{data}{ASV/OTU table (dataframe)} - -\item{id}{Column name with taxa IDs (string)} -} -\value{ -Returns \code{NULL} if the values are valid, or a printed error -} -\description{ -This validation function will check the validity of an abundance table. It -can run standalone, but was written to be run when creating a qSIP2 abundance -table object. Therefore, a valid run of this function will return NULL rather -than a value. -} -\details{ -Rows should contain the unique taxa ids with a column designated with the id -argument. Each other column name should be a unique sample name. - -Validity checking includes making sure all data is numeric (except for the -taxa IDs), all numbers are integers, and no numbers are negative. -} -\keyword{internal} diff --git a/man/gradient_pos_density_validation.Rd b/man/gradient_pos_density_validation.Rd deleted file mode 100644 index 6c32cfd4..00000000 --- a/man/gradient_pos_density_validation.Rd +++ /dev/null @@ -1,22 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/gradient_pos_density_validation.R -\name{gradient_pos_density_validation} -\alias{gradient_pos_density_validation} -\title{Check the validity of density values} -\usage{ -gradient_pos_density_validation(gradient_pos_density, low = 1.55, high = 1.8) -} -\arguments{ -\item{gradient_pos_density}{Density value or values (string(s))} - -\item{low}{A low limit for valid density values (numeric, default: 1.55)} - -\item{high}{A high limit for valid density values (numeric, default: 1.8)} -} -\value{ -Returns \code{NULL} if the density values are valid, or a printed error -} -\description{ -Check the validity of density values -} -\keyword{validation} diff --git a/man/gradient_position_validation.Rd b/man/gradient_position_validation.Rd deleted file mode 100644 index db17010c..00000000 --- a/man/gradient_position_validation.Rd +++ /dev/null @@ -1,20 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/gradient_position_validation.R -\name{gradient_position_validation} -\alias{gradient_position_validation} -\title{Check the validity of gradient position values} -\usage{ -gradient_position_validation(gradient_position) -} -\arguments{ -\item{gradient_position}{Gradient position value or values (string(s))} -} -\value{ -Returns \code{NULL} if the gradient position values are valid, or a -printed error -} -\description{ -Valid gradient positions are integers. The value can be \code{-1} to represent -"bulk" or non-qSIP samples. -} -\keyword{validation} diff --git a/man/isotope_validation.Rd b/man/isotope_validation.Rd deleted file mode 100644 index 074f5ec3..00000000 --- a/man/isotope_validation.Rd +++ /dev/null @@ -1,26 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/isotope_validation.R -\name{isotope_validation} -\alias{isotope_validation} -\title{Check the validity of an isotope string} -\usage{ -isotope_validation( - isotope, - isotope_list = c("12C", "13C", "14N", "15N", "16O", "18O") -) -} -\arguments{ -\item{isotope}{Isotope value or values (string(s))} - -\item{isotope_list}{Isotopes to check against (strings, default: c("12C", "13C", "14N", "15N", "16O", "18O"))} -} -\value{ -Returns \code{NULL} if the isotope strings are valid, or a printed error -} -\description{ -Check the validity of an isotope string -} -\note{ -The isotope_list may change if isotopolog_label stays a thing. Only the "heavy" isotopes will be allowed. -} -\keyword{validation}