Browse code

defined 'which' as GenomicRanges_OR_GRangesList

alexandremkuhn authored on 31/08/2017 12:51:24
Showing1 changed files

... ...
@@ -8,7 +8,7 @@
8 8
 
9 9
 setClass("BamTallyParam",
10 10
          representation(genome = "GmapGenome",
11
-                        which = "GenomicRanges",
11
+                        which = "GenomicRanges_OR_GRangesList",
12 12
                         desired_read_group = "character_OR_NULL",
13 13
                         minimum_mapq = "integer",
14 14
                         concordant_only = "logical",
... ...
@@ -32,8 +32,8 @@ setClass("BamTallyParam",
32 32
 ###
33 33
 
34 34
 normArgWhich <- function(x, genome) {
35
-  if (!is(x, "GenomicRanges"))
36
-    stop("'which' must be a GenomicRanges")
35
+  if (!is(x, "GenomicRanges_OR_GRangesList"))
36
+    stop("'which' must be a GenomicRanges or GRangesList")
37 37
   si <- seqinfo(genome)
38 38
   seqinfo(x, new2old = match(seqlevels(si), seqlevels(x))) <-
39 39
     merge(si, seqinfo(x))