Skip to content

Commit

Permalink
add check for NULL space/names in RangesList=>GRanges
Browse files Browse the repository at this point in the history
  • Loading branch information
m.lawrence committed Apr 12, 2015
1 parent 8e7c675 commit 8683bd6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions R/GRanges-class.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down

0 comments on commit 8683bd6

Please sign in to comment.