One hack would be to add 1 to all of the scores, replace the zeros in the
coverage() result with NAs and subtract 1. I've hit something like this a
couple times in the past. The coverage method for GRanges could gain a
default value argument.

Michael



On Sun, Jan 6, 2013 at 11:00 PM, Dario Strbenac <D.Strbenac@garvan.org.au>wrote:

> >   coverage(g, weight=values(g)$scores)
>
> That is close to what I was after, although the ranges which aren't
> present in the GRanges object effectively have missing scores and need to
> be NA because 0 is a valid score for the ranges which are present. So, if I
> had a view defined that only partially overlapped with a range in the
> example, I would want any summary to give NA, rather than taking 0 into the
> calculation.
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor@r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives:
> http://news.gmane.org/gmane.science.biology.informatics.conductor
>

	[[alternative HTML version deleted]]

