R2-D2 model is a statistical method to identify the potential regulatory genetic variants to a gene. (add more description here once it is published).
5. Example
R version >= 3.3.0
required R packages:
MASS
RcppEigen
data.table
Three types of input files are needed to run this model.
- Genotype file which describes the SNP genotypes for a group of individuals. It can be generated by PLINK.
- Phenotype file. This should be three-column text files, of which the first two columns are family ID (FID), and individual IDs (IID), and the third column
- Genotype-Phenotype association results. This is also a standard output from PLINK. It listed useful metrics of genotype-phenotype associations, such as P-value, R-squared, and direction of effect.
This is done by running the comTest_matrix() function in the protocol.R file
-- geno: the genotype file
-- qassoc: the genotype-phenotype association file
-- num: number of SNPs in a SNP combination to be exaustively tested
-- save_interm: whether or not to save the intermediate files, useful for checking model
comTest_matrix(geno = , qassoc = , num = 4, save_interm = T)
This is done by running the familyPlot_matrix() function in the protocol.R file
-- plot_file: input file generated by the comTest_matrix()
-- title: title to be displayed in the plots, also used as output filename
-- color: colors for the SNPs chosen by the model.
familyPlot_matrix(plot_file = , title = , color = c("red", "green", "black"))