knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
Test for association between a set of SNPS/genes and continuous or binary outcomes by including variant characteristic information and using (weighted) score statistics.
Note:
#| eval: false # Install MiSTr from CRAN: install.packages("MiSTr") # Or the the development version from GitHub: # install.packages("remotes") remotes::install_github("mcanouil/MiSTr")
library(MiSTr) data(mist_data) attach(mist_data)
mist( y = phenotypes[, "y_tau"], X = phenotypes[, paste0("x_cov", 0:2)], G = genotypes, Z = variants_info[, 1, drop = FALSE], method = "liu", model = "continuous" )
variants_info[, "effect"] # simulated effect get_same_effect <- names(which(variants_info[, "effect"] > 0)) mist( y = phenotypes[, "y_tau"], X = phenotypes[, paste0("x_cov", 0:2)], G = genotypes[, get_same_effect], Z = variants_info[get_same_effect, 1, drop = FALSE], method = "liu", model = "continuous" )
mist( y = phenotypes[, "y_pi"], X = phenotypes[, paste0("x_cov", 0:2)], G = genotypes, Z = variants_info[, 1, drop = FALSE], method = "liu", model = "continuous" )
mist( y = phenotypes[, "y_taupi"], X = phenotypes[, paste0("x_cov", 0:2)], G = genotypes, Z = variants_info[, 1, drop = FALSE], method = "liu", model = "continuous" )
variants_info[, "effect"] # simulated effect get_same_effect <- names(which(variants_info[, "effect"] > 0)) mist( y = phenotypes[, "y_taupi"], X = phenotypes[, paste0("x_cov", 0:2)], G = genotypes[, get_same_effect], Z = variants_info[get_same_effect, 1, drop = FALSE], method = "liu", model = "continuous" )
mist( y = phenotypes[, "y_tau"], X = phenotypes[, paste0("x_cov", 0:2)], G = genotypes, Z = variants_info[, 1, drop = FALSE], method = "liu", model = "continuous", weight.beta = c(1, 25), maf = variants_info[, "maf"] )
variants_info[, "effect"] # simulated effect get_same_effect <- names(which(variants_info[, "effect"] > 0)) mist( y = phenotypes[, "y_tau"], X = phenotypes[, paste0("x_cov", 0:2)], G = genotypes[, get_same_effect], Z = variants_info[get_same_effect, 1, drop = FALSE], method = "liu", model = "continuous", weight.beta = c(1, 25), maf = variants_info[get_same_effect, "maf"] )
mist( y = phenotypes[, "y_pi"], X = phenotypes[, paste0("x_cov", 0:2)], G = genotypes, Z = variants_info[, 1, drop = FALSE], method = "liu", model = "continuous", weight.beta = c(1, 25), maf = variants_info[, "maf"] )
mist( y = phenotypes[, "y_taupi"], X = phenotypes[, paste0("x_cov", 0:2)], G = genotypes, Z = variants_info[, 1, drop = FALSE], method = "liu", model = "continuous", weight.beta = c(1, 25), maf = variants_info[, "maf"] )
variants_info[, "effect"] # simulated effect get_same_effect <- names(which(variants_info[, "effect"] > 0)) mist( y = phenotypes[, "y_taupi"], X = phenotypes[, paste0("x_cov", 0:2)], G = genotypes[, get_same_effect], Z = variants_info[get_same_effect, 1, drop = FALSE], method = "liu", model = "continuous", weight.beta = c(1, 25), maf = variants_info[get_same_effect, "maf"] )
mist( y = phenotypes[, "y_binary"], X = phenotypes[, paste0("x_cov", 0:2)], G = genotypes, Z = variants_info[, 1, drop = FALSE], method = "liu", model = "binary" )
variants_info[, "effect"] # simulated effect get_same_effect <- names(which(variants_info[, "effect"] > 0)) mist( y = phenotypes[, "y_binary"], X = phenotypes[, paste0("x_cov", 0:2)], G = genotypes[, get_same_effect], Z = variants_info[get_same_effect, 1, drop = FALSE], method = "liu", model = "binary" )
mist( y = phenotypes[, "y_binary"], X = phenotypes[, paste0("x_cov", 0:2)], G = genotypes, Z = variants_info[, 1, drop = FALSE], method = "liu", model = "binary", weight.beta = c(1, 25), maf = variants_info[, "maf"] )
variants_info[, "effect"] # simulated effect get_same_effect <- names(which(variants_info[, "effect"] > 0)) mist( y = phenotypes[, "y_binary"], X = phenotypes[, paste0("x_cov", 0:2)], G = genotypes[, get_same_effect], Z = variants_info[get_same_effect, 1, drop = FALSE], method = "liu", model = "binary", weight.beta = c(1, 25), maf = variants_info[get_same_effect, "maf"] )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.