matchVariants {VariantTools} | R Documentation

## Match variants by position and allele

### 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

    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

[Package VariantTools version 1.28.1 Index]