calc_region_stats: Calculate score statistics for given regions

Description Usage Arguments Value See Also

View source: R/calc_region_stats.R

Description

Calculate score statistics (extremal values) for given regions. This function is intended for the comparison of different scores for the same chromosomal regions.

Usage

1
2
3
4
5
6
7
8
calc_region_stats(
  scan,
  regions,
  threshold = NA,
  pval = FALSE,
  ignore_sign = FALSE,
  right = TRUE
)

Arguments

scan

a data frame containing scores (output of ihh2ihs, ines2rsb or ies2xpehh).

regions

a data frame with column names CHR, START and END, specifying chromosomal regions (e.g. as obtained by function calc_candidate_regions).

threshold

boundary score above which markers are defined as "extreme".

pval

logical. If TRUE use the (negative log-) p-value instead of the score.

ignore_sign

logical. If TRUE (default), take absolute values of score.

right

logical, indicating if the regions should be closed on the right (and open on the left) or vice versa.

Value

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.

See Also

calc_candidate_regions


rehh documentation built on Sept. 15, 2021, 5:06 p.m.