Description Usage Arguments Examples
overlapWidths returns a vector containing the number
of bases each range in a GRanges object overlap with
a another GRanges object (e.g. one of annotation
exons). For example, if x is a GRanges object
containing ANGSD windows, and anno is a
GRanges object containing all exon ranges,
overlapWidths(x, anno) will return a vector that can
be used as elementMetadata in x to indicate
how many bases in each range overlap anno. Note that
overlapWidths ignores strand.
1 | overlapWidths(x, anno, type = c("any", "start", "end", "within", "equal"))
|
anno |
a |
angsd |
a |
type |
the type of overlap to do; this passed
directly to |
1 2 3 4 5 6 7 | test_file <- system.file("inst", "extdata", "test.pestPG", package="angsdr")
d <- readPestPG(test_file)
anno <- GRanges("chr1", IRanges(c(70000, 120300), c(70300, 120800)))
# create overlaps annotation
overlapWidths(d, anno)
# store in d
d$anno_overlap <- overlapWidths(d, anno)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.