Learn R Programming

delimtools (version 0.2.0)

clean_dna: 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)

Value

an object of class DNAbin.

Arguments

dna

an object of class DNAbin.

verbose

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

Author

Rupert A. Collins

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.

Examples

Run this code
geo_clean <- clean_dna(geophagus)

Run the code above in your browser using DataLab