jokergoo / EnrichedHeatmap

make enriched heatmap which visualizes the enrichment of genomic signals to specific target regions.
http://jokergoo.github.io/EnrichedHeatmap/
Other
187 stars 25 forks source link

normalizeToMatrix: do not want to extend, and target_ratio = 1 #6

Closed crazyhottommy closed 8 years ago

crazyhottommy commented 8 years ago

Hi,

I was wondering if there is a way to specify extend =0 , and only plot the genebody profile. every gene is with different length, so I know the bin was calculated with percentage of each gene length. The following will give me error.

normalizeToMatrix(meth, cgi, value_column = "meth", mean_mode = "absolute",
+                   extend = 0, empty_value = NA, smooth = TRUE, target_ratio = 1)
Error in if (any(extend%%w > 0)) { : 
  missing value where TRUE/FALSE needed

The reason is that I want actually use the whole chromosome arm as target. and extending will exceed the chromosome length. I want to use normalizeToMatrix to calculate the sum of my signal in windows binned as % of the chromosome arm length.

I know I can probably get around by changing your source code a bit, but you know better than me:)

Thanks, Ming

jokergoo commented 8 years ago

Hi Ming,

Hope it is not too late. I finally have time to work on this package. As you suggest, now upstream and/or downstream can be excluded now by setting extend = 0 or target_ratio = 1.

image

crazyhottommy commented 8 years ago

Never too late! thanks!

Ming