This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Multiply BED scores by a normalization factor in precise intervals in Granges object.

I have a BED file from ChIPseq as a Granges object with associated scores values as metadata. In order to plot this region (1Mb) with Gviz, I need firstly to normalize the scores by a normalization factor calculated from each enriched peak present in the 1Mb region (ratio before and after normalization with MAnorm). This is required because I need to compare acetylation marks in two conditions. My question is: how could I multiply every score present in a given interval of the Granges object by the corresponding normalization factor for that interval? Then I should repeat this operation for each interval and associated normalization factor until I have covered the entire 1Mb region.

r

1 answer

I got it.

Firstly I had to subset by interval, then simply multiply the scores to the corresponding normalization factor. Finally create a grangesList comprising the new objects and turn it again to granges for visualization.

Log in to answer this question.