determine_subset_pval_boundaries: Determine boundaries for subsetting SNP windows based on...

View source: R/workflow_utils.R

determine_subset_pval_boundariesR Documentation

Determine boundaries for subsetting SNP windows based on intial p-values

Description

Determine boundaries for subsetting SNP windows based on intial p-values

Usage

determine_subset_pval_boundaries(
  leading_0s,
  desired_sig_figs,
  terminal_resampling
)

Arguments

leading_0s

An integer for the number of 0's between the decimal point and the first nonzero value in the maximum p-value for SNP windows that will be included in the subset of interest

desired_sig_figs

An integer for the number of significant figures the user desires for empirical p-values

terminal_resampling

If 'TRUE', the lower boundary will be 0 so all remaining SNP windows will be included in the final set for resampling, even if their empirical p-values cannot be calculated out to the user-specified number of significant figures

Value

A list with two decimal values, named 'upper' and 'lower'

Examples


# Produce boundaries from 0.01 to 0.001
determine_subset_pval_boundaries(leading_0s = 2,
                                 desired_sig_figs = 2,
                                 terminal_resampling = FALSE)

# Produce boundaries from 0.01 to 0
determine_subset_pval_boundaries(leading_0s = 2,
                                 desired_sig_figs = 2,
                                 terminal_resampling = TRUE)

# Produce boundaries from 0.01 to 0.0001
determine_subset_pval_boundaries(leading_0s = 2,
                                 desired_sig_figs = 3,
                                 terminal_resampling = FALSE)


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