tally_p_null: Multithreaded calculation of null p-values to enable...

View source: R/tally_p_null.R

tally_p_nullR Documentation

Multithreaded calculation of null p-values to enable calculation of empirical p-values

Description

These functions are used to calculate empirical p-values given initial p-values and null p-values from 'SKAT'.

Usage

tally_p_null(p_table)

Arguments

p_table

a data frame or matrix with a row for each SNP window and a column for each p-value resulting from a permuted null model

Details

Prior to completion of jobs by cores in 'MTMC-SKAT', the number of p-values above or below the in initial p-value are calculated using 'tally_p_null'. This reduces the load of data to be returned. Empirical p-values are then calculated from all returned data using 'p_empirical_from_tally'.

Value

a data frame with four columns: 1) position, in base pairs, for the center of a SNP; 2) the original p-value for the given SNP window, obtained by SKAT without resampling; 3) The number of permuted p-values from a given thread that are above the original p-value for a given window; and 4) The number of permuted p-values from a given thread that are below the original p-value for a given window

Examples

## Not run: sample_p_null_tallies <- tally_p_null(sample_p_table)


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