Calculate score statistics (extremal values) for given regions. This function is intended for the comparison of different scores for the same chromosomal regions.
calc_region_stats(
scan,
regions,
threshold = NA,
pval = FALSE,
ignore_sign = FALSE,
right = TRUE
)
a data frame with column names CHR
, START
and END
,
specifying chromosomal regions (e.g. as obtained by function calc_candidate_regions
).
boundary score above which markers are defined as "extreme".
logical. If TRUE
use the (negative log-) p-value instead of the score.
logical. If TRUE
(default), take absolute values of score.
logical, indicating if the regions should be closed on the right (and open on the left) or vice versa.
A data frame with chromosomal regions. For each region the overall number of markers, their mean and maximum, the number of markers with extremal values, their percentage of all markers and their average are reported.