Answers.Body: <p>I made the same <a href="https://stats.stackexchange.com/q/478037/208550">question in CrossValidated</a> forum and got an excellent answer!</p>
  <p>The important part:</p>
  <blockquote>
  <p>You need to correct for all of the comparisons you are doing. So if
  that's 300,000,000 comparisons you need to correct for that many
  multiple comparisons.</p>
  </blockquote>
  <p>For more information check the answer in the link above</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-03-04T13:35:25.527Z
Answers.LastActivityDate: 2021-03-04T13:35:25.527Z
Answers.UserDisplayName: Genarito
Body: <p>First of all I apologize without the question is very basic, I am taking my first steps in bioinformatics.</p>
  <h2>Data information</h2>
  <p>We are evaluating the correlation (using the Pearson, Kendall or Spearman method) between gene expression and miRNA expression using the <a href="https://www.rdocumentation.org/packages/WGCNA/versions/1.69/topics/corAndPvalue" rel="nofollow noreferrer">corAndPvalue</a> function of WCGNA.</p>
  <p>The resulting structure would be a DataFrame containing all combinations between each gene with each miRNAs, containing the following columns:</p>
  <pre><code>Gene     miRNA      Correlation P-value
  Gen_1    miRNA_1    0,959       0.00311
  Gen_1    miRNA_2    -0,039      0.1041
  Gen_1    miRNA_3    -0,344      0.0021
  Gen_2    miRNA_1    0,1333      0.00451
  Gen_2    miRNA_2    0,877       0.07311
  ...
  </code></pre>
  <h2>Question</h2>
  <p>Considering the huge number of correlation tests we are going to evaluate, we need to adjust the p-values to avoid correlations due to chance. Bonferroni does not seem to be the best solution, so we would use Benjamini-Hochberg method (BH). The question is:</p>
  <p>The BH correction for the <code>Gen_1</code> x <code>miRNA_1</code> combination, should consider the p-values of all combinations that include Gen_1 (Option 1), or should consider all the p-values of all the genes x miRNA combinations (Option 2)?</p>
  <p>For example, let's assume an expression dataset of 20,000 genes and another of 15,000 miRNAs</p>
  <p><strong>Option 1:</strong></p>
  <p>To adjust <code>Gen_1</code> x <code>miRNA_1</code> we would use 15,000 p-values (<code>Gen_1</code> x <code>miRNA_1</code>, <code>Gen_1</code> x <code>miRNA_2</code>, ..., <code>Gen_1</code> x <code>miRNA_15000</code>).</p>
  <p><strong>Option 2:</strong></p>
  <p>To adjust <code>Gen_1</code> x <code>miRNA_1</code> we would use 300,000,000 p-values (<code>Gen_1</code> x <code>miRNA_1</code>, <code>Gen_1</code> x <code>miRNA_2</code>, ..., <code>Gen_1</code> x <code>miRNA_15000</code>, <code>Gen_2</code> x <code>miRNA_1</code>, <code>Gen_2</code> x <code>miRNA_2</code>, ..., <code>Gen_2</code> x <code>miRNA_15000</code> and so on).</p>
  <h2>Suplementary question</h2>
  <p>Documentation of the method <a href="https://www.statsmodels.org/stable/generated/statsmodels.stats.multitest.fdrcorrection.html?highlight=fdrcorrection#statsmodels.stats.multitest.fdrcorrection" rel="nofollow noreferrer">fdrcorrection</a> from Python <a href="https://www.statsmodels.org/stable/index.html" rel="nofollow noreferrer">Statsmodels library</a> suggests that for negative correlations (that could be frequent in a mRNA x miRNA correlation analysis) Benjamini-Yekutieli would work better; is that right? Or Benjamini-Hochberg method would be appropiated for this case?</p>
  <p>Any kind of help would be much appreciated, thanks in advance!</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-01-04T16:30:23.717Z
Comments.Text: There's a good answer in CrossValidated forum! [Link](https://stats.stackexchange.com/questions/478037/p-value-correction-for-multiple-testing-using-huge-datasets)
Comments.UserDisplayName: Genarito
Tags: <r><gene-expression><correlation><p-values>
Title: P-value correction when evaluating correlation between gene and miRNA expression
ThreadText: # P-value correction when evaluating correlation between gene and miRNA expression
  
  (Asked by: username_0 on 2020-07-17)
  
  First of all I apologize without the question is very basic, I am taking my first steps in bioinformatics.
  
  ## Data information
  
  We are evaluating the correlation (using the Pearson, Kendall or Spearman method) between gene expression and miRNA expression using the [corAndPvalue](https://www.rdocumentation.org/packages/WGCNA/versions/1.69/topics/corAndPvalue) function of WCGNA.
  
  The resulting structure would be a DataFrame containing all combinations between each gene with each miRNAs, containing the following columns:
  
  ```
  Gene     miRNA      Correlation P-value
  Gen_1    miRNA_1    0,959       0.00311
  Gen_1    miRNA_2    -0,039      0.1041
  Gen_1    miRNA_3    -0,344      0.0021
  Gen_2    miRNA_1    0,1333      0.00451
  Gen_2    miRNA_2    0,877       0.07311
  ...
  
  ```
  
  ## Question
  
  Considering the huge number of correlation tests we are going to evaluate, we need to adjust the p-values to avoid correlations due to chance. Bonferroni does not seem to be the best solution, so we would use Benjamini-Hochberg method (BH). The question is:
  
  The BH correction for the `Gen_1` x `miRNA_1` combination, should consider the p-values of all combinations that include Gen\_1 (Option 1), or should consider all the p-values of all the genes x miRNA combinations (Option 2)?
  
  For example, let's assume an expression dataset of 20,000 genes and another of 15,000 miRNAs
  
  **Option 1:**
  
  To adjust `Gen_1` x `miRNA_1` we would use 15,000 p-values (`Gen_1` x `miRNA_1`, `Gen_1` x `miRNA_2`, ..., `Gen_1` x `miRNA_15000`).
  
  **Option 2:**
  
  To adjust `Gen_1` x `miRNA_1` we would use 300,000,000 p-values (`Gen_1` x `miRNA_1`, `Gen_1` x `miRNA_2`, ..., `Gen_1` x `miRNA_15000`, `Gen_2` x `miRNA_1`, `Gen_2` x `miRNA_2`, ..., `Gen_2` x `miRNA_15000` and so on).
  
  ## Suplementary question
  
  Documentation of the method [fdrcorrection](https://www.statsmodels.org/stable/generated/statsmodels.stats.multitest.fdrcorrection.html?highlight=fdrcorrection#statsmodels.stats.multitest.fdrcorrection) from Python [Statsmodels library](https://www.statsmodels.org/stable/index.html) suggests that for negative correlations (that could be frequent in a mRNA x miRNA correlation analysis) Benjamini-Yekutieli would work better; is that right? Or Benjamini-Hochberg method would be appropiated for this case?
  
  Any kind of help would be much appreciated, thanks in advance!
  
  **Tags:** r, gene-expression, correlation, p-values
  
  > **Comments:**
  > **username_0**: There's a good answer in CrossValidated forum! [Link](https://stats.stackexchange.com/questions/478037/p-value-correction-for-multiple-testing-using-huge-datasets)  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2021-03-04. Score: 0 | Accepted answer
  
  I made the same [question in CrossValidated](https://stats.stackexchange.com/q/478037/208550) forum and got an excellent answer!
  
  The important part:
  
  > You need to correct for all of the comparisons you are doing. So if
  > that's 300,000,000 comparisons you need to correct for that many
  > multiple comparisons.
  
  For more information check the answer in the link above
  
  
  ---
  
  