convertGaps: Convert gap characters

Description Usage Arguments Details Value Author(s)

Description

Convert gap characters in an alignemnt

Usage

1
2
convertGaps(file, output, formatin = "sequential", formatout = formatin,
  colsep = "", from = "?", to = "-", overwrite = FALSE, ...)

Arguments

file

path and file name of a DNA alignment

output

path and file name for the modified file

formatin

format of the input file (to be passed to read.dna).

formatout

format for the output file (to be passed to write.dna, by default the same as formatin).

colsep

argument to be passed to write.dna, character used to separate columns in DNA alignment (ape's default is a single space, here we override this to no character, i.e. colsep="").

from

character to be changed in alignment (default “?”)

to

new character to use in alignment (default “-”)

overwrite

if no output file is specified, and overwrite is TRUE, then the original file is overwritten.

...

additional arguments to be passed to write.dna.

Details

This function is intended to replace one type of gap character (e.g., ‘?’) into another (e.g., ‘-’).

Value

the name of the output file (invisibly).

Author(s)

Francois Michonneau


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