Learn R Programming

GRAB (version 0.2.4)

GRAB.SPACox: Instruction of SPACox method

Description

SPACox is primarily intended for time-to-event traits in unrelated samples from large-scale biobanks. It uses the empirical cumulant generating function (CGF) to perform SPA-based single-variant association tests, enabling analysis with residuals from any null model.

Usage

GRAB.SPACox()

Arguments

Details

Additional Control Parameters for GRAB.NullModel():

  • range (numeric vector, default: c(-100, 100)): Range for saddlepoint approximation grid. Must be symmetric (range[2] = -range[1]).

  • length.out (integer, default: 10000): Number of grid points for saddlepoint approximation.

Method-specific elements in the SPACox_NULL_Model object returned by GRAB.NullModel()::

  • mresid: Martingale residuals (numeric or "Residual" class).

  • cumul: Cumulative sums for variance estimation (matrix).

  • tX: Transpose of design matrix (matrix).

  • yVec: Event indicator (numeric or "Residual" class).

  • X.invXX: Matrix for variance calculations (matrix).

Additional Control Parameters for GRAB.Marker():

  • pVal_covaAdj_Cutoff (numeric, default: 5e-05): P-value cutoff for covariate adjustment.

Output file columns:

Marker

Marker identifier (rsID or CHR:POS:REF:ALT).

Info

Marker information in format CHR:POS:REF:ALT.

AltFreq

Alternative allele frequency in the sample.

AltCounts

Total count of alternative alleles.

MissingRate

Proportion of missing genotypes.

Pvalue

P-value from the score test.

zScore

Z-score from the score test.

References

Bi et al. (2020). Fast and accurate method for genome-wide time-to-event data analysis and its application to UK Biobank. tools:::Rd_expr_doi("10.1016/j.ajhg.2020.06.003")

Examples

Run this code
PhenoFile <- system.file("extdata", "simuPHENO.txt", package = "GRAB")
GenoFile <- system.file("extdata", "simuPLINK.bed", package = "GRAB")
OutputFile <- file.path(tempdir(), "resultSPACox.txt")
PhenoData <- data.table::fread(PhenoFile, header = TRUE)

# Step 1 option 1
obj.SPACox <- GRAB.NullModel(
  survival::Surv(SurvTime, SurvEvent) ~ AGE + GENDER,
  data = PhenoData,
  subjIDcol = "IID",
  method = "SPACox",
  traitType = "time-to-event"
)

# Step 1 option 2
residuals <- survival::coxph(
  survival::Surv(SurvTime, SurvEvent) ~ AGE + GENDER,
  data = PhenoData,
  x = TRUE
)$residuals

obj.SPACox <- GRAB.NullModel(
  residuals ~ AGE + GENDER,
  data = PhenoData,
  subjIDcol = "IID",
  method = "SPACox",
  traitType = "Residual"
)

# Step 2
GRAB.Marker(obj.SPACox, GenoFile, OutputFile)

head(data.table::fread(OutputFile))

Run the code above in your browser using DataLab