<p>The post here is useful ... <a href="https://support.bioconductor.org/p/76790/" rel="nofollow noreferrer">https://support.bioconductor.org/p/76790/</a></p>
<p><code>ExactTest</code> is really cool and completely different from <code>glmQLFit</code> <code>glmFit</code> etc ... you'll need two controls to check it works (it could just reject everything). Its described here <a href="https://rdrr.io/bioc/edgeR/man/exactTest.html" rel="nofollow noreferrer">https://rdrr.io/bioc/edgeR/man/exactTest.html</a></p>
<p>There is a concern, some of the <strong>lncDIFF</strong> data looked more like a lognormal to me in the publication, but I didn't read it in sufficient detail. Anyway your data will probably approximate to a negative binomial distribution and it's statistically tricky to  assess whether two negative binomial distributions are significantly different ... the <code>ExactTest</code> will do this.</p>
<p>Is the total output of the control significantly different to the test sample? ... the <code>ExactTest</code> will tell you. You want <em>p</em> &lt; 0.05, preferably a lot lower than 0.05 to be convinced. However, you need to compare two control samples against each other, where <em>p</em> &gt; 0.05 for the subsequent tests to be valid.</p>
<hr />
<p>So really nice BUT you need to check whether it is a negative binomial FIRST. Thats what the other tests are doing. Please do check whether <strong>lncDIFF</strong> identified a negative binomial, because if it ain't <code>ExactTest</code> will not work, they could be using a different distribution.</p>
<p>The other tests you mentioned are different to the <code>ExactTest</code> because they simply assess whether the data is negative binomial. The distribution is the frequency of each RNA transcript BTW. edgeR's <strong>lnfDIFF</strong> requires that distribution and thats how it can assign probabilities to the difference between the frequency distribution of two identical transcripts under difference experimental conditions (or other conditions). So you need a test to say &quot;yeah I'm a negative binomial&quot; (assuming it is negative binomial), then everything else via <strong>lncDIFF</strong> is then valid.</p>
<p>First you've got to fit you data to a model ...</p>
<pre><code>y &lt;-glmGLMFit(...)
</code></pre>
<p>... is the function and that uses general linear models to fit the negative binomial. The fit will result in something called &quot;a residual&quot; and that is very important, the smaller the better. Testing whether that residual is small enough for a negative binomial to be declared is down to ...</p>
<pre><code>glmLRT(y ...)
</code></pre>
<p>This is a likelihood ratio test, to test the observed likelihood against the model (p &gt; 0.05). You can also use</p>
<pre><code>gof(y ...)
</code></pre>
<p>this is goodness of fit, as the link says the residual follows a chi-squared distribution, i.e. its tested on the chi2 tables and thats easy to understand. Again you need a probability &gt; 0.05 to declare a fit.</p>
<p>HOWEVER, the <strong>lnfDIFF</strong> guys developed a quasi-likelihood to assess the distribution</p>
<pre><code>z&lt;-glmQLFit(...)
</code></pre>
<p>Fits the data via quasi-likelihood, I honestly have no empirical idea how that works.</p>
<pre><code>glmQLTest(z ...)
</code></pre>
<p>tests the fit to the distribution. You need a probability &gt; 0.05. Again I have not empirical idea whats going on here.</p>
<p>ANY non-significant result is good, doesn't matter if its GLM with gof, GLM with LRT, GLM-QL (whatever that is) because all of these are solid tests.  Which would I use? The guys who developed <strong>lncDIFF</strong> used QL (quasi-likelihood) to assess the fit (might be a good idea). However, statistically I honestly don't know whats going on, so I would also look at the GLM and fit it against the goodness of fit - because thats easy to understand.</p>
<p>What do I do to assess the fit? I use machine learning, but it's way more complicated than anything here.</p>
<hr />
<p>From the comments.</p>
<p>It's important to note the context. The OP is performing non-coding RNA work, <strong>lncDIFF</strong> is much better than normal <strong>edgeR</strong> for this type of data described here <a href="https://bioinformatics.stackexchange.com/questions/21259/statistical-methods-suitable-for-de-analysis-of-non-coding-rnas">Statistical methods suitable for DE analysis of non coding RNAs</a>.</p>
<p><strong>lncDIFF</strong> is now available for <strong>R</strong> <a href="https://cran.r-project.org/web/packages/lncDIFF/index.html" rel="nofollow noreferrer">here</a></p>
<p>... so the methods of edgeR should be available to it. <code>glmQLFit()</code> is a general function in R. Providing the <strong>lncDIFF</strong> object will be accepted by the tests, by performing everything in <strong>R</strong> this should solve this.</p>
<p><em>I would advise using</em> <strong>lnfDIFF</strong>'s QL directly, i.e.</p>
<pre><code>y&lt;-ZIQMLfit(...) # fit the distribution
ZIQML.LRT(y ...) # test the fit
</code></pre>
<p>The manual is here</p>
<p><a href="https://github.com/qianli10000/lncDIFF/blob/master/lncDIFF-manual.pdf" rel="nofollow noreferrer">https://github.com/qianli10000/lncDIFF/blob/master/lncDIFF-manual.pdf</a></p>
<hr />
<p>I hope that makes sense these are pretty advanced stats so it can be tricky to understand them. Whilst I can teach code, I don't teach complex stats outside machine learning.</p>

CC BY-SA 4.0
2023-07-11T05:46:27.753Z
So... is edgeR a good tool for analysing the DE of noncoding features? I mean since lncRNA has a separate specialised tool for its analysis, which they claim is better than edgeR, is edgeR fine if I want to analyse noncoding features?
Arkajyoti Banerjee
CC BY-SA 4.0
2023-07-11T03:45:15.110Z
2023-07-12T15:52:54.050Z
2023-07-12T15:52:54.050Z
M__
<p>I am currently working with the non-coding features of <em>A. thaliana</em>, and trying to get the DE features. Among the three DE test methods in <code>edgeR</code> such as <code>exactTest()</code>, <code>glmFit()</code> and <code>glmLRT()</code>, <code>glmQLFit()</code> and <code>glmQLFTest()</code>, which is/are the one(s) most suitable for running DE tests on miRNA, snRNA, snoRNA, pseuogenes, transposons and 5' and 3'-UTRs?
Should I be using any other DE analysis tool instead of <code>edgeR</code> for some specific non-coding feature, like there's lncDIFF for lncRNA?</p>

CC BY-SA 4.0
2023-07-10T16:44:57.900Z
Regarding what are the differences between these tests, this answer by one of the authors might be helpful: https://support.bioconductor.org/p/76790/
Ammar
<rna-seq><differential-expression><edger>
DE analysis tool and method for non-coding features
# DE analysis tool and method for non-coding features

(Asked by: username_0 on 2023-07-07)

I am currently working with the non-coding features of *A. thaliana*, and trying to get the DE features. Among the three DE test methods in `edgeR` such as `exactTest()`, `glmFit()` and `glmLRT()`, `glmQLFit()` and `glmQLFTest()`, which is/are the one(s) most suitable for running DE tests on miRNA, snRNA, snoRNA, pseuogenes, transposons and 5' and 3'-UTRs?
Should I be using any other DE analysis tool instead of `edgeR` for some specific non-coding feature, like there's lncDIFF for lncRNA?

**Tags:** rna-seq, differential-expression, edger
> **Comments:**
> **username_1**: Regarding what are the differences between these tests, this answer by one of the authors might be helpful: https://support.bioconductor.org/p/76790/  

---

## 1 answers

### Answer by username_2 on 2023-07-11. Score: 3 | Accepted answer

The post here is useful ... https://support.bioconductor.org/p/76790/
ExactTest is really cool and completely different from glmQLFit glmFit etc ... you'll need two controls to check it works (it could just reject everything). Its described here https://rdrr.io/bioc/edgeR/man/exactTest.html
There is a concern, some of the lncDIFF data looked more like a lognormal to me in the publication, but I didn't read it in sufficient detail. Anyway your data will probably approximate to a negative binomial distribution and it's statistically tricky to  assess whether two negative binomial distributions are significantly different ... the ExactTest will do this.
Is the total output of the control significantly different to the test sample? ... the ExactTest will tell you. You want p < 0.05, preferably a lot lower than 0.05 to be convinced. However, you need to compare two control samples against each other, where p > 0.05 for the subsequent tests to be valid.

So really nice BUT you need to check whether it is a negative binomial FIRST. Thats what the other tests are doing. Please do check whether lncDIFF identified a negative binomial, because if it ain't ExactTest will not work, they could be using a different distribution.
The other tests you mentioned are different to the ExactTest because they simply assess whether the data is negative binomial. The distribution is the frequency of each RNA transcript BTW. edgeR's lnfDIFF requires that distribution and thats how it can assign probabilities to the difference between the frequency distribution of two identical transcripts under difference experimental conditions (or other conditions). So you need a test to say "yeah I'm a negative binomial" (assuming it is negative binomial), then everything else via lncDIFF is then valid.
First you've got to fit you data to a model ...
y <-glmGLMFit(...)

... is the function and that uses general linear models to fit the negative binomial. The fit will result in something called "a residual" and that is very important, the smaller the better. Testing whether that residual is small enough for a negative binomial to be declared is down to ...
glmLRT(y ...)

This is a likelihood ratio test, to test the observed likelihood against the model (p > 0.05). You can also use
gof(y ...)

this is goodness of fit, as the link says the residual follows a chi-squared distribution, i.e. its tested on the chi2 tables and thats easy to understand. Again you need a probability > 0.05 to declare a fit.
HOWEVER, the lnfDIFF guys developed a quasi-likelihood to assess the distribution
z<-glmQLFit(...)

Fits the data via quasi-likelihood, I honestly have no empirical idea how that works.
glmQLTest(z ...)

tests the fit to the distribution. You need a probability > 0.05. Again I have not empirical idea whats going on here.
ANY non-significant result is good, doesn't matter if its GLM with gof, GLM with LRT, GLM-QL (whatever that is) because all of these are solid tests.  Which would I use? The guys who developed lncDIFF used QL (quasi-likelihood) to assess the fit (might be a good idea). However, statistically I honestly don't know whats going on, so I would also look at the GLM and fit it against the goodness of fit - because thats easy to understand.
What do I do to assess the fit? I use machine learning, but it's way more complicated than anything here.

From the comments.
It's important to note the context. The OP is performing non-coding RNA work, lncDIFF is much better than normal edgeR for this type of data described here Statistical methods suitable for DE analysis of non coding RNAs.
lncDIFF is now available for R here
... so the methods of edgeR should be available to it. glmQLFit() is a general function in R. Providing the lncDIFF object will be accepted by the tests, by performing everything in R this should solve this.
I would advise using lnfDIFF's QL directly, i.e.
y<-ZIQMLfit(...) # fit the distribution
ZIQML.LRT(y ...) # test the fit

The manual is here
https://github.com/qianli10000/lncDIFF/blob/master/lncDIFF-manual.pdf

I hope that makes sense these are pretty advanced stats so it can be tricky to understand them. Whilst I can teach code, I don't teach complex stats outside machine learning.

> **Comments:**
> **username_0**: So... is edgeR a good tool for analysing the DE of noncoding features? I mean since lncRNA has a separate specialised tool for its analysis, which they claim is better than edgeR, is edgeR fine if I want to analyse noncoding features?  

---

