expandCircularFeatures: Splits genome features spanning annotated ends of circular...

Description Usage Arguments See Also

View source: R/coor2index.R


Splits genome features that span start/end coordinates of circular chromosomes, and adds the downstream half with optional modification of ID, and type values. Circular features are recognized here by start > end, in left->right direction of genome annotation. Strand information MUST NOT BE ENCODED IN start/end coordinate direction, but explicitly provided via a strand column! Note that only the upstream half retains all column information (exceptions: see argument copyCols), the downstream half will only carry information on coordinates, and optionally updated feature type and ID. The update will only happen if the passed table contains type and ID information (see argument idCols. The split can be reversed by function removeCircularFeatures.


expandCircularFeatures(features, chrL, coorCols = c("chr", "start", "end",
  "strand"), reverse = c("-", -1), idTag = "-circ2", idCols = c(ID = "ID",
  type = "type", parent = "parent"), copyCols = FALSE, insertRows = TRUE)



a list of genomic features with coordinates


obligatory list of chromosome lengths, in order used in chromosome column in features (see argument coorCols


ordered string vector providing the column names of coordinate columns to be used; must be of length 4 and provide in order: chromosome number (refering to argument chrL), start, end, and strand (see argument reverse)


allowed indicators of reverse strand features in strand column (see argument coorCols)


tag to add to downstream ID and type


named vector of column names for feature ID, type, and feature parent; note that a "parent" column will be added if not present to refer the downstream half to its upstream feature, which retains all other information


copy values to circular feature copy; either logical TRUE to copy all columns, or a vector of column indices or names


insert the circular features below their parent, if set to FALSE circular features will just be appended; this saves a lot of time for large datasets

See Also


raim/segmenTools documentation built on Nov. 9, 2018, 5:38 p.m.