PeaksInKsDistributionValues: Find Peaks in the Ks Distribution

View source: R/find_peaks_resample_95_CI.R

PeaksInKsDistributionValuesR Documentation

Find Peaks in the Ks Distribution

Description

This function identifies peaks in a distribution of Ks (synonymous substitution rates) values.

Usage

PeaksInKsDistributionValues(
  ks,
  binWidth = 0.1,
  maxK = 5,
  m = 3,
  peak.maxK = 2,
  spar = 0.25
)

Arguments

ks

A numeric vector containing Ks values for which peaks will be identified.

binWidth

A numeric value specifying the bin width for creating the histogram.

maxK

A numeric value indicating the maximum Ks value to consider.

m

An integer indicating the half-width of the neighborhood to consider when identifying peaks. A larger value of m makes peak detection less sensitive.

peak.maxK

A numeric value specifying the maximum Ks value to consider when identifying peaks.

spar

A numeric value controlling the smoothness of the spline fit. Higher values make the fit smoother.

Value

A numeric vector containing the identified peaks in the Ks distribution.


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