Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-12-07T14:44:42.057Z
Answers.LastActivityDate: 2020-01-08T15:16:39.133Z
Answers.LastEditDate: 2020-06-18T08:30:41.743Z
Answers.UserDisplayName: Bruno Ambrozio
Body: <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>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-12-02T00:36:44.440Z
Comments.Text: To clarify: you're asking what the best algorithm is, assuming you don't want to use the well-tested and validated algorithms that other people are using?
Comments.UserDisplayName: gringer
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-12-03T13:29:47.090Z
Comments.Text: It can be whatever anyone is using. I just want to know what is the algorithm behind the scene for binary or quantitative phenotypes.
Comments.UserDisplayName: Bruno Ambrozio
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-12-03T18:48:31.507Z
Comments.Text: This is not a good fit for a Bioinformatics Stack Exchange question, as the question is too broad and primarily opinion-based. I'd recommend that you ask something like this on [reddit](reddit.com/r/bioinformatics). The best questions on BSE deal with specific problems that people are having. If you think your question *is* specific, please edit it to make that more obvious.
Comments.UserDisplayName: gringer
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-12-07T14:45:27.957Z
Comments.Text: Sorry, but I disagree. I'm not looking for opinions, but the algorithm that, mathematically, (through statistical tests) prooves to be the state-of-the-art. I've got the answer, check it out below. Thanks anyway!
Comments.UserDisplayName: Bruno Ambrozio
Tags: <r><gwas>
Title: What is the state of the art for GWAS in terms of the statistical algorithm for either Case/control and Quantitative traits?
ThreadText: # What is the state of the art for GWAS in terms of the statistical algorithm for either Case/control and Quantitative traits?
  
  (Asked by: username_0 on 2019-12-01)
  
  *This question was also asked on [Biostars](https://www.biostars.org/p/410466/)*
  
  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!
  
  **Tags:** r, gwas
  
  > **Comments:**
  > **username_1**: To clarify: you're asking what the best algorithm is, assuming you don't want to use the well-tested and validated algorithms that other people are using?  
  > **username_0**: It can be whatever anyone is using. I just want to know what is the algorithm behind the scene for binary or quantitative phenotypes.  
  > **username_1**: This is not a good fit for a Bioinformatics Stack Exchange question, as the question is too broad and primarily opinion-based. I'd recommend that you ask something like this on [reddit](reddit.com/r/bioinformatics). The best questions on BSE deal with specific problems that people are having. If you think your question *is* specific, please edit it to make that more obvious.  
  > **username_0**: Sorry, but I disagree. I'm not looking for opinions, but the algorithm that, mathematically, (through statistical tests) prooves to be the state-of-the-art. I've got the answer, check it out below. Thanks anyway!  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2019-12-07. Score: 2 | Accepted answer
  
  I've got the answer to my question at <https://www.biostars.org/p/410466/> by [chrchang522](https://www.biostars.org/u/9575/)
  
  > "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)."
  
  
  ---
  
  