distConsecutiveSnps: Distance between consecutive SNPs

distConsecutiveSnpsR Documentation

Distance between consecutive SNPs

Description

For each pair of consecutive SNPs, return the number of "blocks" (i.e. nucleotides) between both SNPs (to be coherent with distSnpPairs).

Usage

distConsecutiveSnps(snp.coords, only.chr = NULL, nb.cores = 1)

Arguments

snp.coords

data.frame with SNP identifiers as row names, and with two columns "chr" and "coord" or "pos"

only.chr

identifier of a given chromosome

nb.cores

the number of cores to use

Value

list with one component per chromosome

Author(s)

Timothee Flutre

See Also

estimLd

Examples

## Not run: ## make fake data
snp.coords <- data.frame(chr=c("chr1","chr1","chr1","chr2"),
                         pos=c(150, 131, 171, 17))
rownames(snp.coords) <- paste0("snp", 1:nrow(snp.coords))

distConsecutiveSnps(snp.coords)

## End(Not run)

timflutre/rutilstimflutre documentation built on Feb. 12, 2025, 11:35 p.m.