[med-svn] [r-bioc-bsgenome] 02/05: New upstream version 1.46.0
Andreas Tille
tille at debian.org
Thu Nov 9 08:59:59 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-bsgenome.
commit 8feeb5efc8c42c2cab796a86b3449706e12efd4d
Author: Andreas Tille <tille at debian.org>
Date: Thu Nov 9 09:54:11 2017 +0100
New upstream version 1.46.0
---
DESCRIPTION | 8 ++++----
R/BSgenome-class.R | 4 +---
R/ODLT_SNPlocs-class.R | 18 ++++++++++--------
R/OldFashionSNPlocs-class.R | 12 ++++++------
R/OnDiskLongTable-class.R | 2 +-
R/SNPlocs-class.R | 4 +---
R/XtraSNPlocs-class.R | 14 ++++++++------
build/vignette.rds | Bin 337 -> 337 bytes
inst/doc/BSgenomeForge.pdf | Bin 252283 -> 252463 bytes
inst/doc/GenomeSearching.pdf | Bin 191602 -> 191530 bytes
man/SNPlocs-class.Rd | 34 ++++++++--------------------------
man/XtraSNPlocs-class.Rd | 36 +++++++++++++++---------------------
12 files changed, 54 insertions(+), 78 deletions(-)
diff --git a/DESCRIPTION b/DESCRIPTION
index 3166d87..3cf7941 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -3,15 +3,15 @@ Title: Software infrastructure for efficient representation of full
genomes and their SNPs
Description: Infrastructure shared by all the Biostrings-based genome data
packages.
-Version: 1.44.2
+Version: 1.46.0
Encoding: UTF-8
Author: Hervé Pagès
Maintainer: H. Pagès <hpages at fredhutch.org>
biocViews: Genetics, Infrastructure, DataRepresentation,
SequenceMatching, Annotation, SNP
Depends: R (>= 2.8.0), methods, BiocGenerics (>= 0.13.8), S4Vectors (>=
- 0.9.36), IRanges (>= 2.1.33), GenomeInfoDb (>= 1.11.4),
- GenomicRanges (>= 1.27.6), Biostrings (>= 2.35.3), rtracklayer
+ 0.9.36), IRanges (>= 2.11.16), GenomeInfoDb (>= 1.13.1),
+ GenomicRanges (>= 1.29.14), Biostrings (>= 2.35.3), rtracklayer
(>= 1.25.8)
Imports: methods, utils, stats, BiocGenerics, S4Vectors, IRanges,
XVector, GenomeInfoDb, GenomicRanges, Biostrings, Rsamtools,
@@ -35,4 +35,4 @@ Collate: utils.R OnDiskLongTable_old-class.R OnDiskLongTable-class.R
BSgenomeViews-class.R BSgenome-utils.R export-methods.R
BSgenomeForge.R
NeedsCompilation: no
-Packaged: 2017-09-22 22:31:36 UTC; biocbuild
+Packaged: 2017-10-30 22:44:38 UTC; biocbuild
diff --git a/R/BSgenome-class.R b/R/BSgenome-class.R
index c7c17c7..1f5fe55 100644
--- a/R/BSgenome-class.R
+++ b/R/BSgenome-class.R
@@ -191,7 +191,7 @@ setMethod("seqinfo", "BSgenome",
### only supports replacement of the sequence names, i.e., except for their
### sequence names, Seqinfo objects 'value' and 'seqinfo(x)' must be identical.
setReplaceMethod("seqinfo", "BSgenome",
- function(x, new2old=NULL, force=FALSE,
+ function(x, new2old=NULL,
pruning.mode=c("error", "coarse", "fine", "tidy"),
value)
{
@@ -199,8 +199,6 @@ setReplaceMethod("seqinfo", "BSgenome",
stop("the supplied 'seqinfo' must be a Seqinfo object")
IN_THIS_CONTEXT <- paste0("when replacing the 'seqinfo' ",
"of a BSgenome object")
- if (!identical(force, FALSE))
- stop("'force' not supported ", IN_THIS_CONTEXT)
pruning.mode <- match.arg(pruning.mode)
if (pruning.mode != "error")
stop("'pruning.mode' not supported ", IN_THIS_CONTEXT)
diff --git a/R/ODLT_SNPlocs-class.R b/R/ODLT_SNPlocs-class.R
index 84327af..a1ac083 100644
--- a/R/ODLT_SNPlocs-class.R
+++ b/R/ODLT_SNPlocs-class.R
@@ -121,15 +121,19 @@ setMethod("snplocs", "ODLT_SNPlocs",
setMethod("snpsBySeqname", "ODLT_SNPlocs", .snpsBySeqname_ODLT_SNPlocs)
-.snpsByOverlaps_ODLT_SNPlocs <- function(x, ranges,
- maxgap=0L, minoverlap=0L,
- type=c("any", "start", "end", "within", "equal"),
- drop.rs.prefix=FALSE, ...)
+.snpsByOverlaps_ODLT_SNPlocs <- function(x, ranges, drop.rs.prefix=FALSE, ...)
{
ranges <- normarg_ranges(ranges)
if (!isTRUEorFALSE(drop.rs.prefix))
stop(wmsg("'drop.rs.prefix' must be TRUE or FALSE"))
-
+ dots <- list(...)
+ if (isTRUE(dots$invert))
+ stop(wmsg("snpsByOverlaps() does not support 'invert=TRUE'"))
+
+ if (is.null(maxgap <- dots$maxgap))
+ maxgap <- -1L
+ if (is.null(minoverlap <- dots$minoverlap))
+ minoverlap <- 0L
df <- getBatchesByOverlapsFromOnDiskLongTable(x at snp_table, ranges,
maxgap=maxgap,
minoverlap=minoverlap,
@@ -137,9 +141,7 @@ setMethod("snpsBySeqname", "ODLT_SNPlocs", .snpsBySeqname_ODLT_SNPlocs)
x_spatial_index <- spatialIndex(x at snp_table)
x_seqinfo <- seqinfo(x_spatial_index)
gr0 <- .as_naked_GRanges(df, x_seqinfo)
- idx <- which(overlapsAny(gr0, ranges,
- maxgap=maxgap, minoverlap=minoverlap,
- type=type, ...))
+ idx <- which(overlapsAny(gr0, ranges, ...))
df <- df[idx, ]
.as_GPos(df, x_seqinfo, drop.rs.prefix=drop.rs.prefix)
}
diff --git a/R/OldFashionSNPlocs-class.R b/R/OldFashionSNPlocs-class.R
index c64f23b..6a137f1 100644
--- a/R/OldFashionSNPlocs-class.R
+++ b/R/OldFashionSNPlocs-class.R
@@ -447,11 +447,13 @@ setMethod("snpsBySeqname", "OldFashionSNPlocs",
)
.snpsByOverlaps_OldFashionSNPlocs <- function(x, ranges,
- maxgap=0L, minoverlap=0L,
- type=c("any", "start", "end", "within", "equal"),
- drop.rs.prefix=FALSE, ...)
+ drop.rs.prefix=FALSE, ...)
{
ranges <- normarg_ranges(ranges)
+ dots <- list(...)
+ if (isTRUE(dots$invert))
+ stop(wmsg("snpsByOverlaps() does not support 'invert=TRUE'"))
+
## The only purpose of the line below is to check that 'x' and 'ranges'
## are based on the same reference genome (merge() will raise an error
## if they are not).
@@ -461,9 +463,7 @@ setMethod("snpsBySeqname", "OldFashionSNPlocs",
snps_by_seqname <- .snpsBySeqname_OldFashionSNPlocs(x,
seqlevels(ranges),
drop.rs.prefix=drop.rs.prefix)
- subsetByOverlaps(snps_by_seqname, ranges,
- maxgap=maxgap, minoverlap=minoverlap,
- type=type, ...)
+ subsetByOverlaps(snps_by_seqname, ranges, ...)
}
setMethod("snpsByOverlaps", "OldFashionSNPlocs",
diff --git a/R/OnDiskLongTable-class.R b/R/OnDiskLongTable-class.R
index 05caf33..8eacaeb 100644
--- a/R/OnDiskLongTable-class.R
+++ b/R/OnDiskLongTable-class.R
@@ -712,7 +712,7 @@ getBatchesBySeqnameFromOnDiskLongTable <- function(x, seqnames, colidx=NULL,
### ranges: GenomicRanges object.
### colidx: integer or character vector of column indices, or NULL.
getBatchesByOverlapsFromOnDiskLongTable <- function(x, ranges,
- maxgap=0L, minoverlap=1L,
+ maxgap=-1L, minoverlap=0L,
colidx=NULL,
with.rowids=FALSE,
as.data.frame=FALSE)
diff --git a/R/SNPlocs-class.R b/R/SNPlocs-class.R
index b4dc8d8..6981792 100644
--- a/R/SNPlocs-class.R
+++ b/R/SNPlocs-class.R
@@ -122,9 +122,7 @@ setGeneric("snpsBySeqname", signature="x",
### EXCEPT for 'minoverlap' default value that we set to zero so we also
### get SNPs that are insertions (relevant for XtraSNPlocs objects).
setGeneric("snpsByOverlaps", signature="x",
- function(x, ranges, maxgap=0L, minoverlap=0L,
- type=c("any", "start", "end", "within", "equal"), ...)
- standardGeneric("snpsByOverlaps")
+ function(x, ranges, ...) standardGeneric("snpsByOverlaps")
)
setGeneric("snpsById", signature="x",
diff --git a/R/XtraSNPlocs-class.R b/R/XtraSNPlocs-class.R
index 95b33f8..85feb39 100644
--- a/R/XtraSNPlocs-class.R
+++ b/R/XtraSNPlocs-class.R
@@ -335,12 +335,16 @@ setMethod("snpsBySeqname", "XtraSNPlocs",
### Arguments passed thru ... are further arguments to be passed to
### subsetByOverlaps().
setMethod("snpsByOverlaps", "XtraSNPlocs",
- function(x, ranges, maxgap=0L, minoverlap=0L,
- type=c("any", "start", "end", "within", "equal"),
+ function(x, ranges,
columns=c("seqnames", "start", "end", "strand", "RefSNP_id"),
- drop.rs.prefix=FALSE, as.DataFrame=FALSE, ...)
+ drop.rs.prefix=FALSE, as.DataFrame=FALSE,
+ ...)
{
ranges <- normarg_ranges(ranges)
+ dots <- list(...)
+ if (isTRUE(dots$invert))
+ stop(wmsg("snpsByOverlaps() does not support 'invert=TRUE'"))
+
## The only purpose of the line below is to check that 'x' and 'ranges'
## are based on the same reference genome (merge() will raise an error
## if they are not).
@@ -352,9 +356,7 @@ setMethod("snpsByOverlaps", "XtraSNPlocs",
snps_by_seqname <- snpsBySeqname(x, seqlevels(ranges),
columns=columns,
drop.rs.prefix=drop.rs.prefix)
- ans <- subsetByOverlaps(snps_by_seqname, ranges,
- maxgap=maxgap, minoverlap=minoverlap,
- type=type, ...)
+ ans <- subsetByOverlaps(snps_by_seqname, ranges, ...)
if (as.DataFrame)
ans <- .to_DataFrame(ans, columns)
ans
diff --git a/build/vignette.rds b/build/vignette.rds
index 1e3bf4e..7025cd5 100644
Binary files a/build/vignette.rds and b/build/vignette.rds differ
diff --git a/inst/doc/BSgenomeForge.pdf b/inst/doc/BSgenomeForge.pdf
index 9beecae..0562597 100644
Binary files a/inst/doc/BSgenomeForge.pdf and b/inst/doc/BSgenomeForge.pdf differ
diff --git a/inst/doc/GenomeSearching.pdf b/inst/doc/GenomeSearching.pdf
index 3e196b2..b041ae8 100644
Binary files a/inst/doc/GenomeSearching.pdf and b/inst/doc/GenomeSearching.pdf differ
diff --git a/man/SNPlocs-class.Rd b/man/SNPlocs-class.Rd
index ed849e1..2275cad 100644
--- a/man/SNPlocs-class.Rd
+++ b/man/SNPlocs-class.Rd
@@ -88,11 +88,8 @@ snpcount(x)
snpsBySeqname(x, seqnames, ...)
\S4method{snpsBySeqname}{SNPlocs}(x, seqnames, drop.rs.prefix=FALSE)
-snpsByOverlaps(x, ranges, maxgap=0L, minoverlap=0L,
- type=c("any", "start", "end", "within", "equal"), ...)
-\S4method{snpsByOverlaps}{SNPlocs}(x, ranges, maxgap=0L, minoverlap=0L,
- type=c("any", "start", "end", "within", "equal"),
- drop.rs.prefix=FALSE, ...)
+snpsByOverlaps(x, ranges, ...)
+\S4method{snpsByOverlaps}{SNPlocs}(x, ranges, drop.rs.prefix=FALSE, ...)
snpsById(x, ids, ...)
\S4method{snpsById}{SNPlocs}(x, ids, ifnotfound=c("error", "warning", "drop"))
@@ -110,8 +107,13 @@ snpsById(x, ids, ...)
Additional arguments, for use in specific methods.
Arguments passed to the \code{snpsByOverlaps} method for SNPlocs
- objects thru \code{...} are passed to internal call to
+ objects thru \code{...} are used internally in the call to
\code{\link[IRanges]{subsetByOverlaps}()}.
+ See \code{?IRanges::\link[IRanges]{subsetByOverlaps}} in the \pkg{IRanges}
+ package and \code{?GenomicRanges::\link[GenomicRanges]{subsetByOverlaps}}
+ in the \pkg{GenomicRanges} package for more information about the
+ \code{subsetByOverlaps()} generic and its method for
+ \link[GenomicRanges]{GenomicRanges} objects.
}
\item{drop.rs.prefix}{
Should the \code{rs} prefix be dropped from the returned RefSNP ids?
@@ -124,16 +126,6 @@ snpsById(x, ids, ...)
A single region of interest can be specified as a character string of
the form \code{"ch14:5201-5300"}.
}
- \item{maxgap, minoverlap, type}{
- These arguments are passed to \code{\link[IRanges]{subsetByOverlaps}()}
- which is used internally by \code{snpsByOverlaps}.
-
- Note that the default value for \code{minoverlap} is 0 which means
- that, by default, in addition to the SNPs that are located \emph{within}
- the genomic regions specified thru the \code{ranges} argument,
- \code{snpsByOverlaps} also returns SNPs that are \emph{adjacent} to
- these regions. Use \code{minoverlap=1L} to omit these SNPs.
- }
\item{ids}{
The RefSNP ids to look up (a.k.a. rs ids). Can be integer or character
vector, with or without the \code{"rs"} prefix. NAs are not allowed.
@@ -231,16 +223,6 @@ my_snps <- snpsByOverlaps(snps, my_cds)
my_snps
table(my_snps \%within\% my_cds)
-## Note that, by default, in addition to the SNPs that are located
-## within the regions of interest, snpsByOverlaps() also returns SNPs
-## that are adjacent to these regions. Use 'minoverlap=1L' to omit these
-## SNPs:
-my_snps2 <- snpsByOverlaps(snps, my_cds, minoverlap=1)
-table(my_snps2 \%within\% my_cds)
-
-## SNPs adjacent to the regions of interest:
-setdiff(my_cds, my_snps2)
-
## ---------------------------------------------------------------------
## snpsById()
## ---------------------------------------------------------------------
diff --git a/man/XtraSNPlocs-class.Rd b/man/XtraSNPlocs-class.Rd
index 72d0944..3a835af 100644
--- a/man/XtraSNPlocs-class.Rd
+++ b/man/XtraSNPlocs-class.Rd
@@ -55,19 +55,16 @@
\S4method{snpcount}{XtraSNPlocs}(x)
\S4method{snpsBySeqname}{XtraSNPlocs}(x, seqnames,
- columns=c("seqnames", "start", "end", "strand", "RefSNP_id"),
- drop.rs.prefix=FALSE,
- as.DataFrame=FALSE)
+ columns=c("seqnames", "start", "end", "strand", "RefSNP_id"),
+ drop.rs.prefix=FALSE, as.DataFrame=FALSE)
-\S4method{snpsByOverlaps}{XtraSNPlocs}(x, ranges, maxgap=0L, minoverlap=0L,
- type=c("any", "start", "end", "within", "equal"),
- columns=c("seqnames", "start", "end", "strand", "RefSNP_id"),
- drop.rs.prefix=FALSE, as.DataFrame=FALSE, ...)
+\S4method{snpsByOverlaps}{XtraSNPlocs}(x, ranges,
+ columns=c("seqnames", "start", "end", "strand", "RefSNP_id"),
+ drop.rs.prefix=FALSE, as.DataFrame=FALSE, ...)
\S4method{snpsById}{XtraSNPlocs}(x, ids,
- columns=c("seqnames", "start", "end", "strand", "RefSNP_id"),
- ifnotfound=c("error", "warning", "drop"),
- as.DataFrame=FALSE)
+ columns=c("seqnames", "start", "end", "strand", "RefSNP_id"),
+ ifnotfound=c("error", "warning", "drop"), as.DataFrame=FALSE)
\S4method{colnames}{XtraSNPlocs}(x, do.NULL=TRUE, prefix="col")
}
@@ -101,12 +98,15 @@
object. A single region of interest can be specified as a character string
of the form \code{"ch14:5201-5300"}.
}
- \item{maxgap, minoverlap, type}{
- These arguments are passed to \code{\link[IRanges]{subsetByOverlaps}()}
- which is used internally by \code{snpsByOverlaps}.
+ \item{...}{
+ Additional arguments, for use in specific methods.
+
+ Arguments passed to the \code{snpsByOverlaps} method for XtraSNPlocs
+ objects thru \code{...} are used internally in the call to
+ \code{\link[IRanges]{subsetByOverlaps}()}.
See \code{?IRanges::\link[IRanges]{subsetByOverlaps}} in the \pkg{IRanges}
- package and \code{?GenomicRanges::\link[GenomicRanges]{subsetByOverlaps}} in
- the \pkg{GenomicRanges} package for more information about the
+ package and \code{?GenomicRanges::\link[GenomicRanges]{subsetByOverlaps}}
+ in the \pkg{GenomicRanges} package for more information about the
\code{subsetByOverlaps()} generic and its method for
\link[GenomicRanges]{GenomicRanges} objects.
}
@@ -118,12 +118,6 @@
\item{ifnotfound}{
What to do if SNP ids are not found.
}
- \item{...}{
- Additional arguments, for use in specific methods.
- Further arguments passed to the \code{snpsByOverlaps} method for
- XtraSNPlocs objects (thru \code{...}) are passed to
- \code{\link[IRanges]{subsetByOverlaps}()}.
- }
\item{do.NULL, prefix}{
These arguments are ignored.
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/r-bioc-bsgenome.git
More information about the debian-med-commit
mailing list