[med-svn] [r-bioc-genomeinfodb] 01/04: New upstream version 1.14.0
Andreas Tille
tille at debian.org
Wed Nov 8 09:34:53 UTC 2017
This is an automated email from the git hooks/post-receive script.
tille pushed a commit to branch master
in repository r-bioc-genomeinfodb.
commit 1f678aeea6818a98732b08fec5319f000ce26559
Author: Andreas Tille <tille at debian.org>
Date: Wed Nov 8 10:30:45 2017 +0100
New upstream version 1.14.0
---
DESCRIPTION | 4 +--
NEWS | 21 ++++++++++-
R/Seqinfo-class.R | 5 +--
R/available.species.R | 8 +++--
R/seqinfo.R | 26 +++-----------
inst/doc/Accept-organism-for-GenomeInfoDb.R | 6 ++--
inst/doc/Accept-organism-for-GenomeInfoDb.pdf | Bin 90582 -> 124933 bytes
inst/doc/GenomeInfoDb.R | 50 +++++++++++++-------------
inst/doc/GenomeInfoDb.pdf | Bin 131343 -> 167539 bytes
man/seqinfo.Rd | 9 ++---
10 files changed, 65 insertions(+), 64 deletions(-)
diff --git a/DESCRIPTION b/DESCRIPTION
index 760ad2e..fbea28b 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -6,7 +6,7 @@ Description: Contains data and functions that
sequence naming conventions (e.g., "chr1" versus "1"),
including a function that attempts to place sequence names in
their natural, rather than lexicographic, order.
-Version: 1.12.3
+Version: 1.14.0
Encoding: UTF-8
Author: Sonali Arora, Martin Morgan, Marc Carlson, H. Pagès
Maintainer: Bioconductor Package Maintainer <maintainer at bioconductor.org>
@@ -26,4 +26,4 @@ Collate: utils.R rankSeqlevels.R assembly-utils.R available.species.R
VignetteBuilder: knitr
Video: http://youtu.be/wdEjCYSXa7w
NeedsCompilation: no
-Packaged: 2017-10-05 00:04:42 UTC; biocbuild
+Packaged: 2017-10-30 23:51:42 UTC; biocbuild
diff --git a/NEWS b/NEWS
index 8f27da9..11b903c 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,24 @@
+CHANGES IN VERSION 1.14.0
+-------------------------
+
+NEW FEATURES
+
+SIGNIFICANT USER-VISIBLE CHANGES
+
+DEPRECATED AND DEFUNCT
+
+ o Remove 'force' argument from seqinfo() and seqlevels() setters (the
+ argument got deprecated in BioC 3.5 in favor of new and more flexible
+ 'pruning.mode' argument).
+
+BUG FIXES
+
+ o Add missing Y/chrY entry in seqlevel style db for Drosophila
+ melanogaster and Rattus norvegicus.
+
+
CHANGES IN VERSION 1.12.0
-------------------------------
+-------------------------
NEW FEATURES
diff --git a/R/Seqinfo-class.R b/R/Seqinfo-class.R
index f3d8d86..986cdcf 100644
--- a/R/Seqinfo-class.R
+++ b/R/Seqinfo-class.R
@@ -377,13 +377,10 @@ setReplaceMethod("names", "Seqinfo",
)
setReplaceMethod("seqlevels", "Seqinfo",
- function(x, force=FALSE,
+ function(x,
pruning.mode=c("error", "coarse", "fine", "tidy"),
value)
{
- if (!identical(force, FALSE))
- warning("'force' is ignored in \"seqlevels<-\" method ",
- "for Seqinfo objects")
pruning.mode <- match.arg(pruning.mode)
if (pruning.mode != "error")
warning("'pruning.mode' is ignored in \"seqlevels<-\" method ",
diff --git a/R/available.species.R b/R/available.species.R
index 9ff81f5..350e079 100644
--- a/R/available.species.R
+++ b/R/available.species.R
@@ -5,7 +5,7 @@
## In February 2017 the mapping files in GenomeInfoDb/data/ were moved to the
## GenomeInfoDbData annotation package.
-.lookupSpeciesFromTaxId <- function(id) {
+.lookupSpeciesFromTaxId <- function(id, all=FALSE) {
if (!exists("specData")) {
data(specData, package = "GenomeInfoDbData")
}
@@ -32,7 +32,11 @@
return(res[1,])
} else {
res <- res[!tooLong,]
- return(res[1,])
+ if (all) {
+ return(res)
+ } else {
+ return(res[1,])
+ }
}
}
}
diff --git a/R/seqinfo.R b/R/seqinfo.R
index 3568f23..7f3b524 100644
--- a/R/seqinfo.R
+++ b/R/seqinfo.R
@@ -24,26 +24,11 @@
### The dangling seqlevels in 'x' are those seqlevels that the user wants to
### drop but are in use.
-getDanglingSeqlevels <- function(x, new2old=NULL, force=FALSE,
+getDanglingSeqlevels <- function(x, new2old=NULL,
pruning.mode=c("error", "coarse", "fine", "tidy"),
new_seqlevels)
{
- if (!isTRUEorFALSE(force))
- stop("'force' must be TRUE or FALSE")
pruning.mode <- match.arg(pruning.mode)
- if (force) {
- msg <- wmsg("In BioC 3.5, the 'force' argument was replaced by ",
- "the more flexible 'pruning.mode' argument, and is ",
- "deprecated. ",
- "See ?seqinfo for the supported pruning modes. ",
- "Note that 'force=TRUE' is equivalent to ",
- "'pruning.mode=\"coarse\"'.")
- .Deprecated(msg=msg)
- if (pruning.mode != "error")
- stop(wmsg("only one of 'force' or 'pruning.mode' can be used ",
- "but not both"))
- pruning.mode <- "coarse"
- }
if (!is.character(new_seqlevels) || any(is.na(new_seqlevels)))
stop(wmsg("the supplied 'seqlevels' must be a character vector ",
"with no NAs"))
@@ -166,7 +151,7 @@ sequenceGeometryHasChanged <- function(new_seqinfo, old_seqinfo, new2old=NULL)
setGeneric("seqinfo", function(x) standardGeneric("seqinfo"))
setGeneric("seqinfo<-", signature="x",
- function(x, new2old=NULL, force=FALSE,
+ function(x, new2old=NULL,
pruning.mode=c("error", "coarse", "fine", "tidy"),
value)
standardGeneric("seqinfo<-")
@@ -195,7 +180,7 @@ setGeneric("seqlevels", function(x) standardGeneric("seqlevels"))
setMethod("seqlevels", "ANY", function(x) seqlevels(seqinfo(x)))
setGeneric("seqlevels<-", signature="x",
- function(x, force=FALSE,
+ function(x,
pruning.mode=c("error", "coarse", "fine", "tidy"),
value)
standardGeneric("seqlevels<-")
@@ -204,7 +189,7 @@ setGeneric("seqlevels<-", signature="x",
### Default "seqlevels<-" method works on any object 'x' with working
### "seqinfo" and "seqinfo<-" methods.
setReplaceMethod("seqlevels", "ANY",
- function(x, force=FALSE,
+ function(x,
pruning.mode=c("error", "coarse", "fine", "tidy"),
value)
{
@@ -221,8 +206,7 @@ setReplaceMethod("seqlevels", "ANY",
new2old <- match(value, seqlevels(x))
}
## Do the replacement.
- seqinfo(x, new2old=new2old, force=force, pruning.mode=pruning.mode) <-
- x_seqinfo
+ seqinfo(x, new2old=new2old, pruning.mode=pruning.mode) <- x_seqinfo
x
}
)
diff --git a/inst/doc/Accept-organism-for-GenomeInfoDb.R b/inst/doc/Accept-organism-for-GenomeInfoDb.R
index 1f802df..a66bdd5 100644
--- a/inst/doc/Accept-organism-for-GenomeInfoDb.R
+++ b/inst/doc/Accept-organism-for-GenomeInfoDb.R
@@ -1,10 +1,10 @@
-## ----style, eval=TRUE, echo=FALSE, results="asis"---------------------------------------
+## ----style, eval=TRUE, echo=FALSE, results="asis"--------------------------
BiocStyle::latex()
-## ----verbatim, message=FALSE------------------------------------------------------------
+## ----verbatim, message=FALSE-----------------------------------------------
library(GenomeInfoDb)
names(genomeStyles())
-## ----email------------------------------------------------------------------------------
+## ----email-----------------------------------------------------------------
packageDescription("GenomeInfoDb")$Maintainer
diff --git a/inst/doc/Accept-organism-for-GenomeInfoDb.pdf b/inst/doc/Accept-organism-for-GenomeInfoDb.pdf
index e17135c..5070ec4 100644
Binary files a/inst/doc/Accept-organism-for-GenomeInfoDb.pdf and b/inst/doc/Accept-organism-for-GenomeInfoDb.pdf differ
diff --git a/inst/doc/GenomeInfoDb.R b/inst/doc/GenomeInfoDb.R
index 4b45c8a..106a6ca 100644
--- a/inst/doc/GenomeInfoDb.R
+++ b/inst/doc/GenomeInfoDb.R
@@ -1,83 +1,83 @@
-## ----style, eval=TRUE, echo=FALSE, results="asis"---------------------------------------
+## ----style, eval=TRUE, echo=FALSE, results="asis"--------------------------
BiocStyle::latex()
-## ----preliminaries, echo=FALSE, message=FALSE-------------------------------------------
+## ----preliminaries, echo=FALSE, message=FALSE------------------------------
library(GenomeInfoDb)
library(TxDb.Dmelanogaster.UCSC.dm3.ensGene)
-## ----genomeStyles1----------------------------------------------------------------------
+## ----genomeStyles1---------------------------------------------------------
seqmap <- genomeStyles()
head(seqmap,n=2)
-## ----name-------------------------------------------------------------------------------
+## ----name------------------------------------------------------------------
names(genomeStyles())
-## ----genomeStyles2----------------------------------------------------------------------
+## ----genomeStyles2---------------------------------------------------------
head(genomeStyles("Homo_sapiens"),5)
-## ----style-present----------------------------------------------------------------------
+## ----style-present---------------------------------------------------------
"UCSC" %in% names(genomeStyles("Homo_sapiens"))
-## ----extractSeqlevels-------------------------------------------------------------------
+## ----extractSeqlevels------------------------------------------------------
extractSeqlevels(species="Arabidopsis_thaliana", style="NCBI")
-## ----extractSeqlevelsgroup--------------------------------------------------------------
+## ----extractSeqlevelsgroup-------------------------------------------------
extractSeqlevelsByGroup(species="Arabidopsis_thaliana", style="NCBI",
group="auto")
-## ----seqlevelsStyle---------------------------------------------------------------------
+## ----seqlevelsStyle--------------------------------------------------------
seqlevelsStyle(paste0("chr",c(1:30)))
seqlevelsStyle(c("2L","2R","X","Xhet"))
-## ----keepChr-txdb-----------------------------------------------------------------------
+## ----keepChr-txdb----------------------------------------------------------
newchr <- paste0("chr",c(1:22,"X","Y","M","1_gl000192_random","4_ctg9_hap1"))
seqlevelsInGroup(newchr, group="sex")
seqlevelsInGroup(newchr, group="auto")
seqlevelsInGroup(newchr, group="circular")
seqlevelsInGroup(newchr, group="sex","Homo_sapiens","UCSC")
-## ----check2-----------------------------------------------------------------------------
+## ----check2----------------------------------------------------------------
seqnames <- c("chr1", "chr9", "chr2", "chr3", "chr10")
all(seqnames %in% extractSeqlevels("Homo_sapiens", "UCSC"))
-## ----orderSeqlevels---------------------------------------------------------------------
+## ----orderSeqlevels--------------------------------------------------------
seqnames <- c("chr1","chr9", "chr2", "chr3", "chr10")
orderSeqlevels(seqnames)
seqnames[orderSeqlevels(seqnames)]
-## ----rankSeqlevels----------------------------------------------------------------------
+## ----rankSeqlevels---------------------------------------------------------
seqnames <- c("chr1","chr9", "chr2", "chr3", "chr10")
rankSeqlevels(seqnames)
-## ----find-------------------------------------------------------------------------------
+## ----find------------------------------------------------------------------
mapSeqlevels(c("chrII", "chrIII", "chrM"), "NCBI")
-## ----basic-gr---------------------------------------------------------------------------
+## ----basic-gr--------------------------------------------------------------
gr <- GRanges(paste0("ch",1:35), IRanges(1:35, width=5))
gr
-## ----renameseqlevels--------------------------------------------------------------------
+## ----renameseqlevels-------------------------------------------------------
newnames <- paste0("chr",1:35)
names(newnames) <- paste0("ch",1:35)
head(newnames)
gr <- renameSeqlevels(gr,newnames)
gr
-## ----dropseqlevels----------------------------------------------------------------------
+## ----dropseqlevels---------------------------------------------------------
dropSeqlevels(gr, paste0("chr",23:35), pruning.mode="coarse")
-## ----keepseqlevels----------------------------------------------------------------------
+## ----keepseqlevels---------------------------------------------------------
keepSeqlevels(gr, paste0("chr",1:22), pruning.mode="coarse")
-## ----keepstdchr-------------------------------------------------------------------------
+## ----keepstdchr------------------------------------------------------------
keepStandardChromosomes(gr, pruning.mode="coarse")
-## ----keepstdchr-2-----------------------------------------------------------------------
+## ----keepstdchr-2----------------------------------------------------------
plantgr <- GRanges(c(1:5,"MT","Pltd"), IRanges(1:7,width=5))
keepStandardChromosomes(plantgr, species="Arabidopsis thaliana",
pruning.mode="coarse")
-## ----genome-description-class, message=FALSE--------------------------------------------
+## ----genome-description-class, message=FALSE-------------------------------
library(BSgenome.Celegans.UCSC.ce2)
class(Celegans)
is(Celegans, "GenomeDescription")
@@ -90,7 +90,7 @@ provider(gendesc)
seqinfo(gendesc)
bsgenomeName(gendesc)
-## ----Seqinfo-egs------------------------------------------------------------------------
+## ----Seqinfo-egs-----------------------------------------------------------
## Note that all the arguments (except 'genome') must have the
## same length. 'genome' can be of length 1, whatever the lengths
## of the other arguments are.
@@ -139,13 +139,13 @@ if (interactive()) {
merge(x, y) # raises an error
}
-## ----quick-style------------------------------------------------------------------------
+## ----quick-style-----------------------------------------------------------
txdb <- TxDb.Dmelanogaster.UCSC.dm3.ensGene
seqlevels(txdb)
genomeStyles("Drosophila melanogaster")
mapSeqlevels(seqlevels(txdb), "NCBI")
-## ----sequence, eval=FALSE---------------------------------------------------------------
+## ----sequence, eval=FALSE--------------------------------------------------
# sequence <- seqlevels(x)
#
# ## sequence is in UCSC format and we want NCBI style
@@ -160,6 +160,6 @@ mapSeqlevels(seqlevels(txdb), "NCBI")
# group="auto")
# x <- keepSeqlevels(x,auto)
-## ----sessionInfo, results='asis', eval=TRUE---------------------------------------------
+## ----sessionInfo, results='asis', eval=TRUE--------------------------------
toLatex(sessionInfo())
diff --git a/inst/doc/GenomeInfoDb.pdf b/inst/doc/GenomeInfoDb.pdf
index fff87a8..45af9c9 100644
Binary files a/inst/doc/GenomeInfoDb.pdf and b/inst/doc/GenomeInfoDb.pdf differ
diff --git a/man/seqinfo.Rd b/man/seqinfo.Rd
index c661613..ca28f8a 100644
--- a/man/seqinfo.Rd
+++ b/man/seqinfo.Rd
@@ -38,14 +38,15 @@
\usage{
seqinfo(x)
-seqinfo(x, new2old=NULL, force=FALSE,
+seqinfo(x,
+ new2old=NULL,
pruning.mode=c("error", "coarse", "fine", "tidy")) <- value
seqnames(x)
seqnames(x) <- value
seqlevels(x)
-seqlevels(x, force=FALSE,
+seqlevels(x,
pruning.mode=c("error", "coarse", "fine", "tidy")) <- value
sortSeqlevels(x, X.is.sexchrom=NA)
seqlevelsInUse(x)
@@ -88,10 +89,6 @@ genome(x) <- value
and also \code{seqlevels(values)[seq_len(length(seqlevels(x)))]} must be
identical to \code{seqlevels(x)}.
}
- \item{force}{
- Deprecated in favor of the \code{pruning.mode} argument. See below.
- Note that \code{force=TRUE} is equivalent to \code{pruning.mode="coarse"}.
- }
\item{pruning.mode}{
When some of the seqlevels to drop from \code{x} are in use (i.e. have
ranges on them), the ranges on these sequences need to be removed before
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/r-bioc-genomeinfodb.git
More information about the debian-med-commit
mailing list