~ubuntu-branches/ubuntu/wily/r-bioc-genomicranges/wily-proposed

« back to all changes in this revision

Viewing changes to R/RangesMapping-methods.R

  • Committer: Package Import Robot
  • Author(s): Andreas Tille
  • Date: 2013-10-18 10:40:04 UTC
  • Revision ID: package-import@ubuntu.com-20131018104004-ktm4ub0pcoybnir6
Tags: upstream-1.12.4
ImportĀ upstreamĀ versionĀ 1.12.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
### =========================================================================
 
2
### RangesMapping methods
 
3
### -------------------------------------------------------------------------
 
4
###
 
5
 
 
6
setMethod("granges",  "RangesMapping", function(x) {
 
7
  GRanges(space(x), ranges(x))
 
8
})
 
9
 
 
10
setAs("RangesMapping", "GenomicRanges", function(from) {
 
11
  gr <- granges(from)
 
12
  mcols(gr) <- DataFrame(as.matrix(hits(from)))
 
13
  gr
 
14
})