clean_names: Modify lineage names in sequence alignments to match the rest...

Description Usage Arguments Value Author(s) Examples

View source: R/clean_names.R

Description

The sequence alignment files from MalAvi name the parasite lineages differently than the rest of the database. They add a letter indicating the parasite's genus to the beginning of the lineage name and they add the parasite's morphospecies (if one exists) to the end of the name. This function removes that extra information so that one can easily match lineage names from the sequence alignments to those in the rest of the database.

Usage

1
clean_names(lin.names, keep.genus = FALSE)

Arguments

lin.names

The lineage names from the sequence alignment files to convert. Can be one or many.

keep.genus

If set to TRUE the genus of the lineage will be returned as well. Defaults to FALSE.

Value

If keep.genus = FALSE it will return an object (vector) of class character. If keep.genus = TRUE it will return an object of class data.frame with two columns (parasiteGenus and Lineage_Name).

Author(s)

Vincenzo A. Ellis vincenzoaellis@gmail.com

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## download a sequence alignment file from MalAvi
seq.align <- extract_alignment("long seqs")

## lineage names are stored as rownames
lin.names <- rownames(seq.align)
head(lin.names)

## clean the names
lin.names.clean <- clean_names(lin.names)
head(lin.names.clean)

vincenzoaellis/malaviR documentation built on Oct. 10, 2019, 10:55 p.m.