Learn R Programming

DECIPHER (version 2.0.2)

TerminalChar: Determine the Number of Terminal Characters

Description

Counts the number of terminal characters for every sequence in an XStringSet. Terminal characters are defined as a specific character repeated at the beginning and end of a sequence.

Usage

TerminalChar(myXStringSet, char = "")

Arguments

myXStringSet
An XStringSet object of sequences.
char
A single character giving the terminal character to count, or an empty character ("") indicating to count both gap ("-") and unknown (".") characters.

Value

A matrix containing the results for each sequence in its respective row. The first column contains the number of leading char, the second contains the number of trailing char, and the third contains the total number of characters in-between.

See Also

IdLengths

Examples

Run this code
db <- system.file("extdata", "Bacteria_175seqs.sqlite", package="DECIPHER")
dna <- SearchDB(db)
t <- TerminalChar(dna)

Run the code above in your browser using DataLab