DelinLi / TWAS

Example for TWAS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Examples code for my TWAS paper on Plant Physiology

Data Prepare

Convert the numeric expression into genotype-like (like numeric range from 0 to 2 for GAPIT) format required by GWAS tools. I could not find the best yet, but the Quantile one gave overall better results in cases of the TWAS paper

  1. Linearly Used by the eRD-GWAS
  2. Quantile Used in the paper and here to handle extreme expression values (outliers): First, expression values smaller than quantile 5 were converted to 0 and values larger than quantile 95 were converted to 2. The remaining expression values were linearly transformed into values between 0 and 2.
#R code for the Quantile solution (if you have a higher sample size, you can try Quantile2 Quantile98 or any value you want)
  Quantile<- apply(Expression.TPM.Matrix,1,
                         function(A){min_x=as.numeric(quantile(A,5));
                         max_x=as.numeric(quantile(A,95));
                         out<-(2*(A-min_x)/(max_x-min_x));
                         out[out>2]<-2;out[out< 0]<- 0;return(out)})
  1. QQNorm, a solution used by eQTL paper that converted expression.

Run the TWAS on two Traits with CMLM

Any statistic method could be used, like FarmCPU or GEMMA, but only CMLM from GAPIT was used in the TWAS paper

Soybean PubescenceColor -- The qualitative trait

Soybean PubescenceColor

Arabidopsis FT16 -- The quantitative trait

Arabidopsis FT16

Citation:

Delin Li, Qiang Liu, Patrick S Schnable, TWAS results are complementary to and less affected by linkage disequilibrium than GWAS, Plant Physiology, 2021;, kiab161, https://doi.org/10.1093/plphys/kiab161

About

Example for TWAS

License:GNU General Public License v3.0


Languages

Language:R 100.0%