Question: How to preserve the strand of coverage in derfinder::regionMatrix() ?
gravatar for fruce_ki
13 months ago by
University of Dundee
fruce_ki10 wrote:

I am using derfinder (in region mode) for annotation-free DE. Then I want to match the DE regions to the nearest *upstream* known gene. For this it is important to know which strand the coverage is on.

However regionMatrix() produces regions that have no strand information. The result of fullCoverage has not strand information either. The $regions element of the regionMatrix output is already a GRanges object and I cannot think of any good reason why someone would define coverage regions as strand agnostic by default.

Is there a way to preserve or at least recover this information? I cannot find a relevant option in the derfinder documentation or a workaround posted somewhere on the web.


Our HPC runs R -3.3.3 with derfinder-1.8.5 (not the most recent, but I can't find relevant documentation in 1.10.6 either).
Updating packages on the HPC is a pain and prone to domino-effect errors, so any suggestions for a workaround that I could implement to re-add the strand information to the $regions (as opposed to using the latest dev version derfinder, should Leonardo decide to add the option) would be much appreciated!

ADD COMMENTlink modified 13 months ago by Leonardo Collado Torres610 • written 13 months ago by fruce_ki10
gravatar for Leonardo Collado Torres
13 months ago by
United States
Leonardo Collado Torres610 wrote:


If you have stranded RNA-seq data you have to process each strand separately. If you have BAM files, that means using the appropriate Rsamtools::scanBamFlag() information. If you have BigWig files for each strand, then that means importing the data for one strand at a time. You can then add the strand to the $regions() output manually for the results for each strand.



ADD COMMENTlink written 13 months ago by Leonardo Collado Torres610

I feared as much. That is the conclusion we reached in my lab too. So that's what I'm looking into, indeed. I was hoping there might have been an easier way. Oh well...Thanks! At least now I know I'm not overcomplicating it.

ADD REPLYlink written 13 months ago by fruce_ki10
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 180 users visited in the last hour