Finds the largest uniform segment that is longer than threshold
Source:R/identify_uniform_segment.R
identify_uniform_segment.Rd
Finds the largest uniform segment that is longer than threshold
Usage
identify_uniform_segment(
x,
metric = c("jaccard", "intersection", "ks", "mse", "chisq"),
threshold = 0.5,
stepsize = 1,
max_sd_size = 1
)
# S3 method for numeric
identify_uniform_segment(
x,
metric = c("jaccard", "intersection", "ks", "mse", "chisq"),
threshold = 0.5,
stepsize = 1,
max_sd_size = 1
)
# S3 method for Histogram
identify_uniform_segment(
x,
metric = c("jaccard", "intersection", "ks", "mse", "chisq"),
threshold = 0.5,
stepsize = 1,
max_sd_size = 1
)
# S3 method for GenomicHistogram
identify_uniform_segment(
x,
metric = c("jaccard", "intersection", "ks", "mse", "chisq"),
threshold = 0.5,
stepsize = 1,
max_sd_size = 1
)
Arguments
- x
numeric vector representing the density of a histogram
- metric
one of
jaccard
,intersection
,ks
,mse
,chisq
indicating metrics to use for fit optimization- threshold
numeric, indicating the minimum proportion of the subsegment which should be tested
- stepsize
integer, indicating the stepsize (relative to the histogram bins) to take in the search for the uniform subsegment
- max_sd_size
numeric, the number of standard deviations of the computed metric distribution away from the optimal uniform which has maximum length
Value
a list representing a uniform model with the following data
- par
A character string denoting the region_id of the Histogram
- dist
The distribution name
- metric
The metric used to fit the distribution
- value
The fitted value of the metric function
- dens
A function that returns the density of the fitted distribution
- seg_start
start index of the interval
- seg_end
end index of the interval