completeGenes: Complete Alignments

Description Usage Arguments Value Author(s) See Also Examples

View source: R/completeGenes.R

Description

Some softwares (e.g. RevBayes) for partitioned analysis required each gene in a separate file, but all files must have the same number of species. This function achive that task.

Usage

1
2
3
4
5
6
completeGenes(
  genes,
  missing = c("?", "-"),
  write.dna = c(TRUE, FALSE),
  write.format = c("nexus", "phylip", "fasta", "tnt")
)

Arguments

genes

A list object with multiple alignments (DNAbin class)

missing

When a species or individual have no information for a gene, the absent gene should be filled with "?" or "-". by default "?".

write.dna

Boolean, write on separate files each gene with the complete list of species or individuals. By default TRUE.

write.format

The format to write each alignment (only if write.dna==TRUE). Four options: 1. nexus (default), 2. phylip, 3. fasta or 4. tnt.

Value

A list object with multiple alignments (DNAbin class). All with the same number of species or individuals.

Author(s)

Omar Daniel Leon-Alvarado leon.alvarado12@gmail.com

See Also

concatGenes read.multiGenes

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
library(alignTools)

data(Procyonidae)
head(Procyonidae, 5L)

genes <- multiGenBank(Procyonidae,TRUE,FALSE)

alignment <- multiMuscle(genes, write.dna=FALSE)

complete <- completeGenes(genes=alignment, missing="?", write.dna=TRUE, write.format="fasta")

str(complete)

oleon12/alignTools documentation built on March 17, 2021, 4:57 p.m.