text: user2040: 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?
  
  user939: Did you look into literature? I am not an expert in this field, but a small search on google leads me to IRFinder (ref.), a tool that can assess intron retention. My advice is to see if this tool can help you, before reinventing the wheel...
  
  user235: 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.
  
original_text: 2040: <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>
   939: <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>
   235: <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>
  