seq_spellout: Spell out sequences

View source: R/seq_misc_operations.R

seq_spelloutR Documentation

Spell out sequences

Description

This function spells out nucleotides and amino acids in sequences.

Usage

seq_spellout(x, short = FALSE, collapse = " - ")

Arguments

x

a DNA, RNA or AA vector

short

logical. If TRUE, the function will return 3-letters short names for amino acids (ignored for DNA and RNA).

collapse

a character vector to separate the results. Set to NULL to avoid collapsing the results.

Value

A character vector if collapse is not NULL. A list of character vectors otherwise.

See Also

Other op-misc: seq_disambiguate_IUPAC(), seq_nchar(), seq_nseq(), seq_stat_gc(), seq_stat_prop()

Examples

x <- dna("ACGT")
seq_spellout(x)

x <- rna("ACGU")
seq_spellout(x)

x <- aa("ACGBTX")
seq_spellout(x)


bioseq documentation built on Sept. 6, 2022, 5:07 p.m.