🔬
GWASTic Documentation
  • 👋Welcome to GWAStic documentation
  • Overview
    • 💡Video Tutorials
    • ✨Features
  • Fundamentals
    • 🖥️Installing GWAStic
    • 🖥️Starting GWAStic
    • ↪️Converting VCF to BED files
    • 🔄GWAS Analysis
    • 🔄Genomic Prediction
    • Running from command line
    • Algorithms
    • Effect size and P-value
    • Train, Test, and Validation Sets
    • Settings
    • ℹ️References
    • Version history
Powered by GitBook
On this page
  • 1. Linear Regression (LR)
  • 2. Linear Mixed Models (LMM) with FaST-LMM
  • 3. Random Forest (RF)
  • 4. XGBoost (XGB)
  1. Fundamentals

Algorithms

PreviousRunning from command lineNextEffect size and P-value

Last updated 8 months ago

GWAStic provides a comprehensive set of algorithms for conducting Genome-Wide Association Studies (GWAS) and genomic prediction. This page explains the different algorithms used in GWAStic, , how they work, and when to use each of them based on your data and research goals.

1. Linear Regression (LR)

How It Works

Linear regression is one of the simplest methods for performing GWAS. It tests for associations between each genetic variant (SNP) and a trait by fitting a straight line through the data points. The relationship is described as:

Y=β0+β1X+ϵY = \beta_0 + \beta_1 X + \epsilon Y=β0​+β1​X+ϵ

Where:

  • Y is the trait (e.g., plant height, disease resistance)

  • X is the genotype (e.g., 0, 1, 2 for SNPs)

  • β0 is the intercept

  • β1 is the effect of the genetic variant

  • ϵ epsilonϵ is the error term

In GWAStic, this method is implemented using the FaST-LMM package. While it's a fast and simple method, it doesn't account for population structure or genetic relatedness between individuals. This could lead to false positives in cases where individuals share ancestry or have similar genetics due to their background rather than the genetic variant being truly associated with the trait.

When to Use It

  • When you need a quick and simple association test.

  • Best for small datasets with no significant population structure or relatedness.

  • Use as an initial screening tool before moving to more complex models.

2. Linear Mixed Models (LMM) with FaST-LMM

How It Works

Linear mixed models extend the basic linear regression approach by adding random effects to account for population structure and relatedness between individuals. The LMM equation looks like this:X+u+ϵ

Where:

  • u is the random effect that models genetic relatedness using a kinship matrix. This matrix represents how genetically similar individuals are to each other.

By adjusting for genetic background noise, LMM provides more accurate associations, especially in cases with structured populations or related individuals. This prevents confounding results that arise from population stratification.

When to Use It

  • Large datasets where individuals may be related.

  • Structured populations, such as different breeding lines or geographic groups.

  • When you need to reduce false positives due to population structure.

  • This is the default method for many GWAS because it handles real-world data complexities well.

3. Random Forest (RF)

How It Works

Random Forest is a machine learning algorithm that builds multiple decision trees and combines their predictions to improve accuracy. In GWAS, RF excels in modeling non-linear relationships between genetic variants and traits. The algorithm works as follows:

  • Randomly selects subsets of the data (bootstrapping).

  • Builds decision trees based on these subsets.

  • Combines the predictions of all trees (a "forest") to make the final prediction.

Each tree may give a different result, but the overall consensus leads to robust and reliable results, especially in cases with complex, non-linear relationships.

When to Use It

  • When you suspect non-linear interactions between genes and traits.

  • For complex datasets with many genetic variants.

  • In situations where traditional statistical models like linear regression may struggle, e.g., when there are gene-gene interactions or the effect of a genetic variant depends on the environment (gene-environment interactions).

4. XGBoost (XGB)

How It Works

XGBoost (Extreme Gradient Boosting) is an advanced machine learning algorithm known for its speed and accuracy. It builds decision trees sequentially, where each tree corrects the errors of the previous ones. XGBoost also applies regularization to avoid overfitting, ensuring that the model generalizes well to new data.

Key features:

  • Boosting: Sequential trees correct errors from previous ones.

  • Regularization: Prevents overfitting by penalizing overly complex models.

  • Weighted trees: The algorithm gives higher weight to harder-to-predict instances.

XGBoost often outperforms Random Forest and other traditional algorithms because it fine-tunes the model with every new tree and balances bias and variance through regularization.

When to Use It

  • For large, complex datasets where overfitting is a concern.

  • When you want the highest predictive power.

  • If you need to handle missing data or imbalanced datasets.

  • XGBoost is often preferred in competitions and real-world applications due to its flexibility and efficiency.

Y=β0+β1X+u+ϵY = \beta_0 + \beta_1 X + u + \epsilon Y=β0​+β1​X+u+ϵ