del.gaps {ape} | R Documentation

## Delete Alignment Gaps in DNA Sequences

### Description

These functions remove indel gaps (`"-"`) in a sample of DNA sequences.

### Usage

    del.gaps(x)
    del.colgapsonly(x)

### Arguments

`x` | a matrix, a list, or a vector containing the DNA sequences; only matrices for `del.colgapsonly`.

### Details

`del.gaps` remove all gaps, so the returned sequences may not have all the same lengths and are therefore returned in a list.

`del.colgapsonly` removes the columns that contain only gaps (useful when a small matrix is extracted from a large alignment).

The sequences can be either in `"DNAbin"` or in another format, but the returned object is always of class `"DNAbin"`.

### Value

`del.gaps` returns a vector (if there is only one input sequence) or a list of class `"DNAbin"`; `del.colgapsonly` returns a matrix.

### Author(s)

Emmanuel Paradis

### See Also

`base.freq`, `GC.content`, `seg.sites`, `image.DNAbin`

[Package ape version 3.4 Index]