From 2aa8c7b60748933b98f11cd22ae12e8e5bd50c2e Mon Sep 17 00:00:00 2001 From: "hpages@fhcrc.org" Date: Mon, 20 Apr 2015 21:38:31 +0000 Subject: [PATCH] "coverage" methods now accept 'shift' and 'weight' supplied as an Rle git-svn-id: https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/GenomicRanges@102856 bc3139a8-67e5-0310-9ffc-ced21a209358 --- R/coverage-methods.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/coverage-methods.R b/R/coverage-methods.R index 9e334a9..fe48cb3 100644 --- a/R/coverage-methods.R +++ b/R/coverage-methods.R @@ -41,7 +41,7 @@ arg, "\" columns") arg <- x_mcols[ , arg] } - if (!is.numeric(arg)) + if (!(is.numeric(arg) || is(arg, "Rle") && is.numeric(runValue(arg)))) stop("'", arg.label, "' must be a numeric vector, a single string, ", "or a list-like object") split(.recycle(arg, length(x), arg.label, "x"), seqnames(x))