Skip to content

[Bioc-devel] alphabetFrequency on AAString

1 message · Hervé Pagès

#
Hi Michael,
On 11/12/2013 11:31 AM, Herv? Pag?s wrote:
This is done in Biostrings 2.31.7:

 > alphabetFrequency(x[[4]])
     A     R     N     D     C     Q     E     G     H     I     L     K 
     M
     3     3     4     3     1     2     3     2     4     4     3     2 
     1
     F     P     S     T     W     Y     V     U     O     B     Z     X 
     *
     1     1     4     2     1     3     2     0     0     0     0     0 
     0
     -     + other
     0     0     0

 > alphabetFrequency(x)
       A R N D C Q E G H I L K M F P S T W Y V U O B Z X * - + other
  [1,] 0 2 1 3 5 0 0 2 1 1 0 2 2 1 1 1 1 2 0 0 0 0 0 0 0 0 0 0     0
  [2,] 3 1 1 2 0 0 0 0 1 2 2 3 1 0 0 3 1 0 2 0 0 0 0 0 0 0 0 0     0
  [3,] 1 2 3 3 2 4 0 2 4 3 0 1 3 4 4 5 0 2 3 1 0 0 0 0 0 0 0 0     0
  [4,] 3 3 4 3 1 2 3 2 4 4 3 2 1 1 1 4 2 1 3 2 0 0 0 0 0 0 0 0     0
  [5,] 1 2 1 1 2 2 1 1 0 1 1 2 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0     0
  [6,] 1 0 2 1 0 0 0 2 1 0 2 2 3 2 0 0 1 2 0 0 0 0 0 0 0 0 0 0     0
  [7,] 1 0 2 1 1 1 1 1 0 1 1 0 1 1 0 2 1 1 1 3 0 0 0 0 0 0 0 0     0
  [8,] 0 3 1 1 1 2 0 1 0 1 0 1 3 5 1 2 0 0 2 2 0 0 0 0 0 0 0 0     0
  [9,] 0 1 3 2 1 1 3 1 2 2 0 1 1 0 3 2 2 1 2 3 0 0 0 0 0 0 0 0     0
[10,] 0 0 0 1 0 1 2 1 3 3 0 2 2 1 1 2 3 5 3 1 0 0 0 0 0 0 0 0     0

The reason there is an "other" col is that the Amino Acid alphabet
is not enforced (yet).

Cheers,
H.