0

I have completed an eqtl analysis using the MatrixEQTL package.

me <- Matrix_eQTL_engine(
    snps = snps,
    gene = gene,
    cvrt = cvrt,
    output_file_name = output_file_name,
    pvOutputThreshold = 0.05,
    useModel = modelLINEAR, 
    errorCovariance = errorCovariance, 
    verbose = TRUE,
    pvalue.hist = TRUE,
    min.pv.by.genesnp = FALSE,
    noFDRsaveMemory = FALSE)

The code is taken from ?Matrix_eQTL_engine, which also contains the code to set things up.

I set a threshold pvalue as 0.05 but I am wondering if there is a way to find a threshold value by a test to include in this script. I also want to correct for multiple testing and as per matrixeqtl manual, it does correct for False Discovery Rate. But I want to find a threshold pvalue for multiple testing for Bonferroni correction and then used that pvalue. I hope to add that to this code as well. Thank you for any suggestion/help!

JayPeerachai
  • 3,499
  • 3
  • 14
  • 29

1 Answers1

0

the author of the package here.

First, I would NOT suggest using pvOutputThreshold = 1 as it can result in storing billions of p-values and make R run out of memory.

Second, Matrix eQTL returns the number of tests it has conducted, so that you can do Bonferroni correction yourself. You can get it with this line:

me$all$ntests

or, if you differentiate local and distant tests:

me$cis$ntests
me$trans$ntests
Andrey Shabalin
  • 4,389
  • 1
  • 19
  • 18
  • Thank you @Andrey! Based on your suggestion, I have calculated Bonferroni threshold. Does MatrixEQTL gives an option to choose any correction as I see it automatically gives FDR values for each association? How can I use this Bonferroni threshold to choose the corrected p values. Thank you! – user1567654 May 18 '21 at 03:21
  • 1
    Let's take a look at an example. Say, we have N = 1,000,000 tests. Then, after Bonferroni correction, a test is significant at 5% if p-value is < 0.05 / N. This is then the p-value threshold you can provide to Matrix eQTL. – Andrey Shabalin May 19 '21 at 04:04
  • Thank you, it worked! I am trying to find ways to summarize/present (such as figures) eqtl findings here. Can you suggest some ways to get useful interpretations of the gene-SNP associations reported. Thank you! – user1567654 May 20 '21 at 15:55