trimMitoAlignments: trimMitoAlignments

View source: R/trimMitoAlignments.R

trimMitoAlignmentsR Documentation

trimMitoAlignments

Description

Function for batch trimming a folder of alignments, with the various trimming functions available to select from

Usage

trimMitoAlignments(
  alignment.dir = "Alignments/untrimmed-alignments",
  alignment.format = "phylip",
  output.dir = "Alignments/trimmed-alignments",
  output.format = "phylip",
  sample.similiarity = TRUE,
  TrimAl = TRUE,
  TrimAl.path = "trimal",
  trim.external = TRUE,
  min.external.percent = 50,
  trim.coverage = TRUE,
  min.coverage.percent = 50,
  trim.column = TRUE,
  min.column.gap.percent = 100,
  alignment.assess = TRUE,
  min.sample.bp = 0,
  min.align.length = 0,
  min.taxa.count = 0,
  min.gap.percent = 0,
  overwrite = FALSE
)

Arguments

alignment.dir

path to a folder of sequence alignments in phylip format.

alignment.format

available input alignment formats: fasta or phylip

output.dir

contigs are added into existing alignment if algorithm is "add"

output.format

available output formats: phylip

TrimAl

if a file name is provided, save.name will be used to save aligment to file as a fasta

TrimAl.path

path to a folder of sequence alignments in phylip format.

trim.external

give a save name if you wnat to save the summary to file.

min.external.percent

TRUE to supress mafft screen output

trim.coverage

path to a folder of sequence alignments in phylip format.

min.coverage.percent

contigs are added into existing alignment if algorithm is "add"

trim.column

algorithm to use: "add" add sequences with "add.contigs"; "localpair" for local pair align. All others available

min.column.gap.percent

TRUE applies the adjust sequence direction function of MAFFT

alignment.assess

if a file name is provided, save.name will be used to save aligment to file as a fasta

min.sample.bp

path to a folder of sequence alignments in phylip format.

min.align.length

give a save name if you wnat to save the summary to file.

min.taxa.count

TRUE to supress mafft screen output

min.gap.percent

if a file name is provided, save.name will be used to save aligment to file as a fasta

overwrite

TRUE to supress mafft screen output

sample.similarity

remove samples too divergent from consensus, values 0-1 for proportion similar sites

Value

an alignment of provided sequences in DNAStringSet format. Also can save alignment as a file with save.name

Examples


your.tree = ape::read.tree(file = "file-path-to-tree.tre")
astral.data = astralPlane(astral.tree = your.tree,
                          outgroups = c("species_one", "species_two"),
                          tip.length = 1)



chutter/MitoCap documentation built on July 17, 2025, 12:04 a.m.