-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathparams.json
More file actions
6 lines (6 loc) · 6.46 KB
/
params.json
File metadata and controls
6 lines (6 loc) · 6.46 KB
1
2
3
4
5
6
{
"name": "Robust-joint-interaction",
"tagline": "An R function to allow users to perform robust joint testing of SNP and SNP-environment interaction within the PLINK software toolset for whole genome association analysis.",
"body": "\r\n## Robust Joint Tests of SNP and SNP-Environment Interaction\r\n\r\n### Introduction\r\nIn [Almli et al. (2014)](http://archpsyc.jamanetwork.com/article.aspx?articleid=1919420)\r\nwe created a robust test of SNP and SNP-environment interaction for complex traits that\r\nused Huber-White estimates of variance to eliminate bias arising from heteroscedasticity\r\nor other model misspecification. We implemented this test in R script called with\r\n[PLINK](http://pngu.mgh.harvard.edu/~purcell/plink/index.shtml\").\r\n\r\nWe illustrate how to use the R function below.\r\n\r\n### The R base system\r\nR is a widely-used, free and open source software environment for statistical computing and graphics.\r\nThe most recent version of R can be downloaded from the\r\n[Comprehensive R Archive Network (CRAN)](http://cran.r-project.org/)\r\nCRAN provides precompiled binary versions of R for Windows, MacOS, and select Linux distributions\r\nthat are likely sufficient for many users' needs. Users can also install R from source code;\r\nhowever this may require a significant amount of effort.\r\nFor specific details on how to compile, install, and manage R and R-packages, refer to the manual \r\n[R Installation and Administration](http://cran.r-project.org/doc/manuals/r-release/R-admin.html).\r\n\r\n\r\n### R packages required for analysis\r\nOur robust test of SNP and SNP-environment interaction for complex traits requires the installation\r\nof two R libraries:\r\n+ [Rserve](http://cran.r-project.org/web/packages/Rserve/index.html),\r\nrequired for PLINK to run the R plugin function and\r\n+ [geepack](http://cran.r-project.org/web/packages/geepack/index.html), \r\nrequired to obtain the robust variance estimators for the joint interaction test.\r\n\r\nThe easiest method to install these packages is to open a R session and enter the command:\r\n\r\n install.packages(\"geepack\")\r\n\r\nChoose a mirror and the package should automatically download.\r\n\r\nA similar command,\r\n\r\n install.packages(\"Rserve\")\r\n\r\nshould install the Rserve package.\r\n\r\n\r\nOne can also install R packages from the command line\r\n[see more details here](http://cran.r-project.org/doc/manuals/r-release/R-admin.html#Installing-packages).\r\n\r\n\r\n**Please note that PLINK only provides support for R functions in their Linux-based\r\nand Mac OS distributions.**\r\n\r\n\r\n### Starting Rserve\r\nThere are a few ways to [start Rserve in daemon mode](http://rforge.net/Rserve/faq.html#start).\r\nI. One method uses the command line; in particular:\r\n R CMD Rserve\r\n<figure>\r\n <img src=\"Rserve-cmdline-start.png\"\r\n alt=\"Rserve-cmdline-start.png\"\r\n align=\"middle\">\r\n <figcaption>Figure 1. Terminal output after starting Rserve from command line.</figcaption>\r\n</figure>\r\n\r\nII. Alternatively, one can start Rserve by saving the following two lines\r\ninto a script file called `run-Rserve.R`:\r\n\r\n library(Rserve)<br>\r\n Rserve(args=\"--no-save\")\r\n\r\n\r\nThen the script can be executed through R from the command line\r\nwith command `R --vanilla < run-Rserve.R`.\r\n\r\nAs well, these two lines of R code could also be executed\r\nwithin an R console or an R environment such as [RStudio](http://www.rstudio.com/).\r\n\r\n\r\n### Using PLINK to perform robust joint test\r\nOnce Rserve is installed and running locally, we can use PLINK to invoke\r\nthe R function to perform robust joint testing of SNP and SNP-environment\r\ninteraction. We provide \r\n[sample PLINK files](test-int-plink.tgz) (PED/MAP/COV) consisting of\r\n500 individuals genotyped for 10 SNPs and assayed for three environmental\r\npredictors. For each of the 10 SNPs, we wish to perform a joint test and\r\nSNP and SNP-environment interaction using the first environmental\r\npredictor listed in the COV file (the second and third environmental\r\npredictors in the COV file are treated only as covariates).\r\nTo perform these analyses on our test dataset, we invoke the following PLINK command:\r\n\r\n plink --file test-int-plink --covar test-int-plink.cov --R robust-joint-int-plugin.R\r\n\r\nThe command will generate a file 'plink.auto.R'.\r\nEach row of the file corresponds to results from a tested SNP and has the following fields (in order): \r\n\r\n + Chromosome position\r\n + SNP id\r\n + Physical Position (base-pair)\r\n + Minor allele\r\n + P-value of model-based test of SNP and SNP-environment interaction\r\n + P-value of robust test of SNP and SNP-environment interaction\r\n\r\n\r\nUsing the provided sample data, the contents of the this file is shown here:\r\n\r\n<pre class=\"data\">\r\n 1 SNP1 101000 2 0.864095\t0.839595\t\r\n 1 SNP2 102000 2 0.776515\t0.836906\t\r\n 1 SNP3 103000 2 0.386562\t0.376118\t\r\n 1 SNP4 104000 2 0.532115\t0.642094\t\r\n 1 SNP5 105000 2 3.47487e-09\t5.04597e-06\t\r\n 1 SNP6 106000 2 0.543536\t0.563148\t\r\n 1 SNP7 107000 2 0.451066\t0.397487\t\r\n 1 SNP8 108000 2 0.758953\t0.75529\t\r\n 1 SNP9 109000 2 0.94371\t0.947891\t\r\n 1 SNP10 110000 2 0.972809\t0.972334\t\r\n</pre>\r\n\r\nThe R code can easily be modified to consider other joint interaction tests of interest.\r\nAlso, bed, bim, and fam files can also be used.\r\n\r\n\r\n**Important**: if one wishes to adjust the robust joint test for gender,\r\none must include a numeric gender variable in the PLINK COV file.\r\nUse of the `--sex` flag in PLINK will not adjust\r\nthe analysis specified in the R plugin function for gender.\r\n\r\n\r\nMore details on writing, calling, and debugging R functions in PLINK \r\ncan be found in the\r\n[PLINK documentation for R plugin functions](http://pngu.mgh.harvard.edu/~purcell/plink/rfunc.shtml).\r\n\r\n### Questions and Technical Support\r\n\r\nFor questions or concerns with the R function, please contact\r\n[Richard Duncan](mailto:rduncan@emory.edu) and \r\n[Michael Epstein](mailto:mpepste@emory.edu)\r\n\r\nWe appreciate any feedback you have with our site and instructions. \r\n\r\n\r\n<img src=\"abstract-word-cloud.png\"\r\n alt=\"abstract-word-cloud.png\"\r\n style=\"width:300px\"\r\n align=\"middle\">\r\n",
"note": "Don't delete this file! It's used internally to help with page regeneration."
}