text: user6464: This question was also asked on Biostars
  I'm trying to understand what is the best algorithm for GWAS nowadays.
  I know we have many tools available like Plink and Hail, but currently, what is the best algorithm if I won't use any them? Let's say, write down a script in R or Python from scratch. Which statistical algorithm should I use?
  Is it Linear mixed models (LMMs)? I'm confused as we can have binary phenotypes (case/control) or quantitative phenotypes. LMM seems to address quantitative ones, but can it be used for case/control as well? 
  Actually, what is the state of the art for both/each of them? Pair-reviewed papers as references will be appreciated.
  Thanks!
  
  user6464: I've got the answer to my question at https://www.biostars.org/p/410466/ by chrchang522
  
  "The main regression executed by Plink was introduced by EIGENSTRAT in ~2006; see https://www.nature.com/articles/ng1847 . This is actually straightforward to write in R/Python from scratch; the harder part is optimizing the implementation for large datasets.
  The Firth regression added to Plink 2.0 to improve handling of rare variants and imbalanced binary phenotypes was motivated by https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4049324/ .
  Mixed linear models provide better statistical power when you have lots of close relatives in your dataset, but are much trickier to solve; actually, this is still a significant research area. Two tools covering parts of the current state-of-the-art are SAIGE (https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6119127/ ; handles imbalanced binary phenotypes, but relatively slow) and fastGWA (https://www.nature.com/articles/s41588-019-0530-8 ; great speed, but doesn't support dosage data yet and uses a misspecified model for binary phenotypes)."
  
  
original_text: 6464: <p><em>This question was also asked on <a href="https://www.biostars.org/p/410466/" rel="nofollow noreferrer">Biostars</a></em></p>
  
  <p>I'm trying to understand what is the best algorithm for GWAS nowadays.
  I know we have many tools available like Plink and Hail, but currently, what is the best algorithm if I won't use any them? Let's say, write down a script in R or Python from scratch. Which statistical algorithm should I use?
  Is it Linear mixed models (LMMs)? I'm confused as we can have binary phenotypes (case/control) or quantitative phenotypes. LMM seems to address quantitative ones, but can it be used for case/control as well? 
  Actually, what is the state of the art for both/each of them? Pair-reviewed papers as references will be appreciated.
  Thanks!</p>
   6464: <p>I've got the answer to my question at <a href="https://www.biostars.org/p/410466/" rel="nofollow noreferrer">https://www.biostars.org/p/410466/</a> by <a href="https://www.biostars.org/u/9575/" rel="nofollow noreferrer">chrchang522</a></p>
  <blockquote>
  <p>&quot;The main regression executed by Plink was introduced by EIGENSTRAT in ~2006; see <a href="https://www.nature.com/articles/ng1847" rel="nofollow noreferrer">https://www.nature.com/articles/ng1847</a> . This is actually straightforward to write in R/Python from scratch; the harder part is optimizing the implementation for large datasets.</p>
  <p>The Firth regression added to Plink 2.0 to improve handling of rare variants and imbalanced binary phenotypes was motivated by <a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4049324/" rel="nofollow noreferrer">https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4049324/</a> .</p>
  <p>Mixed linear models provide better statistical power when you have lots of close relatives in your dataset, but are much trickier to solve; actually, this is still a significant research area. Two tools covering parts of the current state-of-the-art are SAIGE (<a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6119127/" rel="nofollow noreferrer">https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6119127/</a> ; handles imbalanced binary phenotypes, but relatively slow) and fastGWA (<a href="https://www.nature.com/articles/s41588-019-0530-8" rel="nofollow noreferrer">https://www.nature.com/articles/s41588-019-0530-8</a> ; great speed, but doesn't support dosage data yet and uses a misspecified model for binary phenotypes).&quot;</p>
  </blockquote>
  