mtskat: Wrapper for SKAT sans resampling, with multi-threading over...

View source: R/mtskat.R

mtskatR Documentation

Wrapper for SKAT sans resampling, with multi-threading over SNP windows

Description

Wrapper for SKAT sans resampling, with multi-threading over SNP windows

Usage

mtskat(
  this_phenotype,
  covariates,
  pre_allocated_SNP_windows,
  raw_file_path,
  n_thread,
  missing_cutoff = 0.15
)

Arguments

this_phenotype

Phenotype data that has been read into R from the standard PLINK phenotype file format (PLINK documentation)

covariates

Covariates data that has been read into R from a comma-delimited text file with a header and one row for each genotype, in the same order as the phenotype file.

pre_allocated_SNP_windows

A list of SNP windows along with their positions and scaffolds, prepared using pre_allocate

raw_file_path

complete file path to SNP data in '.traw' format (see PLINK documentation)

n_thread

An integer indicating the number of threads to be used for multithreading

missing_cutoff

A numeric threshold representing the minimum desired missing rate; missing rate is defined for each SNP as the proportion of genotypes missing data for the given SNP. Imputation to mean is performed , either by 'pre_allocate' or 'SKAT' itself, for all remaining missing values

Value

A dataframe with columns for scaffold ID, SNP window position, p-values from the model used in SKAT without resampling, and an additional column for empirical p-values (all NA at this stage since resampling is not run in 'mtskat')

Examples

## Not run: 
data("sample_phenotype")
data("sample_covariates")
data("sample_pre_allocated_SNP_windows")

mtskat(
  this_phenotype = sample_phenotype,
  covariates = sample_covariates,
  raw_file_path = sample_pre_allocated_SNP_windows[[1]][[3]],
  window_size = 3000,
  window_shift = 1000,
  pre_allocated_SNP_windows = sampel_pre_allocated_SNP_windows,
  n_core = 2)

## End(Not run)

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