matchVariants: Match variants by position and allele

Description Usage Arguments Value Author(s)

View source: R/setops.R

Description

These are deprecated functions for operating on the old variant GRanges. New code should use match and %in%. This function behaves like match, where two elements match when they share the same position and “alt” allele.

Usage

1
2
matchVariants(x, table)
x %variant_in% table

Arguments

x

The variants (GRanges) to match into table; the alt allele must be in the “alt” metacolumn.

table

The variants (GRanges) to be matched into; the alt allele must be in the “alt” metacolumn.

Value

For matchVariants, an integer vector with the matching index in table for each variant in x, or NA if there is no match. For %variant_in%, a logical vector indicating whether there was such a match.

Author(s)

Michael Lawrence


VariantTools documentation built on Nov. 8, 2020, 8:03 p.m.