select_windows_range_p: Select windows corresponding to p-values within range of...

View source: R/select_windows_range_p.R

select_windows_range_pR Documentation

Select windows corresponding to p-values within range of interest

Description

Select windows corresponding to p-values within range of interest

Usage

select_windows_range_p(x, upper_bound, lower_bound, top_N = Inf)

Arguments

x

An output from mtskat or a similarly formatted x.frame

upper_bound

A numeric value corresponding to the maximum p-value for the range of interest

lower_bound

A numeric value correspondign to the minimum p-value for the range of interest

top_N

Integer representing the number of top associations on which the user wishes to perform resampling. For example, if this value is set to 5, any SNPs that do not produce p-values among the lowest 5 will not be included in outputs from this function.

Value

A numeric vector with indices for the position (center of window) for each SNP window with p-values within the range of interest

Examples

data("small_mtskat_results")

# Select any windows with p-values within bounds, regardless of whether they
#   are among top SNPs
select_windows_range_p(
  x = small_mtskat_results,
  upper_bound = 0.01,
  lower_bound = 0.001)

# Only include SNP windows if they are among the top 5 SNP windows
select_windows_range_p(
  x = small_mtskat_results,
  upper_bound = 0.01,
  lower_bound = 0.001,
  top_N = 5)

naglemi/mtmcskat documentation built on Aug. 23, 2023, 5:35 p.m.