assocTestCPH(GWASTools)
assocTestCPH()所属R语言包:GWASTools
Cox proportional hazards
Cox比例风险
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Fits Cox proportional hazards model
适合Cox比例风险模型
用法----------Usage----------
assocTestCPH(genoData, event, time.to.event,
covars, factor.covars,
scan.chromosome.filter = NULL,
scan.exclude = NULL,
maf.filter = FALSE,
GxE = NULL, stratum = NULL,
chromosome.set = NULL, block.size = 5000,
verbose = TRUE,
outfile = NULL)
参数----------Arguments----------
参数:genoData
GenotypeData object, should contain sex and phenotypes in scan annotation
GenotypeData对象,应包含在扫描注释性和表型
参数:event
name of scan variable in genoData for event to analyze
在genoData扫描变量的名称为事件分析
参数:time.to.event
name of scan variable in genoData for time to event
在genoData扫描变量的名称,时间事件
参数:covars
vector of covariate terms for model (can include interactions as 'a:b', main effects correspond to scan variable names in genoData)
向量模型协条款(包括为B的相互作用,主要影响相对应扫描在genoData的变量名)
参数:factor.covars
vector of names of covariates to be converted to factor
要转换到的因素共变数名称的向量
参数:scan.chromosome.filter
a logical matrix that can be used to exclude some chromosomes, some scans, or some specific scan-chromosome pairs. Entries should be TRUE if that scan-chromosome pair should be included in the analysis, FALSE if not. The number of rows must be equal to the number of scans in genoData, and the number of columns must be equal to the largest integer chromosome value in genoData. The column number must match the chromosome number. e.g. A scan.chromosome.filter matrix used for an analyis when genoData has SNPs with chromosome=(1-24, 26, 27) (i.e. no Y (25) chromosome SNPs) must have 27 columns (all FALSE in the 25th column). But a scan.chromosome.filter matrix used for an analysis genoData has SNPs chromosome=(1-26) (i.e no Unmapped (27) chromosome SNPs) must have only 26 columns.
逻辑矩阵,可以用来排除一些染色体,一些扫描,或某些特定的扫描对染色体。参赛作品必须是TRUE如果扫描染色体配对应包含在分析中,FALSE如果不是。行数必须等于扫描genoData的数量,列数必须等于最大的genoData整数染色体价值。列数必须匹配的染色体数目。例如一个scan.chromosome.filter矩阵1 analyis使用时genoData有个SNPs与染色体=(1-24,26,27)(即没有Y(25)染色体单核苷酸多态性)必须有27列(所有的<X >在第25列)。但是,scan.chromosome.filter矩阵分析“FALSE有个SNPs染色体=(1-26)(即没有未映射(27)染色体单核苷酸多态性)必须有只有26列。
参数:scan.exclude
an integer vector containing the IDs of entire scans to be excluded.
整数向量,包含整个扫描的ID被排除在外。
参数:maf.filter
whether to filter results returned using MAF*(1-MAF) > 75/(2*n) where MAF = minor allele frequency and n = number of events
是否过滤结果返回使用MAF*(1-MAF) > 75/(2*n)其中MAF=次要等位基因频率和n=事件
参数:GxE
name of the covariate to use for E if genotype-by-environment (i.e. SNP:E) model is to be analyzed, in addition to the main effects (E can be a covariate interaction)
名协使用,如果为E基因型的环境(即单核苷酸多态性:电子)模型进行分析,除了主要的影响(E可以是协互动)
参数:stratum
name of variable to stratify on for a stratified analysis (use NULL if no stratified analysis needed)
变量的名称,以分层的分层分析(使用NULL如果没有分层分析所需)
参数:chromosome.set
integer vector with chromosome(s) to be analyzed. Use 23, 24, 25, 26, 27 for X, XY, Y, M, Unmapped respectively.
整数向量与染色体(S)进行分析。使用的X,XY,Y,M 23,24,25,26,27分别为未映射。
参数:block.size
number of SNPs from a given chromosome to read in one block from genoData
从一个给定的染色体数目的SNPs在一个从genoData块读取
参数:verbose
Logical value specifying whether to show progress information.
逻辑值,指定是否显示进度信息。
参数:outfile
a character string to append in front of ".chr.i_k.RData" for naming the output data-frames; where i is the first chromosome, and k is the last chromosome used in that call to the function. "chr.i_k." will be omitted if chromosome.set=NULL.
一个字符串要追加在前面“chr.i_k.RData。”命名的输出数据框;在那里我是第一号染色体和K是,函数调用中使用的最后一个染色体。 “chr.i_k。”将被忽略,如果chromosome.set=NULL。
Details
详情----------Details----------
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.
这个函数执行一个生存的对象(使用Surv函数),SNP基因型和其他变Cox比例风险回归。它使用coxph的Rsurvival库功能。
Individual samples can be included or excluded from the analysis using the scan.exclude parameter. Individual chromosomes can be included or excluded by specifying the indices of the chromosomes to be included in the chromosome.set parameter. Specific chromosomes for specific samples can be included or excluded using the scan.chromosome.filter parameter.
可以包括个别样品,或从使用scan.exclude参数的分析排除。个别染色体可以包含或排除指定染色体chromosome.set参数指标。使用scan.chromosome.filter参数,可以包含或排除特定样品的特定染色体。
Both scan.chromosome.filter and scan.exclude may be used together. If a scan is excluded in EITHER, then it will be excluded from the analysis, but it does NOT need to be excluded in both. This design allows for easy filtering of anomalous scan-chromosome pairs using the scan.chromosome.filter matrix, but still allows easy exclusion of a specific group of scans (e.g. males or Caucasians) using scan.exclude.
既scan.chromosome.filter和scan.exclude可以一起使用。如果可以排除扫描,然后将被排除在分析之外,但它并不需要在这两个排除。这种设计允许的异常染色体扫描使用scan.chromosome.filter矩阵,对容易过滤,但仍允许使用scan.exclude容易排除的特定组扫描(如男性或白种人)。
The argument maf.filter indicates whether to filter results returned using 2 * MAF * (1-MAF) * n > 75 where MAF = minor allele frequency and n = 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.
参数maf.filter表示是否返回筛选结果使用2 * MAF * (1-MAF) * n > 75其中MAF=次要等位基因频率和n=事件的数量。建议由肯·赖斯和托马斯·拉姆利,谁发现没有这个要求,在全基因组的研究具有重要意义的阈值水平,此过滤器,基于标准渐近逼近Cox回归p值可以显着反保守。
值----------Value----------
If outfile=NULL (default), all results are returned as a data.frame. If outfile is specified, no data is returned but the function saves a data.frame with the naming convention as described by the argument outfile. Columns for the main effects model are:
如果outfile=NULL(默认),所有结果都返回一个数据框。如果outfile指定,返回任何数据,但函数保存数据框参数outfile所述的命名约定。主要影响模型的列如下:
参数:index
snp index
SNP指数
参数:snpID
unique integer ID for SNP
唯一的整数ID的SNP
参数:chr
chromosome
染色体
参数:maf
minor allele frequency calculated as appropriate for autosomal loci
次要等位基因频率计算适当的常染色体显性遗传位点
参数:mafx
minor allele frequency calculated as appropriate for X-linked loci
次要等位基因频率计算为X-连锁位点的适当
参数:beta
regression coefficient returned by the coxph function
coxph函数返回回归系数
参数:se
standard error of the regression coefficient returned by the coxph function
coxph函数返回回归系数的标准误差
参数:z
z statistic returned by the coxph function
coxph函数返回z统计
参数:pval
p-value for the z-statistic returned by the coxph function
P-coxph函数返回的Z-统计值
参数:warned
TRUE if a warning was issued
TRUE如果发出警告
参数:n.events
number of events in complete cases for the given SNP
完整的情况下发生的事件的数目给定的单核苷酸多态性
If GxE is not NULL, another data.frame is returned with the results of the genotype-by-environment model. If outfile=NULL, the function returns a list with names (main, GxE); otherwise the GxE data.frame is saved as a separate output file. Columns are:
GxE如果非NULL,另一个数据框返回的基因型环境模型的结果。如果outfile=NULL,该函数返回与名称列表(main,GxE),否则的GXE数据框是作为一个单独的输出文件的保存。栏目有:
参数:index
snp index
SNP指数
参数:snpID
unique integer ID for SNP
唯一的整数ID的SNP
参数:chr
chromosome
染色体
参数:maf
minor allele frequency calculated as appropriate for autosomal loci
次要等位基因频率计算适当的常染色体显性遗传位点
参数:mafx
minor allele frequency calculated as appropriate for X-linked loci
次要等位基因频率计算为X-连锁位点的适当
参数:warned
TRUE if a warning was issued
TRUE如果发出警告
参数:n.events
number of events in complete cases for the given SNP
完整的情况下发生的事件的数目给定的单核苷酸多态性
参数:ge.lrtest
Likelihood ratio test statistic for the GxE interaction
GXE互动似然比检验统计
参数:ge.pval
p-value for the likelihood ratio test statistic
似然比检验统计量的P-值
Warnings:
警告:
Another file will be saved with the name "outfile.chr.i_k.warnings.RData" that contains any warnings generated by the function.
另一个文件将被保存的名称为“outfile.chr.i_k.warnings.RData”,它包含的功能产生任何警告。
作者(S)----------Author(s)----------
Cathy Laurie
参见----------See Also----------
GenotypeData, coxph
GenotypeData,coxph
举例----------Examples----------
# an example of a scan chromosome matrix[扫描染色体矩阵的一个例子]
# desiged to eliminate duplicated individuals[消除重复的个人desiged]
# and scans with missing values of sex[与性别缺失值和扫描]
library(GWASdata)
data(affy_scan_annot)
scanAnnot <- ScanAnnotationDataFrame(affy_scan_annot)
samp.chr.matrix <- matrix(TRUE,nrow(scanAnnot),26)
dup <- duplicated(scanAnnot$subjectID)
samp.chr.matrix[dup | is.na(scanAnnot$sex),] <- FALSE
samp.chr.matrix[scanAnnot$sex=="F", 25] <- FALSE
# additionally, exclude YRI subjects[此外,排除YRI人群科目]
scan.exclude <- scanAnnot$scanID[scanAnnot$race == "YRI"]
# create some variables for the scans[创建一些变量扫描]
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[创建数据对象]
ncfile <- system.file("extdata", "affy_geno.nc", package="GWASdata")
nc <- NcdfGenotypeReader(ncfile)
genoData <- GenotypeData(nc, scanAnnot=scanAnnot)
# variables[变量]
event <- "event"
time.to.event <- "ttoe"
covars <- c("sex", "age")
factor.covars <- "sex"
chr.set <- 21
res <- assocTestCPH(genoData,
event="event", time.to.event="ttoe",
covars=c("sex", "age"), factor.covars="sex",
scan.chromosome.filter=samp.chr.matrix,
scan.exclude=scan.exclude,
chromosome.set=chr.set)
close(genoData)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|