clean_dna: Removes Gaps, Ambiguities and Missing Data from DNA Sequences

View source: R/clean_dna.R

clean_dnaR Documentation

Removes Gaps, Ambiguities and Missing Data from DNA Sequences

Description

clean_dna() removes all character not a valid ACTG base from a DNAbin object.

Usage

clean_dna(dna, verbose = TRUE)

Arguments

dna

an object of class DNAbin.

verbose

logical. Returns a warning if any sequence contains non ACTG bases.

Details

clean_dna() detects and removes any non ACTG bases from alignment. This includes: "N", "-", "?", "R", "Y", etc. If verbose = TRUE, returns a warning if these characters are inside the sequences, i.e, are not alignment padding chars at the ends.

Value

an object of class DNAbin.

Author(s)

Rupert A. Collins

Examples

geo_clean <- clean_dna(geophagus)


delimtools documentation built on April 3, 2025, 9:28 p.m.