Skip to content

Commit

Permalink
add tile,GenomicRanges
Browse files Browse the repository at this point in the history
  • Loading branch information
m.lawrence committed Dec 10, 2013
1 parent ecd4590 commit adee2e2
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>
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,
Expand Down
3 changes: 2 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ exportMethods(
findOverlaps, countOverlaps, overlapsAny, subsetByOverlaps,
precede, follow, nearest, distance, distanceToNearest,
map,
encodeOverlaps
encodeOverlaps,
tile
)


Expand Down
14 changes: 14 additions & 0 deletions R/tile-methods.R
Original file line number Diff line number Diff line change
@@ -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)
})

0 comments on commit adee2e2

Please sign in to comment.