[med-svn] r23983 - in trunk/packages/R/r-bioc-genomicfeatures/trunk/debian: . patches tests

Andreas Tille tille at moszumanska.debian.org
Sun Sep 3 13:48:21 UTC 2017


Author: tille
Date: 2017-09-03 13:48:21 +0000 (Sun, 03 Sep 2017)
New Revision: 23983

Added:
   trunk/packages/R/r-bioc-genomicfeatures/trunk/debian/README.source
   trunk/packages/R/r-bioc-genomicfeatures/trunk/debian/tests/
   trunk/packages/R/r-bioc-genomicfeatures/trunk/debian/tests/control_
   trunk/packages/R/r-bioc-genomicfeatures/trunk/debian/tests/run-unit-test
   trunk/packages/R/r-bioc-genomicfeatures/trunk/debian/tests/vignette
Removed:
   trunk/packages/R/r-bioc-genomicfeatures/trunk/debian/docs
Modified:
   trunk/packages/R/r-bioc-genomicfeatures/trunk/debian/README.test
   trunk/packages/R/r-bioc-genomicfeatures/trunk/debian/changelog
   trunk/packages/R/r-bioc-genomicfeatures/trunk/debian/control
   trunk/packages/R/r-bioc-genomicfeatures/trunk/debian/copyright
   trunk/packages/R/r-bioc-genomicfeatures/trunk/debian/patches/drop_tests_requiring_large_data_sets.patch
   trunk/packages/R/r-bioc-genomicfeatures/trunk/debian/watch
Log:
  * New upstream version
  * Standards-Version: 4.1.0 (no changes needed)
  * Versioned Build-Depends: r-cran-rsqlite (>= 2.0)
  * Remove external Rda data files



Added: trunk/packages/R/r-bioc-genomicfeatures/trunk/debian/README.source
===================================================================
--- trunk/packages/R/r-bioc-genomicfeatures/trunk/debian/README.source	                        (rev 0)
+++ trunk/packages/R/r-bioc-genomicfeatures/trunk/debian/README.source	2017-09-03 13:48:21 UTC (rev 23983)
@@ -0,0 +1,13 @@
+Explanation for binary files inside source package according to
+  http://lists.debian.org/debian-devel/2013/09/msg00332.html
+
+Files: inst/extdata/cD.exByEdge-SG-Vig.Rda
+Documentation: 
+
+Files: inst/extdata/cD.exsByGenes-SG-Vig.Rda
+Documentation: 
+
+Files: inst/extdata/events.Rda
+Documentation: 
+
+ -- Andreas Tille <tille at debian.org>  Fri, 25 Aug 2017 21:54:02 +0200

Modified: trunk/packages/R/r-bioc-genomicfeatures/trunk/debian/README.test
===================================================================
--- trunk/packages/R/r-bioc-genomicfeatures/trunk/debian/README.test	2017-09-02 22:16:41 UTC (rev 23982)
+++ trunk/packages/R/r-bioc-genomicfeatures/trunk/debian/README.test	2017-09-03 13:48:21 UTC (rev 23983)
@@ -4,51 +4,10 @@
 This package can be tested by running the provided test:
 
 LC_ALL=C R --no-save <<EOT
-require("GenomicFeatures") || stop("unable to load GenomicFeatures package")
-GenomicFeatures:::.test()
+BiocGenerics:::testPackage("GenomicFeatures")
 EOT
 
 in order to confirm its integrity.
 
-As it is reported in bug #735548 to successfully run this test you need some
-BioConductor databases as preconditions.  Since these are not packaged for
-Debian the according tests are removed from the test suite of this package.
 
-If you want to install the as Debian packages you can use:
-
-   svn://anonscm.debian.org/debian-med/trunk/packages/R/r-bioc-txdb.hsapiens.ucsc.hg19.knowngene/trunk/
-
-A further database
-
-   http://bioconductor.org/packages/release/data/annotation/html/BSgenome.Hsapiens.UCSC.hg19.html
-
-will be needed as well but it is not yet packaged.
-
-Finally you would need to re-activate the according tests by moving the
-original files from inst/unitTests to the installation directory or you
-rebuild this package by deactivating the patch in the series file.
-
-Further important note why it might happen that some tests might fail
-[see for complete mail test the Debian Med mailing list archive
- http://lists.alioth.debian.org/pipermail/debian-med-packaging/2014-October/030474.html]:
-
-  Date: Wed, 22 Oct 2014 10:41:45 -0700
-  From: Marc Carlson <mcarlson at fhcrc.org>
-  Subject: Re: [devteam-bioc] Failed test in GenomicFeatures
-  
-  Hi Andreas,
-  
-  This is something that can happen whenever data sources at ensembl are
-  updated causing our test of the real ensembl data to become
-  temporarily invalid.  We have already updated out packages to reflect
-  the new data coming from ensembl.  You can see the build report here:
-  
-  http://www.bioconductor.org/checkResults/3.0/bioc-LATEST/
-  
-  And the latest released version of this software is also described
-  (and available) here:
-  
-  http://www.bioconductor.org/packages/3.0/bioc/html/GenomicFeatures.html
-
-
- -- Andreas Tille <tille at debian.org>  Thu, 24 Jul 2014 08:35:54 +0200
+Unfortunately the test ends up in errors (see run-test-script comment)
\ No newline at end of file

Modified: trunk/packages/R/r-bioc-genomicfeatures/trunk/debian/changelog
===================================================================
--- trunk/packages/R/r-bioc-genomicfeatures/trunk/debian/changelog	2017-09-02 22:16:41 UTC (rev 23982)
+++ trunk/packages/R/r-bioc-genomicfeatures/trunk/debian/changelog	2017-09-03 13:48:21 UTC (rev 23983)
@@ -1,3 +1,12 @@
+r-bioc-genomicfeatures (1.28.4+dfsg-1) unstable; urgency=medium
+
+  * New upstream version
+  * Standards-Version: 4.1.0 (no changes needed)
+  * Versioned Build-Depends: r-cran-rsqlite (>= 2.0)
+  * Remove external Rda data files
+
+ -- Andreas Tille <tille at debian.org>  Fri, 25 Aug 2017 21:54:02 +0200
+
 r-bioc-genomicfeatures (1.28.0-1) unstable; urgency=medium
 
   * Team upload

Modified: trunk/packages/R/r-bioc-genomicfeatures/trunk/debian/control
===================================================================
--- trunk/packages/R/r-bioc-genomicfeatures/trunk/debian/control	2017-09-02 22:16:41 UTC (rev 23982)
+++ trunk/packages/R/r-bioc-genomicfeatures/trunk/debian/control	2017-09-03 13:48:21 UTC (rev 23983)
@@ -2,16 +2,15 @@
 Maintainer: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
 Uploaders: Andreas Tille <tille at debian.org>
 Section: gnu-r
-Testsuite: autopkgtest
 Priority: optional
 Build-Depends: debhelper (>= 10),
                dh-r,
                r-base-dev,
                r-cran-dbi,
-               r-cran-rsqlite,
+               r-cran-rsqlite (>= 2.0),
                r-bioc-biomart (>= 2.24.0),
                r-bioc-rtracklayer (>= 1.30.0)
-Standards-Version: 3.9.8
+Standards-Version: 4.1.0
 Vcs-Browser: https://anonscm.debian.org/viewvc/debian-med/trunk/packages/R/r-bioc-genomicfeatures/trunk/
 Vcs-Svn: svn://anonscm.debian.org/debian-med/trunk/packages/R/r-bioc-genomicfeatures/trunk/
 Homepage: https://bioconductor.org/packages/GenomicFeatures/

Modified: trunk/packages/R/r-bioc-genomicfeatures/trunk/debian/copyright
===================================================================
--- trunk/packages/R/r-bioc-genomicfeatures/trunk/debian/copyright	2017-09-02 22:16:41 UTC (rev 23982)
+++ trunk/packages/R/r-bioc-genomicfeatures/trunk/debian/copyright	2017-09-03 13:48:21 UTC (rev 23983)
@@ -2,6 +2,8 @@
 Upstream-Name: GenomicFeatures
 Upstream-Contact: Bioconductor Package Maintainer <maintainer at bioconductor.org> 
 Source: https://bioconductor.org/packages/GenomicFeatures/
+Files-Excluded: *.rda
+                *.Rda
 
 Files: *
 Copyright: © 2006-2016 M. Carlson, H. Pages, P. Aboyoun, S. Falcon, M. Morgan, D. Sarkar, M. Lawrence

Deleted: trunk/packages/R/r-bioc-genomicfeatures/trunk/debian/docs
===================================================================
--- trunk/packages/R/r-bioc-genomicfeatures/trunk/debian/docs	2017-09-02 22:16:41 UTC (rev 23982)
+++ trunk/packages/R/r-bioc-genomicfeatures/trunk/debian/docs	2017-09-03 13:48:21 UTC (rev 23983)
@@ -1 +0,0 @@
-debian/README.test

Modified: trunk/packages/R/r-bioc-genomicfeatures/trunk/debian/patches/drop_tests_requiring_large_data_sets.patch
===================================================================
--- trunk/packages/R/r-bioc-genomicfeatures/trunk/debian/patches/drop_tests_requiring_large_data_sets.patch	2017-09-02 22:16:41 UTC (rev 23982)
+++ trunk/packages/R/r-bioc-genomicfeatures/trunk/debian/patches/drop_tests_requiring_large_data_sets.patch	2017-09-03 13:48:21 UTC (rev 23983)
@@ -1,5 +1,5 @@
 Author: Andreas Tille <tille at debian.org>
-Last-Update: Thu, 24 Jul 2014 08:35:54 +0200
+Last-Update: Fri, 25 Aug 2017 21:54:02 +0200
 Bug-Debian: http://bugs.debian.org/735548
 Description: Make test independent from TxDb.Hsapiens.UCSC.hg19.knownGene
  (see debian/README.test)
@@ -123,3 +123,844 @@
 -    checkTrue(all(is.na(mcols(promoter.seqs)$geneID)))
 -}
 -
+Author: Andreas Tille <tille at debian.org>
+Last-Update: Thu, 24 Jul 2014 08:35:54 +0200
+Bug-Debian: http://bugs.debian.org/735548
+Description: Make test independent from TxDb.Hsapiens.UCSC.hg19.knownGene
+ (see debian/README.test)
+
+--- a/inst/unitTests/test_coordinate-mapping-methods.R
++++ /dev/null
+@@ -1,400 +0,0 @@
+-library(TxDb.Dmelanogaster.UCSC.dm3.ensGene)
+-txdb <- TxDb.Dmelanogaster.UCSC.dm3.ensGene
+-cdsbytx <- cdsBy(txdb, "tx", use.names=TRUE)[1:3]
+-quiet <- suppressWarnings
+-
+-### ----------------------------------------------------------------------
+-### mapFromTranscripts(), pmapFromTranscripts()
+-
+-test_mapFromTranscripts <- function()
+-{
+-    ## empty
+-    ans1 <- mapFromTranscripts(GRanges(), GRanges())
+-    ans2 <- mapFromTranscripts(GRanges(), GRangesList())
+-    checkIdentical(ans1, ans2)
+-    checkIdentical(names(mcols(ans1)), c("xHits", "transcriptsHits"))
+-
+-    ## 'transcripts' must have names
+-    x <- GRanges("tx1", IRanges(1, 5), strand="+")
+-    gr <- GRanges("chr1", IRanges(c(1, 20), width=10), strand="+")
+-    checkException(mapFromTranscripts(x, gr), silent=TRUE) 
+-    checkException(mapFromTranscripts(x, GRangesList(gr, gr)), silent=TRUE) 
+-}
+-
+-test_mapFromTranscripts_strand <- function()
+-{
+-    x <- GRanges("tx1", IRanges(1, 5), strand="+")
+-    gr <- GRanges("chr1", IRanges(c(1, 20), width=10), strand="+")
+-    names(gr) <- c("tx1", "tx1")
+-    align = GRangesList(gr, gr, gr)
+-    names(align) <- c("tx1", "bar", "tx1") 
+-
+-    ## "+' strand 
+-    ans <- mapFromTranscripts(x, align)  ## GRangesList
+-    checkTrue(all(width(ans) == 5L))
+-    checkIdentical(mcols(ans)$transcriptsHits, c(1L, 3L))
+-    checkIdentical(ranges(ans), IRanges(c(1, 1), c(5, 5)))
+-    checkIdentical(unique(as.character(seqnames(ans))), "chr1")
+-    ignore <- mapFromTranscripts(x, align, TRUE)
+-    checkIdentical(ranges(ans), ranges(ignore))
+-    checkTrue(unique(as.character(strand(ignore))) == "*")
+-    ans <- mapFromTranscripts(x, gr)  ## GRanges
+-    checkTrue(all(width(ans) == 5L))
+-    checkIdentical(mcols(ans)$transcriptsHits, c(1L, 2L))
+-    checkIdentical(ranges(ans), IRanges(c(1, 20), c(5, 24)))
+-    checkIdentical(unique(as.character(seqnames(ans))), "chr1")
+-    ignore <- mapFromTranscripts(x, gr, TRUE)
+-    checkIdentical(ranges(ans), ranges(ignore))
+-    checkTrue(unique(as.character(strand(ignore))) == "*")
+-
+-
+-    ## '-' strand
+-    xx <- GRanges("tx1", IRanges(12, 14), strand="-")
+-    gg <- GRanges("chr1", IRanges(c(1, 20), width=10), strand="-")
+-    aa = GRangesList(gg)
+-    names(aa) <- "tx1" 
+-    ans <- mapFromTranscripts(xx, aa)
+-    checkIdentical(ranges(ans), IRanges(7, 9))
+-
+-    ## invalid mixed strand 
+-    strand(align[[1]][1]) <- "-"
+-    checkException(mapFromTranscripts(x, align, FALSE), silent=TRUE) 
+-
+-    ## valid mixed strand:
+-    strand(align[[1]]) <- "-"
+-    ans <- mapFromTranscripts(x, align) ## GRangesList
+-    checkTrue(all(width(ans) == 5L))
+-    checkIdentical(mcols(ans)$transcriptsHits, 3L)
+-    checkIdentical(ranges(ans), IRanges(1, 5))
+-    checkIdentical(unique(as.character(seqnames(ans))), "chr1")
+-    ignore <- mapFromTranscripts(x, align, TRUE)
+-    checkIdentical(mcols(ignore)$transcriptsHits, c(1L, 3L))
+-    checkTrue(unique(as.character(strand(ignore))) == "*")
+-    strand(x) <- "-"
+-    ans <- mapFromTranscripts(x, align)
+-    checkIdentical(ranges(ans), IRanges(25, end=29))
+-    strand(gr[2]) <- "-"
+-    strand(x) <- "+"
+-    ans <- mapFromTranscripts(x, gr)  ## GRanges
+-    checkTrue(all(width(ans) == 5L))
+-    checkIdentical(mcols(ans)$transcriptsHits, 1L)
+-    checkIdentical(ranges(ans), IRanges(1, 5))
+-    checkIdentical(unique(as.character(seqnames(ans))), "chr1")
+-    ignore <- mapFromTranscripts(x, gr, TRUE)
+-    checkIdentical(ranges(ignore), IRanges(c(1, 20), c(5, 24)))
+-    checkTrue(unique(as.character(strand(ignore))) == "*")
+-    strand(x) <- "-"
+-    ans <- mapFromTranscripts(x, align)
+-    checkIdentical(ranges(ans), IRanges(25, end=29))
+-}
+-
+-test_mapFromTranscripts_order_in_GRangesList <- function()
+-{
+-    x <- GRanges("tx1", IRanges(1, 5), strand="+")
+-    gr1 <- GRanges("chr1", IRanges(c(1, 20), end=c(10, 30)), strand="+")
+-    gr2 <- GRanges("chr1", IRanges(c(20, 1), end=c(30, 10)), strand="+")
+-    align <- GRangesList(gr1, gr2); names(align) <- c("tx1", "tx1")
+-
+-    ans <- mapFromTranscripts(x, align) 
+-    checkIdentical(ranges(ans), IRanges(c(1, 1), c(5, 5)))
+-    checkIdentical(mcols(ans)$xHits, c(1L, 1L))
+-    checkIdentical(mcols(ans)$transcriptsHits, c(1L, 2L))
+-
+-    strand(x) <- strand(align) <- "-"
+-    ans <- mapFromTranscripts(x, align) 
+-    checkIdentical(ranges(ans), IRanges(c(26, 26), c(30, 30)))
+-    checkIdentical(mcols(ans)$xHits, c(1L, 1L))
+-    checkIdentical(mcols(ans)$transcriptsHits, c(1L, 2L))
+-}
+-
+-test_pmapFromTranscripts <- function()
+-{
+-    ## empty
+-    ans1 <- pmapFromTranscripts(IRanges(), GRanges())
+-    ans2 <- pmapFromTranscripts(IRanges(), GRangesList())
+-    ans3 <- pmapFromTranscripts(GRanges(), GRanges())
+-    ans4 <- pmapFromTranscripts(GRanges(), GRangesList())
+-    checkTrue(length(ans1) == length(ans2))
+-    checkTrue(length(ans3) == length(ans4))
+-    checkTrue(length(ans1) == 0L)
+-    checkTrue(is(ans1, "GRanges"))
+-    checkTrue(is(ans2, "GRangesList"))
+-    checkTrue(is(ans3, "GRanges"))
+-    checkTrue(is(ans4, "GRangesList"))
+-}
+-
+-test_pmapFromTranscripts_recycling <- function()
+-{
+-    x <- GRanges("tx1", IRanges(c(1, 1, 1), width=5), strand="+")
+-    gr <- GRanges("chr1", IRanges(c(10, 10, 10), width=10), strand="+")
+-
+-    checkException(pmapFromTranscripts(x[1:2], gr), silent=TRUE)
+-    checkException(pmapFromTranscripts(x, gr[1:2]), silent=TRUE)
+-
+-    ## 'transcripts' as GRanges
+-    ans1 <- pmapFromTranscripts(x[1], gr)
+-    ans2 <- pmapFromTranscripts(x, gr[1])
+-    checkIdentical(ans1, ans2)
+-    ans1 <- pmapFromTranscripts(ranges(x[1]), gr)
+-    ans2 <- pmapFromTranscripts(ranges(x), gr[1])
+-    checkIdentical(ans1, ans2)
+-    checkIdentical(names(mcols(ans1)), character(0))
+-
+-    ## 'transcripts' as GRangesList
+-    grl <- split(gr, seq_along(gr))
+-    ans1 <- pmapFromTranscripts(x[1], grl)
+-    ans2 <- pmapFromTranscripts(x, grl[1])
+-    checkIdentical(unname(ans1), unname(ans2))
+-    ans1 <- pmapFromTranscripts(ranges(x[1]), grl)
+-    ans2 <- pmapFromTranscripts(ranges(x), grl[1])
+-    checkIdentical(unname(ans1), unname(ans2))
+-}
+-
+-test_pmapFromTranscripts_strand <- function()
+-{
+-    x <- GRanges("chr1", IRanges(1, 5))
+-    align <- GRangesList(
+-        GRanges("chr1", IRanges(c(201, 101), c(220, 120)), strand="-"),
+-        GRanges("chr1", IRanges(501, 535), strand="+"))
+-
+-    ans <- pmapFromTranscripts(ranges(x), align)
+-    checkIdentical(width(ans), IntegerList(c(5, 0), 5))
+-    checkIdentical(start(ans), IntegerList(c(216, 101), 501))
+-
+-    ## 'x' is "*"
+-    ans <- pmapFromTranscripts(x, align)
+-    checkIdentical(width(ans), IntegerList(c(5, 0), 5))
+-    checkIdentical(start(ans), IntegerList(c(216, 101), 501))
+-
+-    ## 'x' is "+"
+-    strand(x) <- "+"
+-    ans <- pmapFromTranscripts(x, align)
+-    checkIdentical(width(ans), IntegerList(c(0, 0), 5))
+-    checkIdentical(start(ans), IntegerList(c(201, 101), 501))
+-
+-    ## 'x' is "-"
+-    strand(x) <- "-"
+-    ans <- pmapFromTranscripts(x, align)
+-    checkIdentical(width(ans), IntegerList(c(5, 0), 0))
+-    checkIdentical(start(ans), IntegerList(c(216, 101), 501))
+-
+-    ## ignore.strand
+-    ans <- pmapFromTranscripts(x, align, TRUE)
+-    checkIdentical(width(ans), IntegerList(c(0, 5), 5))
+-    checkIdentical(start(ans), IntegerList(c(201, 101), 501))
+-    checkIdentical(as.character(runValue(strand(ans))), c("*", "*")) 
+-
+-    ## order of ranges in return GRangesList 
+-    strand(align) <- strand(x) <- "+"
+-    ans <- pmapFromTranscripts(x, align)
+-
+-    ## invalid mixed strand
+-    x <- GRanges("chr1", IRanges(1, 5), strand="+")
+-    align <- GRangesList(
+-        GRanges("chr1", IRanges(c(1, 1), width=5), strand=c("+", "-")))
+-    checkException(pmapFromTranscripts(x, align), silent=TRUE)
+-    checkException(pmapFromTranscripts(ranges(x), align), silent=TRUE)
+-}
+-
+-test_pmapFromTranscripts_UNMAPPED <- function()
+-{
+-    ## 'transcripts' is GRanges
+-    x <- GRanges("chr1", IRanges(40, 50))
+-    align <- GRanges("chr1", IRanges(35, width=5))
+-    ans <- pmapFromTranscripts(x, align, TRUE) 
+-    checkIdentical(as.character(seqnames(ans)), "UNMAPPED")
+-    checkTrue(width(ans) == 0L)
+-}
+-
+-### ----------------------------------------------------------------------
+-### mapToTranscripts(), pmapToTranscripts()
+-
+-test_mapToTranscripts <- function()
+-{
+-    ## empty
+-    ans1 <- mapToTranscripts(GRanges(), GRanges())
+-    ans2 <- mapToTranscripts(GRanges(), GRangesList())
+-    checkTrue(length(ans1) == 0L)
+-    checkTrue(length(ans2) == 0L)
+-    checkIdentical(names(mcols(ans1)), c("xHits", "transcriptsHits"))
+-    checkIdentical(names(mcols(ans2)), c("xHits", "transcriptsHits"))
+-
+-    ## strand
+-    x <- GRanges("chr2L", IRanges(c(7500, 8400, 9000), 
+-                 width=200, names=LETTERS[1:3]), strand="+")
+-    align <- cdsbytx
+-
+-    ans <- mapToTranscripts(x, cdsbytx, ignore.strand=FALSE)
+-    checkTrue(length(ans) == 3L)
+-    checkIdentical(names(ans), c("B", "B", "C"))
+-    checkTrue(all(width(ans) == 200L))
+-    checkIdentical(mcols(ans)$xHits, c(2L, 2L, 3L))
+-    checkIdentical(mcols(ans)$transcriptsHits, c(1L, 3L, 2L))
+-
+-    strand(align[[2]][1]) <- "-"
+-    checkException(mapToTranscripts(x, align, FALSE, FALSE), silent=TRUE) 
+-
+-    strand(align[[2]]) <- "-"
+-    ans <- mapToTranscripts(x, align, ignore.strand=FALSE) 
+-    checkIdentical(mcols(ans)$xHits, c(2L, 2L))
+-    checkIdentical(mcols(ans)$transcriptsHits, c(1L, 3L))
+-    checkIdentical(names(ans), c("B", "B"))
+-    checkIdentical(seqlevels(ans), c("FBtr0300689", "FBtr0330654"))
+-
+-    x <- GRanges("chr3", IRanges(9, 9), strand="+")
+-    transcripts <- GRangesList(tx1=GRanges("chr3", IRanges(3, 10), strand="-"))
+-    ans <- mapToTranscripts(x, transcripts)
+-    checkTrue(length(ans) == 0L)
+-    ans <- mapToTranscripts(x, transcripts, TRUE)
+-    checkTrue(start(ans) == 7L)
+-    checkTrue(as.character(strand(ans)) == "*")
+-
+-    x <- GRanges("1", IRanges(248, width=1))
+-    transcripts <- GRangesList(
+-        foo = (GRanges("1", IRanges(c(101,201), width=50), strand="-")))
+-    ans <- mapToTranscripts(x, transcripts, TRUE)
+-    checkIdentical(ranges(ans), IRanges(98, 98))
+-    checkTrue(as.character(strand(ans)) == "*")
+-    ans <- mapToTranscripts(x, transcripts, FALSE)
+-    checkIdentical(ranges(ans), IRanges(3, 3))
+-    checkTrue(as.character(strand(ans)) == "-")
+-
+-    ## TxDb
+-    x <- GRanges("chr2L", IRanges(c(7500, 8400, 9000), 
+-                 width=200, names=LETTERS[1:3]))
+-    checkException(mapToTranscripts(x, txdb, extractor.fun="foo"), silent=TRUE)
+-    ans <- mapToTranscripts(x, txdb, extractor.fun=exonsBy, by="tx")
+-    checkIdentical(names(ans), c("B", "B", rep("C", 3)))
+-    checkIdentical(as.character(seqnames(ans)), as.character(c(1, 3, 1, 2, 3))) 
+-    ans <- mapToTranscripts(x, txdb, extractor.fun=exonsBy, by="gene")
+-    checkIdentical(mcols(ans)$transcriptsHits, rep(4179L, 5))
+-    checkIdentical(seqlevels(ans), "FBgn0031208")
+-}
+-
+-test_mapToTranscripts_range_order <- function()
+-{
+-    x <- GRanges("chrA", IRanges(43522349, width=1), strand="+")
+-    align1 <- GRangesList(GRanges("chrA", 
+-        IRanges(c(43522244, 43528406),
+-                c(43524145, 43528644)), strand="+"))
+-    align2 <- GRangesList(GRanges("chrA", 
+-        IRanges(c(43528406, 43522244),
+-                c(43528644, 43524145)), strand="+"))
+-    names(align1) <- names(align2) <- LETTERS[seq_along(align1)]
+-
+-    ## "+" strand
+-    ## smallest range first 
+-    ans <- mapToTranscripts(x, align1, FALSE)
+-    checkTrue(start(ans) == 106L)
+-    ## largest range first 
+-    ans <- mapToTranscripts(x, align2, FALSE)
+-    checkTrue(start(ans) == 106L)
+-
+-    ## "-" strand
+-    strand(x) <- "-"
+-    strand(align1) <- "-"
+-    strand(align2) <- "-"
+-    ## smallest range first
+-    ans <- mapToTranscripts(x, align1, FALSE)
+-    checkTrue(start(ans) == 2036L)
+-    ## largest range first
+-    ans <- mapToTranscripts(x, align2, FALSE)
+-    checkTrue(start(ans) == 2036L)
+-}
+-
+-test_pmapToTranscripts <- function()
+-{
+-    ## empty
+-    ans1 <- pmapToTranscripts(GRanges(), GRanges())
+-    ans2 <- pmapToTranscripts(GRanges(), GRangesList())
+-    checkTrue(length(ans1) == 0L)
+-    checkTrue(length(ans2) == 0L)
+-    checkIdentical(names(mcols(ans1)), character(0))
+-    checkIdentical(names(mcols(ans2)), character(0))
+-
+-    ## methods  GR,GR  GR,GRL  
+-    ## recycling 
+-    x <- GRanges("chr1", IRanges(1, width=1))
+-    y <- GRanges("chr1", IRanges(1:5, width=1))
+-    ans <- pmapToTranscripts(x, GRangesList("tx1"=y, "tx2"=y))
+-    checkIdentical(as.character(seqnames(ans)), c("tx1", "tx2"))
+-    ans <- pmapToTranscripts(c(x, x), GRangesList("tx1"=y))
+-    checkIdentical(as.character(seqnames(ans)), c("tx1", "tx1"))
+-
+-    ## strand
+-    x <- GRanges("chr1", IRanges(c(6, 16, 1), width=1, names=LETTERS[1:3]))
+-    align <- GRangesList(GRanges("chr1", IRanges(5, 10)),
+-                         GRanges("chr1", IRanges(c(5, 15), width=6)),
+-                         GRanges("chr1", IRanges(5, 10)))
+-    names(align) <- letters[seq_along(align)]
+-
+-    strand(x) <- "-"
+-    strand(align) <- "+"
+-    ans <- pmapToTranscripts(x, align, FALSE)
+-    checkTrue(length(x) == length(x))
+-    checkTrue(all(width(ans) == 0L))
+-    checkIdentical(names(ans), LETTERS[seq_along(align)])
+-
+-    strand(align[[2]][1]) <- "-"
+-    checkException(pmapToTranscripts(x, align, FALSE), silent=TRUE) 
+-
+-    strand(align) <- "+"
+-    strand(x) <- "+"
+-    ans <- pmapToTranscripts(x, align, FALSE) 
+-    checkIdentical(width(ans), c(1L, 1L, 0L))
+-    checkIdentical(start(ans), c(2L, 8L, 0L))
+-
+-    strand(align) <- "-"
+-    strand(x) <- "-"
+-    ans <- pmapToTranscripts(x, align, FALSE) 
+-    checkIdentical(width(ans), c(1L, 1L, 0L))
+-    checkIdentical(start(ans), c(5L, 5L, 0L))
+-    checkIdentical(names(ans), names(x))
+-    checkIdentical(seqlevels(ans), c("a", "b", "UNMAPPED"))
+-    checkIdentical(as.character(strand(ans)), c("-", "-", "*"))
+-
+-    ## out of bounds
+-    x <- GRanges("chr1", IRanges(rep(40, 4), width=11))
+-    align <- GRanges("chr1", IRanges(c(1, 35, 45, 55), width=11))
+-    ans <- pmapToTranscripts(x, align) 
+-    checkIdentical(seqnames(ans), Rle(as.factor("UNMAPPED"), 4)) 
+-}
+-
+-test_mapToTranscripts_intronJunctions <- function()
+-{
+-    ## 2 out of bounds, intron, true hit
+-    x <- GRanges("chr1", IRanges(start=c(1, 6, 8, 15), width=1))
+-    align <- GRangesList(
+-        "A"=GRanges("chr1", IRanges(start=c(5, 10), end=c(6, 12))))
+-    ans <- mapToTranscripts(x, align, intronJunctions=TRUE)
+-    checkTrue(length(ans) == 2)
+-    checkEquals(mcols(ans)$xHits, c(2, 3))
+-    checkEquals(width(ans), c(1, 0))
+-    checkEquals(start(ans), c(2, 3))
+-    checkEquals(mcols(ans)$intronic, c(FALSE, TRUE))
+-
+-    ans <- mapToTranscripts(rev(x), align, intronJunctions=TRUE)
+-    checkEquals(width(ans), c(0, 1))
+-    checkEquals(mcols(ans)$intronic, c(TRUE, FALSE))
+-
+-    ## span intron and exon
+-    x <- GRanges("chr1", IRanges(start=6, end=7))
+-    ans <- mapToTranscripts(x, align, intronJunctions=TRUE)
+-    checkTrue(length(ans) == 0)
+-
+-    ## no non-hits
+-    x <- GRanges("chr1", IRanges(start=5, end=6))
+-    ans <- mapToTranscripts(x, align, intronJunctions=TRUE)
+-    checkTrue(ranges(ans) == IRanges(1, 2))
+-    checkEquals(mcols(ans)$intronic, logical(1))
+-
+-    ## negative strand
+-    x <- GRanges("chr1", IRanges(start=c(1, 6, 8, 15), width=1))
+-    align <- GRangesList(
+-        "A"=GRanges("chr1", IRanges(start=c(5, 10), end=c(6, 12))))
+-    strand(x) <- strand(align) <- "-"
+-    ans <- mapToTranscripts(x, align, intronJunctions=TRUE)
+-    checkTrue(length(ans) == 2)
+-    checkEquals(width(ans), c(1, 0))
+-    checkEquals(start(ans), c(4, 4))
+-}
+--- a/inst/unitTests/test_TxDb_seqinfo.R
++++ /dev/null
+@@ -1,114 +0,0 @@
+-library(TxDb.Hsapiens.UCSC.hg19.knownGene);
+-txdb=TxDb.Hsapiens.UCSC.hg19.knownGene
+-
+-test_rename_seqlevels <- function(){
+-    seqlevels(txdb) <- as.character(1:length(seqlevels(txdb)))
+-    checkIdentical(as.character(1:length(seqlevels(txdb))),
+-                   seqlevels(txdb))
+-}
+-
+-test_restrict_seqlevels <- function(){
+-    ## This should work
+-    txdb <- restoreSeqlevels(txdb)    
+-    seqlevels(txdb, pruning.mode="coarse") <- c(chr5 = "5")
+-    checkTrue(length(seqinfo(txdb))==1)
+-    
+-    ## This should work
+-    txdb <- restoreSeqlevels(txdb)
+-    seqlevels(txdb, pruning.mode="coarse") <- c(chr5 = "5", chr6="6", chr4="4")
+-    checkTrue(length(seqinfo(txdb))==3)
+-    checkIdentical(c('5','6','4'), seqlevels(txdb))
+-    checkTrue(seqlengths(txdb)[2] == min(seqlengths(txdb)))
+-    checkTrue(seqlengths(txdb)[3] == max(seqlengths(txdb)))
+-    
+-    ## And this should NOT work
+-    txdb <- restoreSeqlevels(txdb)
+-    checkException(seqlevels(txdb, pruning.mode="coarse") <- c(foo = "2"))
+-}
+-
+-
+-test_noChange_circ <- function(){
+-    txdb <- restoreSeqlevels(txdb)
+-    foo = seqinfo(txdb)
+-    foo at is_circular = rep(TRUE, 93)
+-    ## This should throw an exception
+-    checkException(seqinfo(txdb, new2old=1:93) <- foo)    
+-}
+-
+-
+-test_noChange_genome <- function(){
+-    txdb <- restoreSeqlevels(txdb)
+-    foo = seqinfo(txdb)
+-    foo at genome = rep("hg18", 93)
+-    ## This should throw an exception
+-    checkException(seqinfo(txdb, new2old=1:93) <- foo)
+-}
+-
+-
+-test_noChange_lengths <- function(){
+-    txdb <- restoreSeqlevels(txdb)
+-    foo = seqinfo(txdb)
+-    foo at seqlengths = rep(1000L, 93)
+-    ## This should throw an exception
+-    checkException(seqinfo(txdb, new2old=1:93) <- foo)
+-}
+-
+-
+-test_transcripts_accessor <- function(){
+-    txdb <- restoreSeqlevels(txdb)
+-    txs1 <- transcripts(txdb)
+-    seqlevels(txs1, pruning.mode="coarse") <- c(chr5 = "5")
+-    ## Then change seqlevels for txdb
+-    seqlevels(txdb, pruning.mode="coarse") <- c(chr5 = "5")
+-    txs2 <- transcripts(txdb)
+-    checkIdentical(txs1, txs2)
+-}
+-
+-test_exons_accessor <- function(){
+-    txdb <- restoreSeqlevels(txdb)
+-    exs1 <- exons(txdb)
+-    seqlevels(exs1, pruning.mode="coarse") <- c(chr5 = "5")
+-    ## Then change seqlevels for txdb
+-    seqlevels(txdb, pruning.mode="coarse") <- c(chr5 = "5")
+-    exs2 <- exons(txdb)
+-    checkIdentical(exs1, exs2)
+-}
+-
+-test_cds_accessor <- function(){
+-    txdb <- restoreSeqlevels(txdb)
+-    cds1 <- cds(txdb)
+-    seqlevels(cds1, pruning.mode="coarse") <- c(chr5 = "5")
+-    ## Then change seqlevels for txdb
+-    seqlevels(txdb, pruning.mode="coarse") <- c(chr5 = "5")
+-    cds2 <- cds(txdb)
+-    checkIdentical(cds1, cds2)
+-}
+-
+-test_promoters_accessor <- function(){
+-    txdb <- restoreSeqlevels(txdb)
+-    prm1 <- promoters(txdb)
+-    seqlevels(prm1, pruning.mode="coarse") <- c(chr5 = "5")
+-    ## Then change seqlevels for txdb
+-    seqlevels(txdb, pruning.mode="coarse") <- c(chr5 = "5")
+-    prm2 <- promoters(txdb)
+-    checkIdentical(prm1, prm2)
+-}
+-
+-
+-test_transcriptsBy_accessors <- function(){
+-    ## This one is a "fun" one.
+-    ## There are issues because some genes are annotated as being on
+-    ## TWO different chromosomes.  Such genes are filtered for txs3,
+-    ## but NOT for txs4...   Hmmmm.
+-    txdb <- restoreSeqlevels(txdb)
+-    txs3 <- transcriptsBy(txdb, by="gene")
+-    seqlevels(txs3, pruning.mode="coarse") <- c(chr5 = "5")
+-    ## Then change seqlevels for txdb
+-    seqlevels(txdb, pruning.mode="coarse") <- c(chr5 = "5")
+-    txs4 <- transcriptsBy(txdb, by="gene")
+-##    checkIdentical(txs3, txs4)  ## TROUBLE!!
+-    
+-}
+-
+-
+-## What to do about this?  The reason for the difference is because of order of operations.  txs3 gets all the ranges and then removes any that are not kosher (this is correct), txs4 OTOH gets only ranges from chr5 (efficient!), but then fails to filter out things that have hybrid seqnames (as they were pre-filtered).  I think I have to make the query less efficient to fix this, but I want to discuss it with Herve 1st to get a 2nd opinion.
+--- a/inst/unitTests/test_select-methods.R
++++ /dev/null
+@@ -1,312 +0,0 @@
+-## 1st we need to write tests for all the helper functions then we need more
+-## tests for select (generally)
+-## Why test the lower level helpers?  Because that way I will get a failure
+-## point right at the location where the trouble occurs (high resolution for
+-## trouble detection)._
+-require("TxDb.Hsapiens.UCSC.hg19.knownGene")
+-txdb <- TxDb.Hsapiens.UCSC.hg19.knownGene
+-require("RUnit")
+-  
+-test_getTableColMapping <- function(){
+-  res <- GenomicFeatures:::.getTableColMapping(txdb)
+-  exp <- list(cds=c("_cds_id","cds_name","cds_chrom","cds_strand","cds_start",
+-                "cds_end"),
+-              exon=c("_exon_id","exon_name","exon_chrom","exon_strand",
+-                "exon_start","exon_end"),
+-              gene=c("gene_id","_tx_id"),
+-              splicing=c("_tx_id","exon_rank","_exon_id","_cds_id"),
+-              transcript=c("_tx_id","tx_name","tx_type","tx_chrom","tx_strand",
+-                "tx_start","tx_end"))
+-  checkIdentical(res, exp)
+-}
+-
+-test_makeColAbbreviations <- function(){
+-  res <- GenomicFeatures:::.makeColAbbreviations(txdb)
+-  checkTrue(res[["_cds_id"]]=="CDSID")
+-  res2 <- GenomicFeatures:::.getTableColMapping(txdb)
+-  checkTrue(length(res)==21, length(unique(unlist(res2))))
+-}
+-
+-test_reverseColAbbreviations <- function(){
+-  cnames <- GenomicFeatures:::.makeColAbbreviations(txdb)
+-  res <- GenomicFeatures:::.reverseColAbbreviations(txdb, cnames)
+-  checkTrue(names(cnames)[[1]]==res[[1]])
+-  checkTrue(length(res) == length(cnames))
+-}
+-
+-test_getTableNames <- function(){
+-  cnames <- GenomicFeatures:::.makeColAbbreviations(txdb)
+-  res <- GenomicFeatures:::.getTableNames(txdb, cnames)
+-  ## Let's check the ones that fail more easily
+-  checkTrue(length(res[["_tx_id"]])==3)
+-  checkTrue(length(res[["_exon_id"]])==2)
+-  checkTrue(length(res[["_cds_id"]])==2)
+-}
+-
+-test_getSimpleTableNames <- function(){
+-  cnames <- GenomicFeatures:::.makeColAbbreviations(txdb)
+-  res <- GenomicFeatures:::.getSimpleTableNames(txdb, cnames)
+-  exp <- c("cds","splicing","exon","gene","transcript")
+-  checkIdentical(res, exp)
+-}
+-
+-test_encodeSortedTableKey <- function(){
+-  sTNames <- c("s", "e", "t")
+-  res <- GenomicFeatures:::.encodeSortedTableKey(sTNames)
+-  checkIdentical(res,"tse")
+-}
+-
+-test_makeTableKey <- function(){
+-  cnames <- GenomicFeatures:::.makeColAbbreviations(txdb)
+-  res <- GenomicFeatures:::.makeTableKey(txdb, cnames)
+-  checkIdentical(res,"gtsec")
+-}
+-
+-test_missingTableInterpolator <- function(){
+-  tName <- "x"
+-  res <- GenomicFeatures:::.missingTableInterpolator(tName)
+-  checkIdentical(res,"x")
+-  tName <- "se"
+-  res <- GenomicFeatures:::.missingTableInterpolator(tName)
+-  checkIdentical(res,"tse")
+-}
+-
+-test_tableJoinSelector <- function(){
+-  tName <- "t"
+-  res <- GenomicFeatures:::.tableJoinSelector(tName)
+-  checkIdentical(res,"transcript")
+-  tName <- "gt"
+-  res <- GenomicFeatures:::.tableJoinSelector(tName)
+-  checkIdentical(res, "(SELECT * FROM transcript LEFT JOIN gene  ON (transcript._tx_id = gene._tx_id) )")
+-  tName <- "FOOBAZZLE"
+-  checkException(GenomicFeatures:::.tableJoinSelector(tName))
+-}
+-
+-test_makeSelectList <- function(){
+-  cnames <- GenomicFeatures:::.makeColAbbreviations(txdb)[c("_cds_id","_tx_id")]
+-  res <- GenomicFeatures:::.makeSelectList(txdb, cnames)
+-  exp <- "c._cds_id, g._tx_id" ## 2nd one will be a "g."
+-  checkIdentical(res, exp)
+-}
+-
+-test_makeAsList <- function(){
+-  cnames <- GenomicFeatures:::.makeColAbbreviations(txdb)[c("_cds_id","_tx_id")]
+-  res <- GenomicFeatures:::.makeAsList(txdb, cnames)
+-  exp <- "cds AS c, splicing AS s, gene AS g, transcript AS t"
+-  checkIdentical(res, exp)
+-}
+-
+-test_makeJoinSQL <- function(){
+-  cnames <- GenomicFeatures:::.makeColAbbreviations(txdb)[c("_cds_id","_tx_id")]
+-  res <- GenomicFeatures:::.makeJoinSQL(txdb, cnames)
+-  exp <- "(SELECT * FROM transcript LEFT JOIN gene  ON (transcript._tx_id = gene._tx_id) INNER JOIN splicing  ON (transcript._tx_id = splicing._tx_id)  LEFT JOIN cds ON (splicing._cds_id = cds._cds_id) )"
+-  checkIdentical(res, exp)
+-}
+-
+-test_makeKeyList <- function(){
+-  ks <- 1:6
+-  kt <- "TXID"
+-  res <- GenomicFeatures:::.makeKeyList(txdb, keys=ks, keytype=kt)
+-  exp <- "g._tx_id IN ( '1','2','3','4','5','6' )"
+-  checkIdentical(res, exp)
+-}
+-
+-
+-test_keys <- function(){
+-  checkException(keys(txdb, keytype="CDSCHROM"))
+-}
+-
+-test_keys_advancedArgs <- function(){
+-    k1 <- keys(txdb, keytype="TXNAME")
+-    checkTrue("uc001aaa.3" %in% k1)
+-    
+-    k2 <- keys(txdb, keytype="TXNAME", pattern=".2$")
+-    checkTrue("uc001aaq.2" %in% k2)
+-    checkTrue(!("uc001aaa.3" %in% k2))
+-    checkTrue(length(k2) < length(k1))
+-
+-    l1 <- length(keys(txdb, keytype="TXID", column="GENEID"))
+-    l2 <- length(keys(txdb, keytype="TXID"))
+-    checkTrue(l1 < l2)
+-    
+-    k3 <- head(keys(txdb, keytype="GENEID", pattern=".2$",
+-                    column="TXNAME", fuzzy=TRUE))
+-    res <- suppressWarnings( select(txdb, k3, columns=c("GENEID","TXNAME"),
+-                                   keytype="GENEID"))
+-    checkTrue(any(grepl(".2$",res$TXNAME)))
+-}
+-
+-
+-
+-test_select <- function(){
+-  keys = head(keys(txdb, "GENEID"))
+-  cols = c("GENEID")
+-  res <- select(txdb, keys, cols, keytype="GENEID")
+-  checkTrue(dim(res)[1]>0)
+-  checkTrue(dim(res)[2]==length(cols))
+-  checkIdentical(c("GENEID"), colnames(res))
+-  checkTrue(length(res$GENEID)==length(keys))
+-  checkIdentical(res$GENEID, keys)
+-
+-  keys = head(keys(txdb, "TXID"))
+-  cols = c("TXID")
+-  res <- select(txdb, keys, cols, keytype="TXID")
+-  checkTrue(dim(res)[1]>0)
+-  checkTrue(dim(res)[2]==length(cols))
+-  checkIdentical(c("TXID"), colnames(res))
+-  checkTrue(length(res$TXID)==length(keys))
+-  checkIdentical(res$TXID, keys)
+- 
+-  keys = head(keys(txdb, "GENEID"))
+-  cols = c("GENEID","TXID")
+-  res <- select(txdb, keys, cols, keytype="GENEID")
+-  checkTrue(dim(res)[1]>0)
+-  checkTrue(dim(res)[2]==length(cols))
+-  checkIdentical(c("GENEID","TXID"), colnames(res))
+-  checkTrue(length(unique(res$GENEID))==length(keys))
+-
+-  keys = head(keys(txdb, "GENEID"))
+-  cols = c("GENEID","TXID", "EXONRANK")
+-  res <- select(txdb, keys, cols, keytype="GENEID")
+-  checkTrue(dim(res)[1]>0)
+-  checkTrue(dim(res)[2]==length(cols))
+-  checkIdentical(c("GENEID","TXID","EXONRANK"), colnames(res))
+-  checkTrue(length(unique(res$GENEID))==length(keys))
+-
+-  keys = head(keys(txdb, "GENEID"))
+-  cols = c("GENEID","TXID", "EXONRANK","CDSID")
+-  res <- select(txdb, keys, cols, keytype="GENEID")
+-  checkTrue(dim(res)[1]>0)
+-  checkTrue(dim(res)[2]==length(cols))
+-  checkIdentical(c("GENEID","CDSID","TXID","EXONRANK"), colnames(res))
+-  checkTrue(length(unique(res$GENEID))==length(keys))
+-
+-  ## It's really cosmetic but: should the order of the final data.frame match
+-  ## the order of the cols?
+-  ## I think so, except that we may add a col for keys (even if not requested)
+-  ## if added, such a col should be in front.
+-  
+-  keys = head(keys(txdb, "GENEID"))
+-  cols = c("GENEID","TXID", "EXONRANK", "EXONID")
+-  res <- select(txdb, keys, cols, keytype="GENEID")
+-  checkTrue(dim(res)[1]>0)
+-  checkTrue(dim(res)[2]==length(cols))
+-  checkIdentical(c("GENEID","EXONID","TXID","EXONRANK"), colnames(res))
+-  checkTrue(length(unique(res$GENEID))==length(keys))
+-
+-  keys = head(keys(txdb, "GENEID"))
+-  cols = c("GENEID","TXID", "EXONRANK", "EXONID", "CDSID")
+-  res <- select(txdb, keys, cols, keytype="GENEID")
+-  checkTrue(dim(res)[1]>0)
+-  checkTrue(dim(res)[2]==length(cols))
+-  checkIdentical(c("GENEID","CDSID","EXONID","TXID","EXONRANK"), colnames(res))
+-  checkTrue(length(unique(res$GENEID))==length(keys))
+-  
+-  keys = head(keys(txdb, "TXID"))
+-  cols = c("TXID", "EXONRANK", "EXONID", "CDSID")
+-  res <- select(txdb, keys, cols, keytype="TXID")
+-  checkTrue(dim(res)[1]>0)
+-  checkTrue(dim(res)[2]==length(cols))
+-  checkIdentical(c("TXID","CDSID","EXONID","EXONRANK"), colnames(res))
+-  checkTrue(length(unique(res$TXID))==length(keys))
+-
+-  keys = head(keys(txdb, "EXONID"))
+-  cols = c("EXONRANK", "EXONID", "CDSID")
+-  res <- select(txdb, keys, cols, keytype="EXONID")
+-  checkTrue(dim(res)[1]>0)
+-  checkTrue(dim(res)[2]==length(cols))
+-  checkIdentical(c("EXONID","CDSID","EXONRANK"), colnames(res))
+-  checkTrue(length(unique(res$EXONID))==length(keys))
+-  
+-  keys = head(keys(txdb, "TXNAME"))
+-  cols = c("GENEID","TXNAME", "CDSID", "EXONSTART")
+-  res <- select(txdb, keys, cols, keytype="TXNAME")
+-  checkTrue(dim(res)[1]>0)
+-  checkTrue(dim(res)[2]==length(cols))
+-  checkIdentical(c("TXNAME","CDSID","EXONSTART","GENEID"), colnames(res))  
+-  checkTrue(length(unique(res$TXNAME))==length(keys))
+-
+-  
+-  keys = head(keys(txdb, "TXNAME"))
+-  cols = c("GENEID", "EXONSTART","TXNAME")
+-  res <- select(txdb, keys, cols, keytype="TXNAME")
+-  checkTrue(dim(res)[1]>0)
+-  checkTrue(dim(res)[2]==length(cols))
+-  checkIdentical(c("TXNAME","EXONSTART","GENEID"), colnames(res))
+-  checkTrue(length(unique(res$TXNAME))==length(keys))
+-    
+-  
+-  keys = head(keys(txdb, "TXNAME"))
+-  cols = c("GENEID", "CDSID","TXNAME")
+-  res <- select(txdb, keys, cols, keytype="TXNAME")
+-  checkTrue(dim(res)[1]>0)
+-  checkTrue(dim(res)[2]==length(cols))
+-  checkIdentical(c("TXNAME","CDSID","GENEID"), colnames(res))
+-  checkTrue(length(unique(res$TXNAME))==length(keys))
+-    
+-  
+-  keys = head(keys(txdb, "TXID"))
+-  cols = c("GENEID","TXNAME", "TXID")
+-  res <- select(txdb, keys, cols, keytype="TXID")
+-  checkTrue(dim(res)[1]>0)
+-  checkTrue(dim(res)[2]==length(cols))
+-  checkIdentical(c("TXID","GENEID","TXNAME"), colnames(res))
+-  checkTrue(length(unique(res$TXID))==length(keys))
+-  ## For this particular case, we want to make sure that the TXNAMES are not
+-  ## being copied (there should be one unique one for each ID in this range)
+-  checkTrue(length(unique(res$TXNAME)) == length(res$TXNAME))
+-  
+-  keys = head(keys(txdb, "CDSNAME"))
+-  cols = c("GENEID","TXNAME", "TXID", "CDSNAME")
+-  checkException(select(txdb, keys, cols, keytype="CDSNAME"), silent=TRUE)
+-  
+-  keys = head(keys(txdb, "CDSID"))
+-  cols = c("GENEID","TXNAME", "TXID", "CDSNAME")
+-  res <- select(txdb, keys, cols, keytype="CDSID")
+-  checkTrue(dim(res)[1]>0)
+-  checkTrue(dim(res)[2]==length(cols)+1) ## this is one where we ADD an extra!
+-  checkIdentical(c("CDSID","CDSNAME","GENEID","TXID","TXNAME"), colnames(res))
+-  checkTrue(length(unique(res$CDSID))==length(keys))
+-
+-  
+-  ## stress test (this used to take way too long)
+-  keys = head(keys(txdb, "GENEID"))
+-  cols = c("GENEID","CDSSTART")
+-  res <- select(txdb, keys, cols, keytype="GENEID")
+-  checkTrue(dim(res)[1]>0)
+-  checkTrue(dim(res)[2]==length(cols))
+-  checkIdentical(c("GENEID","CDSSTART"), colnames(res))
+-    
+-}
+-
+-test_select_isActiveSeq <- function(){
+-  
+-  ## set isActiveSeq to only watch chr1
+- txdb <- restoreSeqlevels(txdb)  ## This is to reset things (safety measure)
+- isActiveSeq(txdb)[seqlevels(txdb)] <- FALSE
+- isActiveSeq(txdb) <- c("chr1"=TRUE)  
+-  
+-  ## then use select
+-  keys <- head(keys(txdb, "GENEID"))
+-  cols <- c("GENEID","CDSSTART", "CDSCHROM")
+-  res <- select(txdb, keys, columns = cols, keytype="GENEID")
+-  checkTrue(dim(res)[1]>0)
+-  checkTrue(dim(res)[2]==length(cols))
+-  checkIdentical(c("GENEID","CDSCHROM","CDSSTART"), colnames(res))
+-  uniqChrs <- unique(res$CDSCHROM)[!is.na(unique(res$CDSCHROM))]
+-  checkIdentical(c("chr1"),uniqChrs)
+-
+-  ## keys must contain keys that match to more than one thing
+-  keys <- c(head(keys(txdb,keytype="TXNAME")),
+-            tail(keys(txdb,keytype="TXNAME")))
+-  cols <- c("TXNAME","TXCHROM","TXSTRAND")
+-  res <- select(txdb, keys, columns = cols, keytype="TXNAME")
+-  checkTrue(dim(res)[1]>0)
+-  checkTrue(dim(res)[2]==length(cols))
+-  checkIdentical(c("TXNAME","TXCHROM","TXSTRAND"), colnames(res))
+-  uniqChrs <- unique(res$TXCHROM)[!is.na(unique(res$TXCHROM))]
+-  checkIdentical(c("chr1"),uniqChrs)  
+-}
+-
+-
+-

Added: trunk/packages/R/r-bioc-genomicfeatures/trunk/debian/tests/control_
===================================================================
--- trunk/packages/R/r-bioc-genomicfeatures/trunk/debian/tests/control_	                        (rev 0)
+++ trunk/packages/R/r-bioc-genomicfeatures/trunk/debian/tests/control_	2017-09-03 13:48:21 UTC (rev 23983)
@@ -0,0 +1,3 @@
+Tests: run-unit-test
+Depends: @
+Restrictions: allow-stderr

Added: trunk/packages/R/r-bioc-genomicfeatures/trunk/debian/tests/run-unit-test
===================================================================
--- trunk/packages/R/r-bioc-genomicfeatures/trunk/debian/tests/run-unit-test	                        (rev 0)
+++ trunk/packages/R/r-bioc-genomicfeatures/trunk/debian/tests/run-unit-test	2017-09-03 13:48:21 UTC (rev 23983)
@@ -0,0 +1,8 @@
+#!/bin/sh -e
+
+# This test throws a lot of 
+#   Error in loadNamespace(name) : there is no package called 'pkgconfig'
+# messages.  I have no idea why since the string pkgconfig can not be found via grep
+# So leave out this test
+
+LC_ALL=C R --no-save -e 'BiocGenerics:::testPackage("GenomicFeatures")'

Added: trunk/packages/R/r-bioc-genomicfeatures/trunk/debian/tests/vignette
===================================================================
--- trunk/packages/R/r-bioc-genomicfeatures/trunk/debian/tests/vignette	                        (rev 0)
+++ trunk/packages/R/r-bioc-genomicfeatures/trunk/debian/tests/vignette	2017-09-03 13:48:21 UTC (rev 23983)
@@ -0,0 +1,7 @@
+#!/bin/sh -e
+
+for vignette in $(find vignettes -iname '*.rnw' -or -iname '*.rmd'); do
+    echo "BEGIN VIGNETTE $vignette"
+    LC_ALL=C R CMD Sweave $vignette
+done
+

Modified: trunk/packages/R/r-bioc-genomicfeatures/trunk/debian/watch
===================================================================
--- trunk/packages/R/r-bioc-genomicfeatures/trunk/debian/watch	2017-09-02 22:16:41 UTC (rev 23982)
+++ trunk/packages/R/r-bioc-genomicfeatures/trunk/debian/watch	2017-09-03 13:48:21 UTC (rev 23983)
@@ -1,3 +1,3 @@
 version=4
-opts=downloadurlmangle=s?^(.*)\.\.?http:$1packages/release/bioc? \
+opts="downloadurlmangle=s?^(.*)\.\.?http:$1packages/release/bioc?,repacksuffix=+dfsg,dversionmangle=s/\+dfsg//g,repack,compression=xz" \
  http://www.bioconductor.org/packages/release/bioc/html/GenomicFeatures.html .*/GenomicFeatures_([\d\.]+)\.tar\.gz




More information about the debian-med-commit mailing list