I was trying to build a motif using Biopython 1.58 and I tried to cross-check the amino acid frequency from one column out of curiosity. Why do the values not correspond to the 'exact' value? e.g. given for 1st column there are amino acids: N,S,P,S,V,P,S,N,I,I,I,H,V,V,L. The output of the motif object is: {... 'N': 0.1279761904761905, 'P': 0.1279761904761905, 'S': 0.19047619047619052, ...}. Shoudn't 'N' be 2/15 = 0.06667, 'P' be 2/15 = 0.1333, and 'S' be 3/15 = 0.2? May be I misunderstood, or is there some other transformation done to the amino acid frequency used to build the sequence motif? Grateful if someone could clarify.
Thanks
According to your example, N should also be 2/15 and indeed has the same value as P. We also need more details such as: which Biopython module was used?
You're right. My mistake. Thanks. I used the Bio.Motif module.
Further to Neil's helpful comment, could you actually show us the code you are using with Biopython to get these numbers?
Here's the script. Still learning..
I edited this by indenting lines of code with 4 spaces (to display code properly).