xlink"

knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

1. Introduction

xlink from github is a package for the unified partial likelihood approach for X-chromosome association on time-to-event/ continuous/ binary outcomes. The expression of X-chromosome undergoes three possible biological processes: X-chromosome inactivation (XCI), escape of the X-chromosome inactivation (XCI-E), and skewed X-chromosome inactivation (XCI-S). Although these expressions are included in various predesigned genetic variation chip platforms, the X-chromosome has generally been excluded from the majority of genome-wide association studies analyses; this is most likely due to the lack of a standardized method in handling X-chromosomal genotype data. To analyze the X-linked genetic association for time-to-event outcomes with the actual process unknown, we propose a unified approach of maximizing the partial likelihood over all of the potential biological processes. The proposed method can be used to infer the true biological process and derive unbiased estimates of the genetic association parameters.

Reference:

"Xu, Wei, and Meiling Hao. "A unified partial likelihood approach for X‐chromosome association on time‐to‐event outcomes." Genetic epidemiology 42.1 (2018): 80-94." (via)

"Han, D., Hao, M., Qu, L., & Xu, W. (2019). ”A novel model for the X-chromosome inactivation association on survival data." Statistical Methods in Medical Research." (via)

2. Installation

You can install xlink from [github]((https://github.com/qiuanzhu/xlink):

library("devtools")
install_github("qiuanzhu/xlink")

3. Examples

In the following examples, we choose the model is "survival" model, which could also applied to "linear" model for continuous response and "binary" for fitting logistic regression model.

3.1 Select significant SNPs from XCI or XCI-E model type:

In the sample data with 10 SNPs and 4 clinic covariates,

library("xlink")
head(Rdata)
library(xlink)
knitr::kable(head(Rdata))

If the Model type is chosen to be XCI and threshold for MAF_v is set to be 0.05, the output for snp_1 with coefficient, P value and loglikelihood information

Covars<-c("Age","Smoking","Treatment")
SNPs<-c("snp_1","snp_2")
output<-xlink_fit(os="OS",ostime="OS_time",snps=SNPs,gender="gender",covars=Covars, option =list(type="XCI",MAF_v=0.05),model="survival",data = Rdata)
Covars<-c("Age","Smoking","Treatment")
SNPs<-c("snp_1","snp_2")
output<-xlink_fit(os="OS",ostime="OS_time",snps=SNPs,gender="gender",covars=Covars, option =list(type="XCI",MAF_v=0.05),model="survival",data = Rdata)
knitr::kable(output[1]$snp_1$coefficients)


knitr::kable(output[1]$snp_1$loglik)

3.2 Select significant SNPs from all model type:

If the Model type is chosen to be all and threshold for MAF_v is set to be 0.1, the output for snp_1 with coefficient , P value and log-likelihood function information for XCI-E, XCI and XCI-S respectively,

Covars<-c("Age","Smoking","Treatment")
SNPs<-c("snp_1","snp_2")
output<-xlink_fit(os="OS",ostime="OS_time",snps=SNPs,gender="gender",covars=Covars, option =list(type="all",MAF_v=0.05),model="survival",data = Rdata)

For XCI-E model, snp_1 with coefficient, P value and log-likelihood function information

output<-xlink_fit(os="OS",ostime="OS_time",snps=SNPs,gender="gender",covars=Covars, option =list(MAF_v=0.1),model="survival",data = Rdata)


knitr::kable(output$snp_1$`XCI-E`$coefficients)

knitr::kable(output$snp_1$`XCI-E`$loglik)

For XCI model, snp_1 with coefficient, P value and log-likelihood function information

knitr::kable(output$snp_1$`XCI`$coefficients)

knitr::kable(output$snp_1$`XCI`$loglik)

For XCI-S model, snp_1 with coefficient , log-likelihood function information and gamma estimation

knitr::kable(output$snp_1$`XCI-S`$coefficients)

knitr::kable(output$snp_1$`XCI-S`$loglik)

knitr::kable(output$snp_1$`XCI-S`$Gamma , col.names ="Gamma")

The best model for snp_1 among model type XCI-E, XCI and XCI-S by using the AIC is

knitr::kable(output$snp_1$`Best model by AIC`, col.names = "Best model by AIC" )

3.3 Output for the significant SNPs by P value:

By setting the threshold for pv_thold, the select output become

Covars<-c("Age","Smoking","Treatment")
SNPs<-c("snp_1","snp_2","snp_3")
result<-xlink_fit(os="OS",ostime ="OS_time",snps=SNPs,gender ="gender",covars=Covars, 
                   option =list(type="all",MAF_v=0.05), model="survival", data = Rdata)
select_output(input=result,pv_thold=10^-5)
Covars<-c("Age","Smoking","Treatment")
SNPs<-c("snp_1","snp_2","snp_3")
result<-xlink_fit(os="OS",ostime ="OS_time",snps=SNPs,gender ="gender",covars=Covars, 
                   option =list(type="all",MAF_v=0.05), model="survival", data = Rdata)


knitr::kable( select_output(input=result,pv_thold=10^-5) )


Try the xlink package in your browser

Any scripts or data that you put into this service are public.

xlink documentation built on Aug. 21, 2019, 1:05 a.m.