checkAlignment: Check DNA Alignments

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/DNA.R

Description

This function performs a series of diagnostics on a DNA alignement.

Usage

1
checkAlignment(x, check.gaps = TRUE, plot = TRUE, what = 1:4)

Arguments

x

an object of class "DNAbin".

check.gaps

a logical value specifying whether to check the distribution of alignment gaps.

plot

a logical value specifying whether to do the plots.

what

an integer value giving the plot to be done. By default, four plots are done on the same figure.

Details

This function prints on the console a series of diagnostics on the set a aligned DNA sequences. If alignment gaps are present, their width distribution is analysed, as well as the width of contiguous base segments. The pattern of nucleotide diversity on each site is also analysed, and a relevant table is printed.

If plot = TRUE, four plots are done: an image of the alignement, the distribution of gap widths (if present), the Shannon index of nucleotide diversity along the sequence, and the number of observed bases along the sequence.

If the sequences contain many gaps, it might be better to set check.gaps = FALSE to skip the analysis of contiguous segments.

Value

NULL

Author(s)

Emmanuel Paradis

See Also

alview, image.DNAbin, all.equal.DNAbin

Examples

1
2
3

Example output

Number of sequences: 15 
Number of sites: 965 

No gap in alignment.

Number of segregating sites (including gaps): 56
Number of sites with at least one substitution: 56
Number of sites with 1, 2, 3 or 4 observed bases:
  1   2   3   4 
909  54   2   0 

ape documentation built on April 25, 2021, 9:06 a.m.