bootStrapPeaks: Bootstrap Peaks in the Ks Distribution

View source: R/find_peaks_resample_95_CI.R

bootStrapPeaksR Documentation

Bootstrap Peaks in the Ks Distribution

Description

This function performs bootstrapping on a given Ks (synonymous substitution rates) distribution to estimate peaks within the distribution.

Usage

bootStrapPeaks(
  ksRaw,
  binWidth = 0.1,
  maxK = 5,
  m = 3,
  peak.index = 1,
  peak.maxK = 2,
  spar = 0.25,
  rep = 1000,
  from = 0,
  to = maxK
)

Arguments

ksRaw

A numeric vector representing the raw Ks distribution to be bootstrapped.

binWidth

A numeric value indicating the bin width for histogram calculation.

maxK

A numeric value indicating the maximum Ks value to consider in the distribution.

m

An integer specifying the parameter for peak detection.

peak.index

An integer indicating the index of the peak to be estimated.

peak.maxK

A numeric value indicating the maximum Ks value for peak estimation.

spar

A numeric value controlling the smoothness of spline fitting.

rep

An integer specifying the number of bootstrap repetitions.

from

A numeric value indicating the lower bound for peak estimation.

to

A numeric value indicating the upper bound for peak estimation.

Value

A numeric vector containing bootstrapped peak estimates.


shinyWGD documentation built on April 4, 2025, 2:28 a.m.