Get pairwise differences per site between sequences

Share:

Description

Get pairwise differences per site between sequences

Usage

1
2
pairwise.diff.msa(x, seq1 = NULL, seq2 = NULL, ignore.missing = TRUE,
  ignore.gaps = TRUE)

Arguments

x

An object of type msa

seq1

A character vector or integer index indicating seq1 (see Value)

seq2

A character vector of integer index indicating seq2. Can only be provided if seq1 is provided.

ignore.missing

A logical value indicating whether to compare sites where either sequence has missing data.

ignore.gaps

A logical value indicating whether to compare sites where either sequence contains a gap.

Value

If seq1 and seq2 are provided, returns a numeric value giving the fraction of sites in the alignment where seq1 and seq2 differ (or zero if there are no sites to compare). If seq1 is provided and seq2 is NULL, returns a numeric vector giving this value for seq1 compared to every sequence (including itself; order of results is same as order of sequences in alignment). If both seq1 and seq2 are NULL, returns a matrix giving this value for every sequence compared with every other sequence.

Author(s)

Melissa J. Hubisz

See Also

ninf.msa To count the number of non-gap and non-missing character

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.