limit_snps: Limit the number of SNPs per locus.

View source: R/limit_snps.R

limit_snpsR Documentation

Limit the number of SNPs per locus.

Description

Start with the lead SNP and keep expanding the window until you reach the desired number of SNPs. dat should only contain one locus from one chromosome.

Usage

limit_snps(dat, max_snps = 500, verbose = TRUE)

Arguments

dat

A data.frame that contains at least the following columns:

SNP

RSID for each SNP.

POS

Each SNP's genomic position (in basepairs).

max_snps

The maximum number of SNPs to keep in the resulting data.table.

verbose

Print messages.

Value

A filtered data.table.

See Also

Other SNP filters: filter_snps(), gene_trimmer()

Examples

dat2 <- echodata::limit_snps(dat = echodata::BST1)

RajLabMSSM/echodata documentation built on Nov. 21, 2023, 8 a.m.