splitAlignment: Split alignments.

Description Usage Arguments Details Value Author(s)

Description

Split alignments into individual files.

Usage

1
2
splitAlignment(file, output, split_by = NULL, format = "fasta",
  colw = 10000, checkAmbiguity = TRUE, checkInternalGaps = FALSE, ...)

Arguments

file

path and file name of the alignment (all the seq need to be the same length)

output

folder where the individual sequences will be stored

split_by

If NULL (default), each sequence will be a in a separate file. Otherwise, a data frame with at least 2 columns named ‘groups’ and ‘sequences’: sequences identified in the ‘sequences’ column, sharing the same values in the ‘groups’ column will be written to files.

format

format of the alignment, for now only fasta

colw

width of columns, same as in write.dna

checkAmbiguity

should the presence of ambiguities in the sequences be tested? (default=TRUE). If ambiguities are found, returns a warning.

checkInternalGaps

should the presence of internal gaps be tested? (default=FALSE). If internal gaps are found, returns a warning.

...

additional parameters to be passed to ape:::write.dna

Details

This function takes an alignment and put each sequence into its individual file that is named the same as the name of the sequence. This function also overwrites the output (it doesn't check that the file created don't already exist).

Value

TRUE if the function succeed, mostly used for its side effect (create files with individual sequences).

Author(s)

Francois Michonneau


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