coverage.feat: Features coverage

Description Usage Arguments Value Note Author(s) Examples

View source: R/feat.R

Description

Features coverage

Usage

1
2
coverage.feat(..., or = FALSE, not = FALSE, get.feats = FALSE,
  pointer.only = FALSE)

Arguments

...

objects of type feat

or

if TRUE, get the coverage of union of feat arguments. or is FALSE by default, which takes the intersection.

not

If not NULL, a vector of logicals the same length as the number of features provided (or will be recycled to this length). For each value which is TRUE, then any base *not* included in this feature will be counted. (The negation is done before any other operation). If NULL, do not negate any features. There must be at least one feature which is not negated (so that boundaries can be established).

get.feats

if TRUE, return an object of type feat representing the intersection (or union of or==TRUE) of the features

pointer.only

(Only used if get.feats==TRUE). If TRUE, the features object returned will be stored as a pointer to an object in C.

Value

The number of bases covered by the feat arguments, or the combined feat object if get.feats==TRUE.

Note

Any features object passed into this function which is stored as a pointer to an object stored in C may be reordered (sorted) by this function.

Author(s)

Melissa J. Hubisz

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
feat1 <- feat(seqname=c(rep("chr1", 3), rep("chr2", 2)),
              start=c(1, 5, 100, 10, 20),
              end=c(7, 10, 105, 15, 30))
feat2 <- feat(seqname=c("chr1","chr2"),
              start=c(1,1), end=c(5,10))
coverage.feat(feat1, feat2, or=FALSE)
coverage.feat(feat1, feat2, or=TRUE)
coverage.feat(feat1, feat2, get.feats=TRUE, or=TRUE)
coverage.feat(feat1, feat2, or=TRUE)
rm(feat1, feat2)

rphast documentation built on May 1, 2019, 9:26 p.m.