Amino Acid Propensity In A Gapped Data
1
0
Entering edit mode
11.7 years ago

Hi,

I am trying to calculate the propensity of amino acids in the beta-strands of my data-set. The problem with my data-set is that strands are of different length . For eg

There are strands like this :- ABCDG KJLIJ GBAHUUJKI BHAJYJKIIO

Considering the above case, there is no problem in calculating the propensity till the 5th position of the strand from the N-ter. The problem starts from the sixth position as the first two strands do not have any more residues.

I hope I have made my point clear. Can anybody help me out ??

• 2.0k views
ADD COMMENT
0
Entering edit mode

This question is not very clear. You mean that there are 4 different strands; the first two contain 5 residues, the third 9 and the fourth 10 residues? Also I think you mean "frequency", not "propensity".

ADD REPLY
0
Entering edit mode
11.7 years ago
Whetting ★ 1.6k

Is this what you are looking for?

import re
strands=["ABCDG","KJLIJ","GBAHUUJKI","BHAJYJKIIO"]
for strand in strands:
    seen=[]
    results=[]
    results.append(strand)
    for x in strand:
       if x not in seen:
            seen.append(x)
            n=len(re.findall(x,strand))
            results.append(x)
            results.append(n)
    print results

You can run this in python (check the indentation when copy/pasting). For each strand it prints a list counting each AA in each "strand" hope this helps

ADD COMMENT

Login before adding your answer.

Traffic: 2261 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6