Ok thanks, is there a restriction on the values that can be mapped then? I was using the V5 to give an example with the same data you used but I have normalised expression values in V5 that I wanted to map and I was trying with those as well, they range from -20 to +20, but I also wanted to map several other metadata columns for example that go from 0.1 to 2. One of my "peak" files look like this:
GRanges object with 100001 ranges and 4 metadata columns:
seqnames ranges strand | V4 V5
<Rle> <IRanges> <Rle> | <factor> <numeric>
 chr1 [ 10010, 10664] * | Peak_1 4.4973750
 chr1 [713785, 714569] * | Peak_2 5.4287500
 chr1 [762394, 763144] * | Peak_3 3.3098750
 chr1 [815103, 817360] * | Peak_4 7.0947500
If I try with V5 or V6 or any other columns of my data the weightCol is ignored and plots the read frequency instead with this command:
plotAvgProf2(peak, upstream=3000, downstream=3000, weightCol="V5")
And I get this error if I try the bootstrap:
"Error in boot(data = tagMatrix, statistic = getSgn, R = RESAMPLE_TIME, :
number of items to replace is not a multiple of replacement length"
So I basically have not been able to apply it to my peaks.
It seems to work with one peak only provided by the vignette but I can't see what the difference is between my peak and the peak in the Vignette... Is there maybe an additional specification I need to provide, such as ylim values? I think the problem is in the coordinates:
Error in plotAvgProf.internal(tagMatrix, xlim = xlim, xlab = xlab, ylab = ylab, :
please specify appropreate xcoordinations...
Calls: plotAvgProf -> plotAvgProf.internal
I am trying to understand whether it is the tagMatrix that does not recognise the weightCol "V5" in my data, but it looks like it has the correct form, so maybe it could be a limit that is set in the plotAvgProf.internal function, which gives the default of plotting the read frequency if some limits are not met? The "dd" data frame in the getTagCount function basically gives me the values of the read frequencies instead of the values of the weightCol, but I am not sure where this goes wrong... the tagMatrix from the getTagMatrix looks fine as well as the peak.cov, but then when it is passed to the plotAvgProf.internal it doesn't recognise the "value"...
If this is a problem I will try to plot histograms of these values by distance to TSS independently... can you please advise?
Thank you very much for your time.