apartSnpSelection: Random selection of SNPs

Description Usage Arguments Details Value Author(s) Examples

View source: R/apartSnpSelection.R

Description

Randomly selects SNPs for which each pair is at least as far apart as the specified basepair distance.

Usage

1
2
3
apartSnpSelection(chromosome, position, min.dist = 1e+05, 
                  init.sel = NULL,  max.n.chromosomes = -1, 
                  verbose = TRUE)

Arguments

chromosome

An integer vector containing the chromosome for each SNP. Valid values are 1-26, any other value will be interpreted as missing and not selected.

position

A numeric vector of the positions (in basepairs) of the SNPs.

min.dist

A numeric value to specify minimum distance required (in basepairs).

init.sel

A logical vector indicating the initial SNPs to be included.

max.n.chromosomes

A numeric value specifying the maximum number of SNPs to return per chromosome, "-1" means no number limit.

verbose

A logical value specifying whether to show progress information while running.

Details

apartSnpSelection selects SNPs randomly with the condition that they are at least as far apart as min.dist in basepairs. The starting set of SNPs can be specified with init.sel.

Value

A logical vector indicating which SNPs were selected.

Author(s)

Xiuwen Zheng

Examples

1
2
3
4
5
library(GWASdata)
data(affy_snp_annot)
pool <- affy_snp_annot$chromosome < 23
rsnp <- apartSnpSelection(affy_snp_annot$chromosome, affy_snp_annot$position,
                          min.dist=15000, init.sel=pool)

GWASTools documentation built on Nov. 8, 2020, 7:49 p.m.