ratioIntersectMethod: Ratio between the intersection area of two profiles and the...

View source: R/metricsMethods.R

ratioIntersectMethodR Documentation

Ratio between the intersection area of two profiles and the total area covered by those profiles

Description

Calculate and return the ratio between the intersection area of two profiles and the total area covered by those profiles. If the total area is inferior to the threshold, the function returns NA.

Usage

ratioIntersectMethod(profile1, profile2, threshold = 1)

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 total area value accepted to calculate a ratio.

Value

The calculated ratio or NA if the total area is inferior to the threshold.

Author(s)

Astrid Deschenes, Elsa Bernatchez

See Also

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


adeschen/similaRpeak documentation built on March 23, 2022, 11:10 a.m.