diffPosMaxMethod {similaRpeak} | R Documentation

## Difference between two profiles maximal peaks positions

### Description

Calculate and return the difference between two profiles maximal peaks positions. The difference is always the first profile value (profile1 parameter) minus the second profile value (profile2 parameter). When more than one maximual peak is present in one profile, the mediane of the position is calculated and used as the maximal peak position. If one threshold is not respected, the function returns `NA`.

### Usage

    diffPosMaxMethod(profile1, profile2, threshold = 1, thresholdDist = 100,
      tolerance = 0.01)

### Arguments

`profile1` | a `vector` of `numeric` values, the first profile containing the alignment depth for each position. The `profile1` and `profile2` should have the same length.
`profile2` | a `vector` of `numeric` values, the second profile containing the alignment depth for each position. The `profile1` and `profile2` should have the same length.
`threshold` | a `numeric`, the minimum peak value accepted to calculate the metric. Default = 1.
`thresholdDist` | a `numeric`, the maximum distance accepted between two maximum peaks positions in the same profile. Default = 100.
`tolerance` | a `numeric`, the maximum variation accepted on the maximum value to consider a position as a peak position. The tolerance must

### Value

The calculated ratio or `NA` if not all thresholds are respected.

### Author(s)

Astrid Deschenes, Elsa Bernatchez

### See Also

- `MetricFactory` for using the recommanded interface to calculate all available metrics separately or togheter.

[Package similaRpeak version 1.18.0 Index]