Browse code

Match up GsnapParams@splicing with new use_splicing gsnap parameter

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

Michael Lawrence authored on 07/09/2012 17:37:14
Showing 2 changed files

... ...
@@ -15,6 +15,8 @@ setClass("GmapSnps",
15 15
 
16 16
 setGeneric("name", function(x) standardGeneric("name"))
17 17
 
18
+setMethod("name", "NULL", function(object) NULL)
19
+
18 20
 setMethod("name", "GmapSnps", function(x) {
19 21
   x@name
20 22
 })
... ...
@@ -182,15 +182,10 @@ setAs("GsnapParam", "list", function(from) {
182 182
   to$db <- genome(to$genome)
183 183
   to$dir <- path(directory(to$genome))
184 184
   to$genome <- NULL
185
-  if(!is.null(to$snps)) {
186
-    to$use_snps <- name(to$snps)
187
-  } else {
188
-    to$use_snps <- NULL
189
-  }
185
+  to$use_snps <- name(to$snps)
190 186
   to$snpsdir <- path(directory(to$snps))
191
-  to$snps <- NULL
192 187
   to$novelsplicing <- as.integer(to$novelsplicing)
193
-
188
+  to <- rename(to, splicing = "use_splicing")
194 189
   extras <- to$extra
195 190
   to <- c(to, extras)
196 191
   to$extra <- NULL