one_singlescanDO: Performs marker regression

View source: R/one_singlescanDO.R

one_singlescanDOR Documentation

Performs marker regression

Description

This is an internal function called by pairscan_null when generating the null distribution for significance testing. To perform permutations, we permute trait values, and then re-do the singlescan, marker selection, and the pair scan on the permuted data. This function performs the singlescan on the permuted data.

Usage

one_singlescanDO(
  phenotype_vector,
  genotype_mat,
  model_family,
  ref_allele = "A",
  covar_table = NULL,
  run_parallel = FALSE,
  n_cores = 4
)

Arguments

phenotype_vector

A vector of phenotype values, one entry for each individual.

genotype_mat

A matrix of genotype values with individuals in rows and markers in columns. Matrix entries contain the probability of the reference allele at each position for each individual.

model_family

Indicates the model family of the phenotypes. This can be either "gaussian" or "binomial".

ref_allele

the reference allele from the Cape data_obj

covar_table

A matrix of covariates with one row per individual.

run_parallel

A logical value indicating whether multiple processors should be used

n_cores

The number of processors to use if run_parallel is TRUE.

Value

This function returns the t_statistics for all linear models testing the effects of each marker on the phenotype.


TheJacksonLaboratory/cape documentation built on Feb. 12, 2024, 4:34 p.m.