hasGRanges-class {bsseq} | R Documentation

## Class hasGRanges

### Description

A class with a GRanges slot, used as a building block for other classes. Provides basic accessor functions etc.

### Objects from the Class

Objects can be created by calls of the form `new("hasGRanges", ...)`.

### Slots

`gr`:

  Object of class `GRanges`.

### Methods

"["

  Subsets a single dimension.

granges

  Get the `GRanges` object representing genomic locations.

start,start<-,end,end<-,width,width<-

  Start, end and width for the genomic locations of the object, also replacement functions. This accessor functions operate directly on the `gr` slot.

strand,strand<-

  Getting and setting the `strand` of the genomic locations (the `gr` slot).

seqlengths,seqlengths<-

  Getting and setting the `seqlengths` of the genomic locations (the `gr` slot).

seqlevels,seqlevels<-

  Getting and setting the `seqlevels` of the genomic locations (the `gr` slot).

seqnames,seqnames<-

  Getting and setting the `seqnames` of the genomic locations (the `gr` slot).

show

  The show method.

findOverlaps

  `(query = "hasGRanges", subject = "hasGRanges")`: finds overlaps between the `granges()` of the two objects.

findOverlaps

  `(query = "GenomicRanges", subject = "hasGRanges")`: finds overlaps between query and the `granges()` of the subject.

findOverlaps

  `(query = "hasGRanges", subject = "GenomicRanges")`: finds overlaps between the `granges()` of the query and the subject.

subsetByOverlaps

  `(query = "hasGRanges", subject = "hasGRanges")`: Subset the query, keeping the genomic locations that overlaps the subject.

subsetByOverlaps

  `(query = "hasGRanges", subject = "GenomicRanges")`: Subset the query, keeping the genomic locations that overlaps the subject.

subsetByOverlaps

  `(query = "GenomicRanges", subject = "hasGRanges")`: Subset the query, keeping the genomic locations that overlaps the subject.

### Note

If you extend the `hasGRanges` class, you should consider writing a subset method (`[`), and a `show` method. If the new class supports single index subsetting, the `subsetByOverlaps` methods will automatically extend.

### Author(s)

Kasper Daniel Hansen khansen@jhsph.edu

### Examples

    showClass("hasGRanges")

[Package bsseq version 1.24.4 Index]