Skip to content

Commit

Permalink
After being deprecated in BioC 3.1, GIntervalTree objects and the
Browse files Browse the repository at this point in the history
"intervaltree" algorithm in findOverlaps() are now defunct.


git-svn-id: https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/GenomicRanges@103336 bc3139a8-67e5-0310-9ffc-ced21a209358
  • Loading branch information
[email protected] committed May 1, 2015
1 parent f85dd91 commit 2e5dd9e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 46 deletions.
4 changes: 2 additions & 2 deletions R/GIntervalTree-class.R
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,11 @@ setMethod("width", "GIntervalTree",
setAs("GRanges", "GIntervalTree",
function(from) {
msg <- c("GIntervalTree objects and the \"intervaltree\" algorithm ",
"used in findOverlaps() and family are deprecated. Please ",
"used in findOverlaps() and family are defunct. Please ",
"use GNCList objects or the \"nclist\" algorithm instead. ",
"See ?GNCList and the 'algorithm' argument in ?findOverlaps ",
"for more information.")
.Deprecated(msg=wmsg(msg))
.Defunct(msg=wmsg(msg))

if (any(isCircular(from), na.rm=TRUE))
stop("'GIntervalTree' objects not supported for circular sequences")
Expand Down
46 changes: 3 additions & 43 deletions man/GIntervalTree-class.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
The GIntervalTree class is a container for the genomic locations and
their associated annotations.

WARNING: GIntervalTree objects are deprecated. Please use \link{GNCList}
WARNING: GIntervalTree objects are defunct. Please use \link{GNCList}
objects instead. See \code{?\link{GNCList}} for more information.
}

Expand Down Expand Up @@ -233,46 +233,6 @@
}

\examples{
if (interactive()) {
## GIntervalTree objects are deprecated. Please use GNCList objects
## instead. See ?GNCList for more information.
seqinfo <- Seqinfo(paste0("chr", 1:3), c(1000, 2000, 1500), NA, "mock1")
gr <-
GRanges(seqnames =
Rle(c("chr1", "chr2", "chr1", "chr3"), c(1, 3, 2, 4)),
ranges = IRanges(
1:10, width = 10:1, names = head(letters,10)),
strand = Rle(
strand(c("-", "+", "*", "+", "-")),
c(1, 2, 2, 3, 2)),
score = 1:10,
GC = seq(1, 0, length=10),
seqinfo=seqinfo)
tree <- GIntervalTree(gr)
tree

## Summarizing elements
table(seqnames(tree))
sum(width(tree))
summary(mcols(tree)[,"score"])

## find Overlaps
subject <-
GRanges(seqnames =
Rle(c("chr1", "chr2", "chr1", "chr3"), c(1, 3, 2, 4)),
ranges =
IRanges(1:10, width = 10:1, names = head(letters,10)),
strand =
Rle(strand(c("-", "+", "*", "+", "-")),
c(1, 2, 2, 3, 2)),
score = 1:10,
GC = seq(1, 0, length=10))
query <-
GRanges(seqnames = "chr2", ranges = IRanges(4:3, 6),
strand = "+", score = 5:4, GC = 0.45)

stree <- GIntervalTree(subject)
findOverlaps(query, stree)
countOverlaps(query, stree)
}
## GIntervalTree objects are defunct. Please use GNCList objects
## instead. See ?GNCList for more information.
}
2 changes: 1 addition & 1 deletion man/GNCList-class.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ GNCList(x)
Containment Lists.

Note that GNCList objects are replacements for \link{GIntervalTree} objects.
The latter are deprecated starting with BioC 3.1.
The latter are defunct starting with BioC 3.2.

See \code{?\link[IRanges]{NCList}} in the \pkg{IRanges} package for
some important differences between the new algorithm based on Nested
Expand Down

0 comments on commit 2e5dd9e

Please sign in to comment.