gChain-class: gChain-class

gChain-classR Documentation

gChain-class

Description

specified by pair of GRanges objects .galx and .galy, each defined on a genome (i.e. a Seqinfo object specifying seqlevels and seqlengths, contained inside a GRanges object). These objects are the same length and each pair of ranges .galx[i], .galy[i] specifies a region of synteny on each "genome".

The widths of mapped interval pairs must be consistent with the (1) scale s and (2) .frac.left / .frac.right parameters For non fractional mappings, the scale is the ratio of widths of the y and x interval pairs, which the same number for every pair. The scale must be an integer or the reciprocal of an integer.

For scales s != 1 (eg gene to protein mappings) fractional mappings (e.g. exon to protein) may result in which the first position on the y interval is mapped to by only k* < k = s (or 1/s) coordinates on the y interval (for a given pair). This occurs with exon intervals whose boundaries lie inside a codon.

For this we allow "padded" mappings where each interval pair is associated with a pad.left and pad.right, which are offsets between 0 and k-1 (where k is the scale or 1/scale, whichever is the integer). i.e. if scale > 1, then k-pad.left specifies the number of coordinates on the left side of the x interval that will map to the to the leftmost coordinate on the y interval. then k-pad.right specifies the number of coordinates on the right side of the x interval that will map to the to the rightmost coordinate on the y interval. (for 0 < scale < 1, just switch x and y)

i.e. if scale < -1, then k-pad.left specifies the number of coordinates on the LEFT side of the x interval that will map to the to the RIGHTmost coordinate on the y interval. then k-pad.right specifies the number of coordinates on the RIGHT side of the x interval that will map to the to the LEFTmost coordinate on the y interval. (for -1 < scale < 0, just switch x and y)

ie padding always refers to genome with ranges that are being contracted in the chain

These interval pairs won't have widths that are integer multiples, however (for scales>1) the (width(y)+pad.left+pad.right)/width(x) will be an integer, or (for scales<1) (width(x)+pad.left+pad.right)/width(y) will be an integer.


mskilab/gChain documentation built on Sept. 28, 2022, 3:45 p.m.