Browse code

fixed bug in handling 'errors' slot of GsnapParams objects

git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/gmapR@68721 bc3139a8-67e5-0310-9ffc-ced21a209358

Cory Barr authored on 22/08/2012 22:25:34
Showing 2 changed files

... ...
@@ -10,7 +10,7 @@ Description: GSNAP and GMAP are a pair of tools to align short-read
10 10
     to work with GMAP and GSNAP from within R. In addition, it provides 
11 11
     methods to tally alignment results on a per-nucleotide basis using 
12 12
     the bam_tally tool.
13
-Version: 0.99.7
13
+Version: 0.99.8
14 14
 Depends: R (>= 2.15.0), methods, GenomicRanges
15 15
 Imports: IRanges, Rsamtools (>= 1.7.4), rtracklayer (>= 1.17.15), GenomicRanges,
16 16
          GenomicFeatures, Biostrings, VariantAnnotation, tools, Biobase
... ...
@@ -163,9 +163,9 @@ GsnapParam <- function(genome, unique_only = FALSE,
163 163
       params$snps <- GmapSnps(snps, genome)
164 164
     }
165 165
   }
166
-  extra <- params$...
166
+  dots <- list(...)
167 167
   ##TODO: this breaks if ... has anything in it
168
-  if (!missing(extra) && !is.null(names(extra))) {
168
+  if (length(dots) > 0) {
169 169
     params$extra <- params$...
170 170
   }
171 171
   params$... <- NULL
... ...
@@ -190,6 +190,11 @@ setAs("GsnapParam", "list", function(from) {
190 190
   }
191 191
   to$snpsdir <- path(directory(to$snps))
192 192
   to$snps <- NULL
193
+
194
+  extras <- to$extra
195
+  to <- c(to, extras)
196
+  to$extra <- NULL
197
+  
193 198
   to
194 199
 })
195 200