aa2num: Conversion of Amino Acids into Integer Values

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/aa2num.r

Description

A sequence containing standard amino acids is converted into a sequence of integer values. An offset for the code can be specified.

Usage

1
aa2num(seq, offset = 0, code = 0:19, verbose = FALSE)

Arguments

seq

string vector containing a sequence of standard amino acids

offset

offset, added to the specified code

code

integer vector of the values to be assigned to the amino acids

verbose

logical, if TRUE the specific encoding is printed

Details

The default values for the code are the integer values in the range 0 to 19. It is possible to use another numerical code for the 20 amino acids. The default coding order of the amino acids is: CYS, MET, PHE, ILE, LEU, VAL, TRP, TYR, ALA, GLY, THR, SER, ASN, GLN, ASP, GLU, HIS, ARG, LYS, PRO. Each amino acid is converted to a single element according to the code-vector. The offset offset is added. Both sequences with three-letter and one-letter code can be handled.

Value

Returns a sequence of integer values according to the given numerical code.

Note

The function assigns values only for the standard amino acids. This function includes source code of the bio3d package.

Author(s)

Franziska Hoffgaard

References

Grant, Rodrigues, ElSawy, McCammon, Caves, (2006) Bioinformatics 22, 2695–2696.

See Also

show.code

Examples

1
2
seq<-c("MET", "GLY", "PRO", "LYS", "ASN")
aa2num(seq)

Example output

Loading required package: snow
Loading required package: matrixcalc
[1]  1  9 19 18 12

BioPhysConnectoR documentation built on May 30, 2017, 6:46 a.m.