cutAlignment: Cut an alignment into individual partitions.

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Given an alignment and a partition file, takes the alignment and cuts it into individual partitions.

Usage

1
2
cutAlignment(algfile, partfile, formatin = "fasta", formatout = formatin,
  colsep = "", ...)

Arguments

algfile

file name of the alignment to cut

partfile

file name of the partition file

formatin

format of the DNA alignment (to be passed to ape:::read.dna)

formatout

format of the DNA alignment to be returned (by default same as formatin, can be any value accepted by write.dna)

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="").

...

additional arguments controlling the formating of the output (to be passed to ape:::write.dna)

Details

At this time, only takes a RAxML formatted partition file. The individual partition generated are named with the full alignment followed by the partition names specified in the partition file separated by an underscore. For each of the file created, the same extension as the full alignment is used. For instance, if your alignment file is named fullAlignment.phy, and your partitions are named part1, part2 and part3, this function will generate the files fullAlignment_part1.phy, fullAlignment_part2.phy, and fullAlignment_part3.phy.

Value

TRUE if the function worked, used for its side effect of creating individual partition files.

Author(s)

Francois Michonneau

See Also

write.dna

Examples

1
2
3
4
5
## Not run: 
cutAlignment("fullAlignment.phy", partfile="partInfo.part",
             formatin="sequential", colsep="")

## End(Not run)

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