subsetByOverlaps.keepAllMeta: Help functions for handling gene ranges

Description Usage Arguments Details Value Author(s)

View source: R/HLP_geneRanges.R

Description

Keep all meta data when overlapping gene ranges or converting to dataframe.

Usage

1
2
subsetByOverlaps.keepAllMeta(gr1, gr2, write.ranges.tofile = NULL,
  addStart = 0)

Arguments

gr1, gr2

GRanges object

write.ranges.tofile

character with file path. If given, a data.frame is generated from the returned GRanges object and written to this destination. Omitted if NULL.

addStart

numeric with mumber of bases to be added to the start coordinate when converting a GRanges object to a dataframe. E.g. necessary for switching between 0-based and 1-based genome coordinate systems.

Details

By default, meta data is lost when GRanges are merged or overlapped. subsetByOverlaps.keepAllMeta returns overlap of two GRanges objects with merged meta data from both. Meta data stored in CompressedCharacterList is collapsed to a single column. granges2df generates a data.frame from an GRanges containing the meta data. Meta data stored in CompressedCharacterList is collapsed to a single column.

Value

subsetByOverlaps.keepAllMeta returnes GRanges object containing overlap and meta data from input ranges. granges2df returns a data.frame with genomic coordinates and meta data from input object.

Author(s)

Frank Ruehle


frankRuehle/systemsbio documentation built on July 3, 2018, 10:05 a.m.