SNP.duplicated: Duplicated SNPs

View source: R/snp_duplicated.r

SNP.duplicatedR Documentation

Duplicated SNPs

Description

Determines which SNPs are duplicates of previous SNPs and returns their indices.

Usage

 SNP.duplicated(x, by = "chr:pos") 

Arguments

x

A bed.matrix or a data.frame

by

The criterium used to determined if SNP is duplicated.

Details

When x is a bed.matrix, the data.frame x@bed will be used. The columns that will be taken in consideration Are id, chr, pos, A1, and A2. Not all columns are mandatory, depending on the value of by.

The possible values for by are "chr:pos", "chr:pos:alleles", "id", "id:chr:pos" and "id:chr:pos:alleles". The default is by = "chr:pos", which means that two SNPs are considered as duplicated if they have same chr and pos values.

Currently, when using a criterium involving alleles, this function does not consider the possibility of alleles swaps or reference strand flips.

Value

An integer vector of indices of SNPs which are duplicates of previously seen SNPs.

See Also

SNP.match


gaston documentation built on Dec. 28, 2022, 1:30 a.m.