Browse code

*added test to GmapGenome construct when directory is passed that doesn't exist

*added test to bam_tally to check for exception when a GmapGenome that
has not yet been created is used


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

Cory Barr authored on 22/11/2012 00:43:04
Showing 3 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: 1.1.3
13
+Version: 1.1.4
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
... ...
@@ -89,3 +89,7 @@ test_GmapGenome_spliceSites_replacement <- function() {
89 89
   x <- spliceSites(genome, name="dbSnp") <- shiftedExons
90 90
   checkIdentical(class(x), class(GRangesList()))
91 91
 }
92
+
93
+test_if_GmapGenome_dir_does_not_exist <- function() {
94
+  checkException(GmapGenome(genome="NoGenome", directory = file.path(tempdir(), "DoesNotExist")))
95
+}
92 96
new file mode 100644
... ...
@@ -0,0 +1,7 @@
1
+test_IITs_not_created <- function() {
2
+  gmapGenome <- GmapGenome(genome="NoGenome", directory = getwd())
3
+  btp <- BamTallyParam(genome=gmapGenome,
4
+                       which = RangesList())
5
+  bam_file <- system.file("extdata/test_data_aln/test_data_aln.concordant_uniq.bam", package="gmapR", mustWork=TRUE)
6
+  checkException(bam_tally(x=bam_file, param=btp))
7
+}