aa2index.Rd
Converts sequences to aminoacid indeces from the ‘AAindex’ database.
aa2index(aa, index = "KYTJ820101", window = 1)
aa | a protein sequence character vector. |
---|---|
index | an index name or number (default: “KYTJ820101”, hydropathy index by Kyte-Doolittle, 1982). |
window | a positive numeric value, indicating the window size for smoothing with a sliding window average (default: 1, i.e. no smoothing). |
By default, this function simply returns the index values for each
amino acid in the sequence. It can also be set to perform a crude
sliding window average through the window
argument.
Returns a numeric vector.
Grant, B.J. et al. (2006) Bioinformatics 22, 2695--2696.
‘AAIndex’ is the work of Kanehisa and co-workers: Kawashima and Kanehisa (2000) Nucleic Acids Res. 28, 374; Tomii and Kanehisa (1996) Protein Eng. 9, 27--36; Nakai, Kidera and Kanehisa (1988) Protein Eng. 2, 93--100.
For a description of the ‘AAindex’ database see:
http://www.genome.jp/aaindex/ or the aa.index
documentation.
Ana Rodrigues
#> R S D <NA> <NA> <NA> R H Q V L #> -4.5 -0.8 -3.5 NA NA NA -4.5 -3.2 -3.5 4.2 3.8if (FALSE) { ## Use a sliding window average aa2index(aa=seq, index=22, window=3) ## Use an alignment aln <- read.fasta(system.file("examples/hivp_xray.fa",package="bio3d")) prop <- t(apply(aln$ali, 1, aa2index, window=1)) ## find and use indices for volume calculations i <- which(sapply(aa.index, function(x) length(grep("volume", x$D, ignore.case=TRUE)) != 0)) sapply(i, function(x) aa2index(aa=seq, index=x, window=5)) }