cleanSeqLabels: cleanSeqLabels

Description Usage Arguments Details Value Author(s)

Description

This function cleans up the sequence labels in an object created with ape::read.dna to remove illegal characters for a given phylogenetic software or according to a regular expression provided by the user.

Usage

1
cleanSeqLabels(alg, pattern = NULL, software = "RAxML", replaceWith = "")

Arguments

alg

an object created by the function ape::read.dna

pattern

a regular expression that indicates the characters to replace (default NULL). Leave it to NULL if you are using one of the supported software.

software

the software for which you are creating your alignment, (pre-loaded pattern). This argument is ignored if pattern is provided.

replaceWith

the character string to be used to replace the illegal characters.

Details

Given an alignment created by ape::read.dna, this function replaces (1) all characters not supported by a given software (only RAxML provided at this time), or (2) all characters that match a regular expression provided by the user. Note that, the software argument is ignored by the function if a pattern in provided.

The function also adds an attribute to the alignment object oldnames to keep the original labels.

Here is the list of regular expression used for the different software:

RAxML

":|,|\(|\)|;|\[|\]|\'|\s|\t"

Value

An alignment file

Author(s)

Francois Michonneau


fmichonneau/chopper documentation built on May 16, 2019, 1:43 p.m.