**Background**

We observed some RNA-seq coverage in regions outside annotated genes - let's called them intergenic. This expression appears to be more pronounced, or unique, to a particular condition.

**Goal**

Find those genomic regions that have higher coverage than expected by random noise alone, along with a read count value (expression). We are looking to identify those regions with high resolution, but rather a broad overview to: 

- test whether or not there is a trend for more intergenic expression in some conditions;

- intersect those expressed intergenic regions with other relevant genomic features.

**Data**

Paired-end, total RNA-seq, Vertebrate species, **not human**.

**Possible strategies**

A, näive:

- divide the genome in windows (size?)
- count reads per window
- remove regions containing genes +/- 5kb
- set background: randomly select X regions (1000) with 100 permutations to find  distribution of background. Define cut-off as mean (or median + 2*SD).
- Use cut-off to select intergenic regions with high expression. Merge those within 1kb.


B, fancier following a histone mark-style [approach][1]:

- Use `csaw` to calculate coverage using sliding-window  (size?)
- remove bins containing genes +/- 5kb
-  median coverage across those bins used to filter "expressed regions" (I could also use a permutation approach here)

**Question(s)**

1. Does any of the above options sound reasonable for what I trying to accomplish?
2. Is there some detail missing?


For the window sizes I was thinking about using the average size of exons, since using the size of transcripts could lead to really large windows. Also, if the expression is "transcript-like", short exons - variable length intron - it could lead to large discrepancies in the average coverage and some regions might be missed.   

  [1]: https://www.bioconductor.org/help/workflows/chipseqDB/#counting-reads-into-windows
To answer my own question, I ended using two complementary approaches:

1. was to simply count total intergenic reads per condition and compare those (normalizing to mapped reads). The picture as pretty obvious with some conditions showing a lot more intergenic expression than others. 

2. I also used `derdinder` to define expressed regions irrespective of annotation, and them used heuristics to select those of interest. We basically had a handful of regions manually annotated, and from those I could derive rules to select other regions of interest. In the end, the rules were stricter than the manual annotation. 

Anyway, `derfinder` was a great tool for this purpose, though it was a little fiddly, and there was lot of trial and error with visual inspection on IGV to get the right mix of sensitivity and specificity of expressed regions.    