Learn R Programming

GenomicAlignments (version 1.8.1)

OverlapEncodings-class: OverlapEncodings objects

Description

The OverlapEncodings class is a container for storing the "overlap encodings" returned by the encodeOverlaps function.

Usage

## OverlapEncodings accessors:

## S3 method for class 'OverlapEncodings': length(x) ## S3 method for class 'OverlapEncodings': Loffset(x) ## S3 method for class 'OverlapEncodings': Roffset(x) ## S3 method for class 'OverlapEncodings': encoding(x) ## S3 method for class 'OverlapEncodings': levels(x) ## S3 method for class 'OverlapEncodings': flippedQuery(x)

## S3 method for class 'OverlapEncodings': Lencoding(x) ## S3 method for class 'OverlapEncodings': Rencoding(x)

## S3 method for class 'OverlapEncodings': njunc(x) ## S3 method for class 'OverlapEncodings': Lnjunc(x) ## S3 method for class 'OverlapEncodings': Rnjunc(x)

## Coercing an OverlapEncodings object:

## S3 method for class 'OverlapEncodings': as.data.frame(x, row.names=NULL, optional=FALSE, ...)

## Low-level related utilities:

## S3 method for class 'character': Lencoding(x) ## S3 method for class 'character': Rencoding(x) ## S3 method for class 'character': njunc(x) ## S3 method for class 'character': Lnjunc(x) ## S3 method for class 'character': Rnjunc(x)

## S3 method for class 'factor': Lencoding(x) ## S3 method for class 'factor': Rencoding(x) ## S3 method for class 'factor': njunc(x) ## S3 method for class 'factor': Lnjunc(x) ## S3 method for class 'factor': Rnjunc(x)

Arguments

x
An OverlapEncodings object. For the low-level utilities, x can also be a character vector or factor containing encodings.
row.names
NULL or a character vector.
optional, ...
Ignored.

Details

Given a query and a subject of the same length, both list-like objects with top-level elements typically containing multiple ranges (e.g. RangesList objects), the "overlap encoding" of the i-th element in query and i-th element in subject is a character string describing how the ranges in query[[i]] are qualitatively positioned relatively to the ranges in subject[[i]].

The encodeOverlaps function computes those overlap encodings and returns them in an OverlapEncodings object of the same length as query and subject.

The topic of working with overlap encodings is covered in details in the "OverlapEncodings" vignette located this package (GenomicAlignments) and accessible with vignette("OverlapEncodings").

See Also

  • The "OverlapEncodings" vignette in this package.
  • TheencodeOverlapsfunction for computing "overlap encodings".
  • Thecomparefunction in theIRangespackage for the interpretation of the strings returned byencoding.
  • TheGRangesListclass defined and documented in theGenomicRangespackage.

Examples

Run this code
example(encodeOverlaps)  # to generate the 'ovenc' object

length(ovenc)
Loffset(ovenc)
Roffset(ovenc)
encoding(ovenc)
levels(ovenc)
nlevels(ovenc)
flippedQuery(ovenc)
njunc(ovenc)

as.data.frame(ovenc)
njunc(levels(ovenc))

Run the code above in your browser using DataLab