diff --git a/DESCRIPTION b/DESCRIPTION index f9eba99..4ac95a6 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -7,12 +7,12 @@ Description: The ability to efficiently represent and manipulate genomic intervals. Specialized containers for representating and manipulating short alignments against a reference genome are defined in the GenomicAlignments package. -Version: 1.15.12 +Version: 1.15.13 Author: P. Aboyoun, H. Pages and M. Lawrence Maintainer: Bioconductor Package Maintainer biocViews: Genetics, Sequencing, HighThroughputSequencing, Annotation Depends: R (>= 2.10), methods, BiocGenerics (>= 0.7.7), - IRanges (>= 1.21.13), XVector (>= 0.3.2) + IRanges (>= 1.21.14), XVector (>= 0.3.2) Imports: methods, utils, stats, BiocGenerics, IRanges LinkingTo: IRanges, XVector Suggests: AnnotationDbi (>= 1.21.1), AnnotationHub, diff --git a/NAMESPACE b/NAMESPACE index e7d4508..b73c61d 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -74,7 +74,8 @@ exportMethods( findOverlaps, countOverlaps, overlapsAny, subsetByOverlaps, precede, follow, nearest, distance, distanceToNearest, map, - encodeOverlaps + encodeOverlaps, + tile ) diff --git a/R/tile-methods.R b/R/tile-methods.R new file mode 100644 index 0000000..b6c10ab --- /dev/null +++ b/R/tile-methods.R @@ -0,0 +1,14 @@ +### ========================================================================= +### "tile" methods +### ------------------------------------------------------------------------- +### + +setMethod("tile", "GenomicRanges", function(x, n, width) { + sn <- seqnames(x) + strand <- strand(x) + x <- ranges(x) + tiles <- callGeneric() + gr <- GRanges(rep(sn, elementLengths(tiles)), unlist(tiles), + rep(strand, elementLengths(tiles))) + relist(gr, tiles) +})