Learn R Programming

diemr (version 1.5.2)

rank2mapChr: Map SNP positions to ranks within a genomic window

Description

Determines the start and end positions of SNPs within a sliding window along a chromosome. Uses a two-pointer approach for efficiency.

Usage

rank2mapChr(x, windowSize)

Value

A matrix with two columns:

  • start: The index of the leftmost SNP within the window.

  • end: The index of the rightmost SNP within the window.

Arguments

x

A numeric vector of sorted SNP positions.

windowSize

The size of the genomic window in base pairs.

Details

New from Inchworm by Stuart J.E. Baird. Implemented from diemr 1.4.2