SKATtest_usingSKATLib: Run single variant score tests with SPA based on the logistic...

View source: R/SAIGE_SKAT_NULL_Model_usingSKATLib_p.R

SKATtest_usingSKATLibR Documentation

Run single variant score tests with SPA based on the logistic mixed model.

Description

Run single variant score tests with SPA based on the logistic mixed model.

Usage

SKATtest_usingSKATLib(
  dosageFile = "",
  dosageFileNrowSkip = 0,
  dosageFileNcolSkip = 0,
  dosageFilecolnamesSkip = c("SNPID", "CHR", "POS", "Allele0", "Allele1"),
  dosageFileChrCol = "CHR",
  bgenFile = "",
  bgenFileIndex = "",
  vcfFile = "",
  vcfFileIndex = "",
  vcfField = "DS",
  savFile = "",
  savFileIndex = "",
  sampleFile = "",
  idstoExcludeFile = "",
  idstoIncludeFile = "",
  rangestoExcludeFile = "",
  rangestoIncludeFile = "",
  chrom = "",
  start = 1,
  end = 2.5e+08,
  minMAC = 0.5,
  minMAF = 0,
  maxMAFforGroupTest = 1,
  minInfo = 0,
  SKATmodelFile = "",
  SAIGEOutputFile = "",
  numLinesOutput = 10000,
  IsOutputAFinCaseCtrl = FALSE,
  groupFile = "",
  condition = "",
  kernel = "linear.weighted",
  method = "optimal.adj",
  weights.beta = c(1, 25),
  r.corr = 0
)

Arguments

dosageFile

character. Path to dosage file. Each line contains dosages for a marker to be tested

dosageFileNrowSkip

integer(>=0). Number of lines to be skiped in the dosage file.

dosageFileNcolSkip

integer(>=0). Number of columns to be skiped in the dosage file

dosageFilecolnamesSkip

vector of characters. The column names of the skipped columns. Default: c("SNPID", "CHR", "POS", "Allele0", "Allele1")

dosageFileChrCol

string. The column name for the chromosome column. Must be in the dosageFilecolnamesSkip. Required If LOCO = TRUE and chrom ="".

bgenFile

character. Path to bgen file. Currently version 1.2 with 8 bit compression is supported

bgenFileIndex

character. Path to the .bgi file (index of the bgen file)

vcfFile

character. Path to vcf file

vcfFileIndex

character. Path to index for vcf file by tabix, ".tbi" by "tabix -p vcf file.vcf.gz"

vcfField

character. genotype field in vcf file to use. "DS" for dosages or "GT" for genotypes. By default, "DS".

savFile

character. Path to sav file

savFileIndex

character. Path to index for sav file .s1r

sampleFile

character. Path to the file that contains one column for IDs of samples in the dosage, vcf, sav, or bgen file with NO header

idstoExcludeFile

character. Path to the file containing variant ids to be excluded from the bgen or vcf file

idstoIncludeFile

character. Path to the file containing variant ids to be included from the bgen or vcf file

rangestoExcludeFile

character. Path to the file containing genome regions to be excluded from the bgen file. The file contains three columns for chromosome, start, and end respectively with no header

rangestoIncludeFile

character. Path to the file containing genome regions to be included from the bgen file. The file contains three columns for chromosome, start, and end respectively with no header

chrom

character. string for the chromosome to include from vcf file. Required for vcf file. If LOCO is specified, providing chrom will save computation cost

start

numeric. start genome position to include from vcf file.

end

numeric. end genome position to include from vcf file.

minMAC

numeric. Minimum minor allele count of markers to test. By default, 1. The higher threshold between minMAC and minMAF will be used

minMAF

numeric. Minimum minor allele frequency of markers to test. By default 0. The higher threshold between minMAC and minMAF will be used

maxMAFforGroupTest

numeric. Maximum minor allele frequency of markers to test in group test. By default 1.

minInfo

numeric. Minimum imputation info of markers to test (in bgen file)

SAIGEOutputFile

character. Path to the output file containing the SPAGMMAT test results

numLinesOutput

numeric. Output results for how many marker each time.

IsOutputAFinCaseCtrl

logical. Whether to output allele frequency in cases and controls. By default, FALSE

groupFile

character. Path to the group file containing one column "GeneID", and one column for ID of the tested genetic markers delimited by comma. This file is space-delimited can only work with the bgen,sav,and vcf format

GMMATmodelFile

character. Path to the input file containing the glmm model, which is output from previous step. Will be used by load()

varianceRatioFile

character. Path to the input file containing the variance ratio, which is output from the previous step

Cutoff

by default = 2 (SPA test would be used when p value < 0.05 under the normal approximation)

IsSparse

logical. Whether to exploit the sparsity of the genotype vector for less frequent variants to speed up the SPA tests or not for dichotomous traits. By default, TRUE

condition.

For conditional analysis. Genetic marker ids (chr:pos_ref/alt) seperated by comma. e.g.chr3:101651171_C/T,chr3:101651186_G/A. Note that currently conditional analysis is only for vcf/sav input.

Value

SAIGEOutputFile


weizhouUMICH/SAIGE documentation built on May 6, 2022, 12:34 a.m.