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 14 15 |
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 |
cluster |
the name of a column (in the scan annotation of |
.
scan.exclude |
a vector of scanIDs for scans to exclude |
LRtest |
logical for whether to perform Likelihood Ratio Tests in addition to Wald tests (which are always performed). |
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 |
maf.filter |
|
Est |
beta estimate for genotype |
SE |
standard error of beta estimate for the genotype |
Wald.Stat |
chi-squared test statistic for association |
Wald.pval |
p-value for association |
LR.Stat |
likelihood ratio test statistic for association |
LR.pval |
p-value for association |
GxE.Est |
beta estimate for the genotype*ivar interaction parameter ( |
GxE.SE |
standard error of beta estimate for the genotype*ivar interaction parameter |
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, David Levine
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)
|
Loading required package: Biobase
Loading required package: BiocGenerics
Loading required package: parallel
Attaching package: ‘BiocGenerics’
The following objects are masked from ‘package:parallel’:
clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
clusterExport, clusterMap, parApply, parCapply, parLapply,
parLapplyLB, parRapply, parSapply, parSapplyLB
The following objects are masked from ‘package:stats’:
IQR, mad, sd, var, xtabs
The following objects are masked from ‘package:base’:
anyDuplicated, append, as.data.frame, basename, cbind, colnames,
dirname, do.call, duplicated, eval, evalq, Filter, Find, get, grep,
grepl, intersect, is.unsorted, lapply, Map, mapply, match, mget,
order, paste, pmax, pmax.int, pmin, pmin.int, Position, rank,
rbind, Reduce, rownames, sapply, setdiff, sort, table, tapply,
union, unique, unsplit, which.max, which.min
Welcome to Bioconductor
Vignettes contain introductory material; view with
'browseVignettes()'. To cite Bioconductor, see
'citation("Biobase")', and for packages 'citation("pkgname")'.
Reading in Phenotype and Covariate Data...
Running analysis with 43 Samples
Beginning Calculations...
Block 1 of 1 Completed - 0.5859 secs
Warning messages:
1: In fitter(X, Y, istrat, offset, init, control, weights = weights, :
Loglik converged before variable 3 ; coefficient may be infinite.
2: In fitter(X, Y, istrat, offset, init, control, weights = weights, :
Loglik converged before variable 3 ; coefficient may be infinite.
3: In fitter(X, Y, istrat, offset, init, control, weights = weights, :
Loglik converged before variable 3 ; coefficient may be infinite.
4: In fitter(X, Y, istrat, offset, init, control, weights = weights, :
Loglik converged before variable 3 ; coefficient may be infinite.
5: In fitter(X, Y, istrat, offset, init, control, weights = weights, :
Loglik converged before variable 3 ; coefficient may be infinite.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.