addGRLgaps | R Documentation |
Add gaps between GRangesList regions
addGRLgaps(
grl,
strandSpecific = TRUE,
gapname = "gap",
suffix = "_v",
newValues = list(feature_type = "gap"),
default_feature_type = "exon",
feature_type_colname = "feature_type",
doSort = TRUE,
verbose = FALSE,
...
)
grl |
GRangesList object |
strandSpecific |
logical indicating whether the gaps are calculated
per strand, see |
gapname , suffix |
character vector supplying the name to assign to new
gap GRanges elements, using |
newValues |
list of values to add to the resulting gap GRanges,
whose names become |
default_feature_type , feature_type_colname |
character values,
indicating the type and colname to populate in |
doSort |
logical indicating whether to sort the resulting
GRanges objects. When |
verbose |
logical indicating whether to print verbose output. |
... |
additional arguments are passed to |
This function adds gaps between each GRanges region separately
for each GRangesList element, where
there is a gap between two GRanges for
the same seqnames. When strandSpecific=TRUE
the gaps are
determined per strand.
This function is a wrapper around getGRLgaps()
, which is then
concatenated to the input gr
GRanges object using S4Vectors::pc()
.
When the input grl
GRanges has column S4Vectors::values()
then the
gaps GRanges object will have NA
values used by default. To supply
values, use the newValues
argument, which assigns name-value pairs.
GRangesList object, sorted per GRangesList element
when doSort=TRUE
. When newValues
is supplied, the values for gaps GRanges elements will be assigned,
otherwise any column values present in gr
will be NA
for
gaps elements. The names of gaps elements are assigned using
gapname
then are made unique using jamba::makeNames()
,
unless gapname is NULL
.
Other jam GRanges functions:
addGRgaps()
,
annotateGRLfromGRL()
,
annotateGRfromGR()
,
assignGRLexonNames()
,
closestExonToJunctions()
,
combineGRcoverage()
,
exoncov2polygon()
,
findOverlapsGRL()
,
flattenExonsBy()
,
getFirstStrandedFromGRL()
,
getGRLgaps()
,
getGRcoverageFromBw()
,
getGRgaps()
,
grl2df()
,
jam_isDisjoint()
,
make_ref2compressed()
,
sortGRL()
,
spliceGR2junctionDF()
,
stackJunctions()
gr <- GenomicRanges::GRanges(seqnames=rep(c("chr1","chr2"), c(3,2)),
ranges=IRanges::IRanges(start=c(100, 300, 400, 300, 700),
end=c(199, 450, 500, 600, 800)),
strand=rep(c("+","-"), c(3,2)),
feature_type=rep("exon", 5));
names(gr) <- jamba::makeNames(rep("exon", length(gr)));
gr;
addGRgaps(gr);
grl <- GenomicRanges::split(gr, GenomicRanges::seqnames(gr));
grl;
addGRLgaps(grl);
addGRLgaps(grl, strandSpecific=FALSE);
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.