Learn R Programming

GRAB (version 0.2.4)

GRAB.Marker: Perform single-marker association tests using a fitted null model

Description

Conducts single-marker association tests between genetic variants and phenotypes using various statistical methods supported by GRAB.

Usage

GRAB.Marker(
  objNull,
  GenoFile,
  OutputFile,
  GenoFileIndex = NULL,
  OutputFileIndex = NULL,
  control = NULL
)

Value

The function returns NULL invisibly. Results are written to OutputFile. For method-specific examples and output columns and format, see:

  • POLMM method: GRAB.POLMM

  • SPACox method: GRAB.SPACox

  • SPAmix method: GRAB.SPAmix

  • WtCoxG method: GRAB.WtCoxG

  • SPAGRM method: GRAB.SPAGRM

  • SAGELD method: GRAB.SAGELD

Arguments

objNull

(S3 object) Null model object from GRAB.NullModel, SPAGRM.NullModel or SAGELD.NullModel. Supported classes:

  • POLMM_NULL_Model: See ?GRAB.POLMM.

  • SPACox_NULL_Model: See ?GRAB.SPACox.

  • SPAmix_NULL_Model: See ?GRAB.SPAmix.

  • WtCoxG_NULL_Model: See ?GRAB.WtCoxG.

  • SPAGRM_NULL_Model: See ?GRAB.SPAGRM.

  • SAGELD_NULL_Model: See ?GRAB.SAGELD.

GenoFile

Path to genotype file. Supported formats determined by extension:

  • PLINK: "prefix.bed"

  • BGEN: "prefix.bgen" (version 1.2 with 8-bit compression)

OutputFile

(character) Path for saving association test results.

GenoFileIndex

(character vector or NULL) Associated files for the genotype file (auto-detected if NULL):

  • PLINK: c("prefix.bim", "prefix.fam")

  • BGEN: c("prefix.bgen.bgi", "prefix.sample") or c("prefix.bgen.bgi")

OutputFileIndex

(character or NULL) #' Path to the progress tracking file from a previous unfinished run. Enables analysis to restart if interrupted. If NULL (default), uses paste0(OutputFile, ".index").

control

(list or NULL) List of control parameters with the following elements:

  • AlleleOrder (character or NULL): Allele order in genotype file. Options: "ref-first", "alt-first", or NULL (default: "alt-first" for BGEN, "ref-first" for PLINK).

  • Marker Selection:

    • AllMarkers (logical): Set to TRUE (default) to analyze all markers. Automatically set to FALSE if any include/exclude files are provided.

    • IDsToIncludeFile (character or NULL): Path to file with marker IDs to include.

    • RangesToIncludeFile (character or NULL): Path to file with genomic ranges to include. Can be used with IDsToIncludeFile (union will be used).

    • IDsToExcludeFile (character or NULL): Path to file with marker IDs to exclude.

    • RangesToExcludeFile (character or NULL): Path to file with genomic ranges to exclude. Can be used with IDsToExcludeFile (union will be excluded).

    • Note: Cannot use both include and exclude files simultaneously.

  • impute_method (character): Imputation method for handling missing genotypes during analysis in C++ backend. Applies to all genotype formats. Options: "mean" (default), "minor", "drop".

  • missing_cutoff (numeric): Exclude markers with missing rate above this threshold. Range: 0 to 0.5. Default: 0.15.

  • min_maf_marker (numeric): Exclude markers with MAF below this threshold. Range: 0 to 0.1. Default: 0.001.

  • min_mac_marker (numeric): Exclude markers with MAC below this threshold. Range: 0 to 100. Default: 20.

  • nMarkersEachChunk (integer): Number of markers processed per chunk. Range: 1000 to 100000. Default: 10000.

  • SPA_Cutoff (numeric): Z-score cutoff for saddlepoint approximation. When the absolute value of the test statistic exceeds this cutoff, SPA is used to calculate more accurate p-values. Default: 2.