Learn R Programming

biogram (version 1.1)

l2n: Convert letters to numbers

Description

Converts biological sequence from letter to number notation.

Usage

l2n(seq, seq_type)

Arguments

seq
character vector representing single sequence.
seq_type
the type of sequence. Can be rna, dna or prot.

Value

  • a numeric vector containing converted elements.

See Also

l2n is based on degenerate the opposite of n2l.

Examples

Run this code
sample_seq <- c("a", "d", "d", "g", "a", "g", "n", "a", "l")
l2n(sample_seq, "prot")

Run the code above in your browser using DataLab