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.



Source link