blockassoc: Association tests for blocks of genotypes (one by one)

Description Usage Arguments Details Value Author(s) Examples

View source: R/blockassoc.R

Description

Calculations association test statistics for each genetic variant in a block.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
blockassoc(qcall, data, minimac,
usubjid = getOption("gtx.usubjid", "USUBJID"), 
threshold.MAF = 0, threshold.Rsq = 0, threshold.pass = NULL,
message.begin = "blockassoc", out.signif = 6, use.compiled = FALSE)
## S3 method for class 'lm'
blockstats(m1, m0, coefname = "GENOTYPE")
## S3 method for class 'glm'
blockstats(m1, m0, coefname = "GENOTYPE")
## S3 method for class 'coxph'
blockstats(m1, m0, coefname = "GENOTYPE")
## S3 method for class 'clm'
blockstats(m1, m0, coefname = "GENOTYPE")

Arguments

qcall

A quoted call to a model fitting function

data

Data frame (phenotype data) in which qcall is to be evaluated

minimac

Path to minimac inputed genotype info and dosages

usubjid

Name of the unique subject id variable in data

threshold.MAF

Minimum minor allele frequency (MAF) for inclusion in output

threshold.Rsq

Minimum imputation quality (Rsq) for inclusion in output

threshold.pass

Character vector of SNP names to include in output independent of MAF or Rsq

message.begin

Optional text to begin each progress message with

out.signif

Number of significant digits for output

use.compiled

Flag whether to use fast C++ code for special cases

m1

Fitted model object with genotype term

m0

Fitted model object without genotype term

coefname

Name of the coefficient for genotype in m1

Details

TO BE WRITTEN

TO DO - Add arguments for genotypes to be an existing data frame, PLINK binary or –recodeA output, or VCF

Value

Returns a data frame with info and association statistics.

Author(s)

Toby Johnson Toby.x.Johnson@gsk.com

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
## Not run: 
library(ordinal)
library(survival)
library(MASS)

write.table(blockassoc(quote(lm(simCount ~ sexMale + PC1+PC2+PC3+PC4+PC5+PC6+PC7+PC8+PC9+PC10)),
                       data = read.table("phenotypes/simCount.pheno", header = TRUE, as.is = TRUE),
                       minimac = "imputed-20120314/chr22chunk6",
                       threshold.MAF = 0.01, threshold.Rsq = 0.5),
            file = "test-lm.out", row.names = FALSE, quote = FALSE)

write.table(blockassoc(quote(glm(simCount ~ sexMale + PC1+PC2+PC3+PC4+PC5+PC6+PC7+PC8+PC9+PC10,
family = poisson)),
                       data = read.table("phenotypes/simCount.pheno", header = TRUE, as.is = TRUE),
                       minimac = "imputed-20120314/chr22chunk6",
                       threshold.MAF = 0.01, threshold.Rsq = 0.5),
            file = "test-glm.out", row.names = FALSE, quote = FALSE)

write.table(blockassoc(quote(clm(factor(simCount) ~ sexMale + PC1+PC2+PC3+PC4+PC5+PC6+PC7+PC8+PC9+PC10)),
                       data = read.table("phenotypes/simCount.pheno", header = TRUE, as.is = TRUE),
                       minimac = "imputed-20120314/chr22chunk6",
                       threshold.MAF = 0.01, threshold.Rsq = 0.5),
            file = "test-clm.out", row.names = FALSE, quote = FALSE)

write.table(blockassoc(quote(coxph(Surv(simLife, simSurv) ~ sexMale + PC1+PC2+PC3+PC4+PC5+PC6+PC7+PC8+PC9+PC10)),
                       data = read.table("phenotypes/simLife.pheno", header = TRUE, as.is = TRUE),
                       minimac = "imputed-20120314/chr22chunk6",
                       threshold.MAF = 0.01, threshold.Rsq = 0.5),
            file = "test-coxph.out", row.names = FALSE, quote = FALSE)

## End(Not run)

tobyjohnson/gtx documentation built on Aug. 30, 2019, 8:07 p.m.