<p>Here is how we do this:</p>

<p>First break your gene model down into non-overlapping chunks, such that any possible gene model can be built from a combination of those chunks. E.g.</p>

<pre><code>transcript 1 |&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;|----------|&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;|---|&gt;&gt;&gt;&gt;|
transcript 2 |&gt;&gt;&gt;&gt;&gt;&gt;|-------------|&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;|---|&gt;&gt;&gt;&gt;|
transcript 3 |&gt;&gt;&gt;&gt;&gt;&gt;|-------------|&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;|
chunks       |+++1++|+2|+++++3++++|+++4++++|+5+|+6++|
</code></pre>

<p>this can be achieved using <code>cgat gtf2gtf --method=genes-to-unique-chunks</code> from the <code>cgat-apps</code> toolkit if you don't want to code it yourself.</p>

<p>I call<br>
chunks 1, 4 and 6 constitutive exon<br>
chunk  3 constitutive intron
chunk  2 alternate intron<br>
chunk  5 annotated retained intron.</p>

<p>Now use <code>featureCounts</code> to count the number of reads in each chunk.</p>

<p>Test the chunk counts for usage using <code>DEXSeq</code>. </p>

<p>Filter the results to just include chunks of type 2, 3 and 5 and recompute the FDRs.</p>

CC BY-SA 4.0
2019-10-01T19:00:14.163Z
If you have your transcripts in BED format, you can use `bedops --partition` to make chunks.
Alex Reynolds
CC BY-SA 4.0
2019-10-01T10:15:25.140Z
2019-10-01T10:15:25.140Z
Ian Sudbery
<p>You might take a look at the MISO algorithm for inspiration, or as a method for calculating confidence intervals of alternatively spliced isoforms: <a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3037023/" rel="nofollow noreferrer">https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3037023/</a></p>

CC BY-SA 4.0
2019-04-30T15:40:25.003Z
2019-04-30T15:40:25.003Z
Jay Moore
<p>Did you look into literature? I am not an expert in this field, but a small search on google leads me to <a href="https://github.com/williamritchie/IRFinder/wiki" rel="nofollow noreferrer">IRFinder</a> (<a href="https://genomebiology.biomedcentral.com/articles/10.1186/s13059-017-1184-4" rel="nofollow noreferrer">ref.</a>), a tool that can assess intron retention. My advice is to see if this tool can help you, before reinventing the wheel...</p>

CC BY-SA 4.0
2019-04-30T09:51:03.703Z
2019-04-30T09:51:03.703Z
benn
<p>I am trying to calculate p-values and ultimately FDR values for RI introns for 2 conditions of experiment I have(control and knockdown)</p>

<p>For every condition I have 3 biological replicates each: 3 control replicates and 3 knockdown replicates.</p>

<p>This is the header line of my input file.</p>

<pre><code>chrom   Istart  Iend    strand  avg-L_R_counts-1    Sk_counts-1 avg-L_R_counts-2    Sk_counts-2
</code></pre>

<p>-1 and -2 are 2 sample conditions control and knockout respectively</p>

<p>avg-L_R_counts = for a particular intron, this is the average of reads 5bp up stream and downstream of the 5' end and at the 3'end of the intron</p>

<p>Sk_counts = This is the number of reads spanning exon-exon junction for that intron.</p>

<p>I have approximately 350 introns(this is yeast). I can get the Percent Spliced In values but I am interested in getting a p-value and then I can calculate the FDR values.
Can anyone point me as to what approach I should take to calculate a p-value, or what test should I use?</p>

CC BY-SA 4.0
2019-04-30T07:20:56.817Z
What is your null hypothesis? What do you want to test? That one condition has more introns than the other?
llrs
CC BY-SA 4.0
2019-04-30T16:18:28.213Z
My null hypothesis is that there is no intron retention in either conditions
user3138373
<rna-seq><rna-splicing><molecular-genetics>
Calculating p-value for introns which are retained (or not) between 2 conditions
# Calculating p-value for introns which are retained (or not) between 2 conditions

(Asked by: username_0 on 2019-04-29)

I am trying to calculate p-values and ultimately FDR values for RI introns for 2 conditions of experiment I have(control and knockdown)
For every condition I have 3 biological replicates each: 3 control replicates and 3 knockdown replicates.
This is the header line of my input file.
chrom   Istart  Iend    strand  avg-L_R_counts-1    Sk_counts-1 avg-L_R_counts-2    Sk_counts-2

-1 and -2 are 2 sample conditions control and knockout respectively
avg-L_R_counts = for a particular intron, this is the average of reads 5bp up stream and downstream of the 5' end and at the 3'end of the intron
Sk_counts = This is the number of reads spanning exon-exon junction for that intron.
I have approximately 350 introns(this is yeast). I can get the Percent Spliced In values but I am interested in getting a p-value and then I can calculate the FDR values.
Can anyone point me as to what approach I should take to calculate a p-value, or what test should I use?

**Tags:** rna-seq, rna-splicing, molecular-genetics
> **Comments:**
> **username_1**: What is your null hypothesis? What do you want to test? That one condition has more introns than the other?  
> **username_0**: My null hypothesis is that there is no intron retention in either conditions  

---

## 3 answers

### Answer by username_2 on 2019-10-01. Score: 2

Here is how we do this:
First break your gene model down into non-overlapping chunks, such that any possible gene model can be built from a combination of those chunks. E.g.
transcript 1 |>>>>>>>>>|----------|>>>>>>>>|---|>>>>|
transcript 2 |>>>>>>|-------------|>>>>>>>>|---|>>>>|
transcript 3 |>>>>>>|-------------|>>>>>>>>>>>>>>>>>|
chunks       |+++1++|+2|+++++3++++|+++4++++|+5+|+6++|

this can be achieved using cgat gtf2gtf --method=genes-to-unique-chunks from the cgat-apps toolkit if you don't want to code it yourself.
I call
chunks 1, 4 and 6 constitutive exon
chunk  3 constitutive intron
chunk  2 alternate intron
chunk  5 annotated retained intron.
Now use featureCounts to count the number of reads in each chunk.
Test the chunk counts for usage using DEXSeq. 
Filter the results to just include chunks of type 2, 3 and 5 and recompute the FDRs.

> **Comments:**
> **username_3**: If you have your transcripts in BED format, you can use `bedops --partition` to make chunks.  

---

### Answer by username_5 on 2019-04-30. Score: 1

Did you look into literature? I am not an expert in this field, but a small search on google leads me to [IRFinder](https://github.com/williamritchie/IRFinder/wiki) ([ref.](https://genomebiology.biomedcentral.com/articles/10.1186/s13059-017-1184-4)), a tool that can assess intron retention. My advice is to see if this tool can help you, before reinventing the wheel...


---

### Answer by username_4 on 2019-04-30. Score: 0

You might take a look at the MISO algorithm for inspiration, or as a method for calculating confidence intervals of alternatively spliced isoforms: <https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3037023/>


---

