rank2mapChr: Map SNP positions to ranks within a genomic window

View source: R/internal.r

rank2mapChrR Documentation

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)

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

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.


diemr documentation built on Dec. 11, 2025, 5:07 p.m.