l2n: Convert letters to numbers

Description Usage Arguments Value See Also Examples

View source: R/degenerate.R

Description

Converts biological sequence from letter to number notation.

Usage

1
l2n(seq, seq_type)

Arguments

seq

character vector or matrix representing single sequence.

seq_type

the type of sequence. Can be rna, dna or prot.

Value

a numeric vector or matrix containing converted elements.

See Also

l2n is a wrapper around degenerate.

Inverse function: n2l.

Examples

1
2
sample_seq <- c("a", "d", "d", "g", "a", "g", "n", "a", "l")
l2n(sample_seq, "prot")

biogram documentation built on March 31, 2020, 5:14 p.m.