Browse code

make seqinfo setting robust to missing seqlevels

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

Michael Lawrence authored on 07/12/2015 03:40:40
Showing2 changed files

... ...
@@ -9,7 +9,7 @@ Description: GSNAP and GMAP are a pair of tools to align short-read
9 9
         methods to work with GMAP and GSNAP from within R. In addition,
10 10
         it provides methods to tally alignment results on a
11 11
         per-nucleotide basis using the bam_tally tool.
12
-Version: 1.13.7
12
+Version: 1.13.8
13 13
 Depends: R (>= 2.15.0), methods, GenomeInfoDb (>= 1.1.3),
14 14
         GenomicRanges (>= 1.17.12)
15 15
 Imports: S4Vectors, IRanges, Rsamtools (>= 1.17.8), rtracklayer (>= 1.31.2),
... ...
@@ -75,7 +75,9 @@ setMethod("import", c("GmapOutput", "missing", "missing"),
75 75
                   f <- as(con, "RTLFile")
76 76
               }
77 77
               ans <- import(f, ...)
78
-              seqinfo(ans) <- seqinfo(con@param@genome)
78
+              si <- seqinfo(con@param@genome)
79
+              seqlevels(ans) <- seqlevels(si)
80
+              seqinfo(ans) <- si
79 81
               ans
80 82
           })
81 83