Skip to contents

Calculates the distances (gaps) from a segment's start and end positions to the defined start and end sites of the p and q arms of a chromosome. For acrocentric chromosomes, only the q arm start and end sites are considered.

Usage

CalculateGaps(
  Chrom,
  Start,
  End,
  p_chromStart,
  p_chromEnd,
  q_chromStart,
  q_chromEnd
)

Arguments

Chrom

Character. Chromosome name (e.g., "1", "X").

Start

Numeric. Segment start position (base pair).

End

Numeric. Segment end position (base pair).

p_chromStart

Numeric. Start position of the p arm detectable region.

p_chromEnd

Numeric. End position of the p arm detectable region.

q_chromStart

Numeric. Start position of the q arm detectable region.

q_chromEnd

Numeric. End position of the q arm detectable region.

Value

A named list with elements:

p_gap_to_tel

Gap from segment start to p arm telomere (or NA).

p_gap_to_cen

Gap from segment end to p arm centromere (or NA).

q_gap_to_tel

Gap from segment end to q arm telomere (or NA).

q_gap_to_cen

Gap from segment start to q arm centromere (or NA).

Details

For acrocentric chromosomes, p arm calculations are omitted and only q arm start/end sites are considered.

Examples

# CalculateGaps("1", 10000, 50000, 0, 25000, 25001, 100000)