truncate_alignment: Truncate an annotated Stockholm alignment file with secondary...

truncate_alignmentR Documentation

Truncate an annotated Stockholm alignment file with secondary structure

Description

Simply truncating a Stockholm alignment file that includes secondary structure annotations may result in invalid base pairing, when only one half of a pair is removed. This function converts these half-pairs to "X", indicating unpairable bases.

Usage

truncate_alignment(alnfile, outfile, start = 1L, stop = 1000000L)

Arguments

alnfile

(character filename or connection) the stockholm alignment to be truncated.

outfile

(character filename or connection) path or connection to output the truncated alignment to.

start

(integer scalar) first base to include in the truncated alignment.

stop

(integer scalar) last base to include in the truncated alignment.

Value

NULL (invisibly)

Examples

aln <- system.file(file.path("extdata", "fungi_32S.cm"), package = "LSUx")
truncate_alignment(aln, tempfile("trunc", fileext = ".stk"), 1, 500)

brendanf/LSUx documentation built on April 7, 2024, 9:27 p.m.