How to preserve the strand of coverage in derfinder::regionMatrix() ?
1
0
Entering edit mode
fruce_ki ▴ 20
@fruce_ki-13220
Last seen 5.4 years ago
Austria/Vienna/Research Institute for M…

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.

Thanks!

PS.
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!

derfinder • 1.5k views
ADD COMMENT
0
Entering edit mode
@lcolladotor
Last seen 1 day ago
United States

Hi,

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.

Best,

Leonardo

ADD COMMENT
0
Entering edit mode

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 REPLY

Login before adding your answer.

Traffic: 1044 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6