getBreakpoints: Get Breakpoints

Description Usage Arguments Details Value See Also Examples

View source: R/getBreakpoints.R

Description

Extract breakpoint coordinates for focal genome segments

Usage

1
getBreakpoints(SYNT, focalgenome, ordfocal = NULL, remThld = 0)

Arguments

SYNT

A list of matrices that store data on different classes of rearrangements and additional information. SYNT must have been generated with the computeRearrs function (optionally filtered with the filterRearrs function).

focalgenome

Data frame representing the focal genome, containing the mandatory columns $marker, $scaff, $start, $end, and $strand, and optional further columns. Markers need to be ordered by their map position.

ordfocal

Character vector with the IDs of the focal genome segments that will be summarized. Have to match (a subset of) IDs in focalgenome$scaff. The default ordfocal = NULL extracts breakpoint coordinates for all focal genome segments in focalgenome$scaff.

remThld

A numeric value between 0 (inclusive) and 0.5 (exclusive). Controls whether breakpoints for components of rearrangements that are less parsimonious to have changed position relative to the alternative components will be output. To output all breakpoints, remThld needs to be smaller than remWgt used in the computeRearrs function.

Details

Parameters SYNT and focalgenome need to be specified.

focalgenome must contain the column $marker, a vector of either characters or integers with unique ortholog IDs that can be matched to the values in the rownames of SYNT. Values can be NA for markers that have no ortholog. $scaff must be a character vector giving the name of the focal genome segment (e.g., chromosome or scaffold) of origin of each marker. $start and $end must be numeric vectors giving the location of each marker on its focal genome segment. $strand must be a vector of "+" and "-" characters giving the reading direction of each marker. Additional columns are ignored and may store custom information, such as marker names. Markers need to be ordered by their map position within each focal genome segment, for example by running the orderGenomeMap function. focalgenome may contain additional rows that were absent when running the computeRearrs function. However, all markers present in SYNT need to be contained in focalgenome, with the subset of shared markers being in the same order.

Value

A list with breakpoint coordinates for the set of focal genome segments in ordfocal that have orthologous markers in SYNT.

If no breakpoints exist, the list element for the focal genome segment is NULL, otherwise it is a data frame with breakpoint coordinates in rows. Columns $bptmin and $bptmax give the minimum and maximum possible coordinates of a breakpoint as the end and start positions of the two orthologs in SYNT adjacent to a rearrangement boundary, and are obtained from focalgenome$end and focalgenome$start. Column $bptmid gives the breakpoint coordinate as midpoint between $bptmin and $bptmax. Column $maxtagval gives the maximum tag value of rearrangements sharing the same breakpoint coordinate.

See Also

computeRearrs, filterRearrs, genomeImagePlot.

Examples

1
2
3

dorolin/rearrvisr documentation built on Aug. 6, 2020, 1:32 a.m.