From 8683bd697adfef0823c47f64901dabc1ffaff8ea Mon Sep 17 00:00:00 2001 From: "m.lawrence" Date: Sun, 12 Apr 2015 04:30:16 +0000 Subject: [PATCH] add check for NULL space/names in RangesList=>GRanges git-svn-id: https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/GenomicRanges@102347 bc3139a8-67e5-0310-9ffc-ced21a209358 --- R/GRanges-class.R | 3 +++ 1 file changed, 3 insertions(+) diff --git a/R/GRanges-class.R b/R/GRanges-class.R index 6512e6a..ee1810f 100644 --- a/R/GRanges-class.R +++ b/R/GRanges-class.R @@ -193,6 +193,9 @@ setAs("RangesList", "GRanges", ranges <- unlist(from, use.names=FALSE) ranges <- IRanges(start=start(ranges), width=width(ranges)) ## From now, ranges is guaranteed to be an IRanges *instance*. + if (is.null(space(from))) { + stop("Cannot create GRanges when 'space(from)' is NULL") + } gr <- GRanges(seqnames = space(from), ranges = ranges, strand = Rle("*", length(ranges)))