Skip to content

Commit

Permalink
added back necessary purity functions to namespace
Browse files Browse the repository at this point in the history
(to make links work in docs)
  • Loading branch information
ethanbass committed Jan 19, 2024
1 parent 2b9f0d5 commit 981dd5d
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 3 deletions.
2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export(filter_peaks)
export(filter_peaktable)
export(find_peaks)
export(fit_peaks)
export(get_agilent_threshold)
export(get_peaks)
export(get_peaktable)
export(get_purity)
Expand All @@ -33,6 +34,7 @@ export(read_chroms)
export(reshape_chroms)
export(reshape_peaktable)
export(scan_chrom)
export(trim_peak)
export(write_peaktable)
import(ptw)
importFrom(Formula,Formula)
Expand Down
9 changes: 6 additions & 3 deletions R/get_purity.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#' Agilent Technologies, April 1, 2003, 16.
#' /href{https://www.agilent.com/cs/library/applications/5988-8647EN.pdf}
#' @author Ethan Bass
#' @keywords internal
#' @export

get_purity <- function(x, pos, weight = 1, cutoff = 0.05,
Expand Down Expand Up @@ -84,7 +85,7 @@ find_noise <- function(x, noise_threshold = 0.01, lambdas){
#' @param x A chromatogram in matrix format
#' @param pos A vector containing peak information
#' @param weight scaling parameter affecting stringency of threshold.
#' @param noise_variance Variance of noise. Argument to \code{\link{get_agilent_threshold}}.
#' @param noise_variance Variance of noise.
#' @param noise_threshold Threshold to define noise. Highest proportion of maximum absorbance.
#' @param lambdas Wavelengths to include
#' @return Returns a vector of purity thresholds at each retention time index
Expand All @@ -94,7 +95,8 @@ find_noise <- function(x, noise_threshold = 0.01, lambdas){
#' Agilent Technologies, April 1, 2003, 16.
#' /href{https://www.agilent.com/cs/library/applications/5988-8647EN.pdf}
#' @author Ethan Bass
#' @noRd
#' @keywords internal
#' @export

get_agilent_threshold <- function(x, pos, weight = 1, noise_variance = NULL,
noise_threshold = .005,
Expand Down Expand Up @@ -170,7 +172,8 @@ get_purity_values <- function(x, pos, weight = 1, noise_variance = NULL,
#' @return Returns indices within the peak specified by \code{pos} with a higher
#' signal intensity than the specified cutoff.
#' @author Ethan Bass
#' @noRd
#' @keywords internal
#' @export

trim_peak <- function(x, pos, cutoff = 0.05){
idx <- pos[2]:pos[3]
Expand Down
44 changes: 44 additions & 0 deletions man/get_agilent_threshold.Rd

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

1 change: 1 addition & 0 deletions man/get_purity.Rd

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

26 changes: 26 additions & 0 deletions man/trim_peak.Rd

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

0 comments on commit 981dd5d

Please sign in to comment.