Description Usage Arguments Details Value Author(s) See Also Examples
Fits Cox proportional hazards model
1 2 3 4 5 6 7 8 9 10 11 12 13 |
genoData |
a |
event |
name of scan annotation variable in |
time.to.event |
name of scan annotation variable in |
gene.action |
"additive" coding sets the marker variable for homozygous minor allele samples = 2, heterozygous samples = 1,
and homozygous major allele samples = 0.
"dominant" coding sets the marker variable for homozygous minor allele samples = 2, heterozygous samples = 2,
and homozygous major allele samples = 0.
"recessive" coding sets the marker variable for homozygous minor allele samples = 2, heterozygous samples = 0,
and homozygous major allele samples = 0.
(If |
covar |
a vector of the names of the covariates to adjust for (columns in the scan annotation of |
ivar |
the name of the variable in |
strata |
a vector of names of variables to stratify on for a stratified analysis |
scan.exclude |
a vector of scanIDs for scans to exclude |
effectAllele |
whether the effects should be returned in terms of the minor allele for the tested sample ( |
snpStart |
index of the first SNP to analyze, defaults to first SNP |
snpEnd |
index of the last SNP to analyze, defaults to last SNP |
block.size |
number of SNPs to read in at once |
verbose |
logical for whether to print status updates |
This function performs Cox proportional hazards regression of a
survival object (using the Surv
function) on SNP
genotype and other covariates. It uses the coxph
function from the R survival
library.
It is recommended to filter results returned
using 2*MAF*(1-MAF)*n.events > 75
where MAF
= minor allele frequency and n.events
= number of events. This filter was
suggested by Ken Rice and Thomas Lumley, who found that without this requirement, at
threshold levels of significance for genome-wide studies, Cox
regression p-values based on standard asymptotic approximations can be
notably anti-conservative.
Note: Y chromosome SNPs must be analyzed separately because they only use males.
a data.frame with some or all of the following columns:
snpID |
the snpIDs |
chr |
chromosome SNPs are on |
n |
number of samples used to analyze each SNP |
n.events |
number of events in complete cases for each SNP |
effect.allele |
which allele ("A" or "B") is the effect allele |
EAF |
effect allele frequency |
MAF |
minor allele frequency |
filter |
|
Est |
beta estimate for genotype |
SE |
standard error of beta estimate for the genotype |
z.Stat |
z statistic for association |
z.pval |
p-value for association |
GxE.Stat |
Likelihood ratio test statistic for the genotype*ivar interaction parameter |
GxE.pval |
p-value for the likelihood ratio test statistic |
Cathy Laurie, Matthew Conomos, Stephanie Gogarten
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 | library(GWASdata)
data(illuminaScanADF)
scanAnnot <- illuminaScanADF
# exclude duplicated subjects
scan.exclude <- scanAnnot$scanID[scanAnnot$duplicated]
# create some variables for the scans
scanAnnot$sex <- as.factor(scanAnnot$sex)
scanAnnot$age <- rnorm(nrow(scanAnnot), mean=40, sd=10)
scanAnnot$event <- rbinom(nrow(scanAnnot), 1, 0.4)
scanAnnot$ttoe <- rnorm(nrow(scanAnnot), mean=100, sd=10)
# create data object
gdsfile <- system.file("extdata", "illumina_geno.gds", package="GWASdata")
gds <- GdsGenotypeReader(gdsfile)
genoData <- GenotypeData(gds, scanAnnot=scanAnnot)
res <- assocCoxPH(genoData,
event="event", time.to.event="ttoe",
covar=c("sex", "age"),
scan.exclude=scan.exclude,
snpStart=1, snpEnd=100)
close(genoData)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.