Skip to content

Instantly share code, notes, and snippets.

@alexholehouse
Created April 7, 2020 12:22
Show Gist options
  • Save alexholehouse/be4d263a3bd88290030cabe593b4e0b2 to your computer and use it in GitHub Desktop.
Save alexholehouse/be4d263a3bd88290030cabe593b4e0b2 to your computer and use it in GitHub Desktop.
## Code snippet for calculating the omega aro value for the WT A1-LCD sequence, as
## described in Martin, E. W., Holehouse, A. S., Peran, I., Farag, M., Incicco, J. J.,
## Bremer, A., Grace, C. R., Soranno, A., Pappu, R. V. & Mittag, T. Valence and
## patterning of aromatic residues determine the phase behavior of prion-like domains.
## Science 367, 694–699 (2020).
##
## This requires the localcider package (https://pypi.org/project/localcider/)
##
from localcider.sequenceParameters import SequenceParameters
A1 = 'GSMASASSSQRGRSGSGNFGGGRGGGFGGNDNFGRGGNFSGRGGFGGSRGGGGYGGSGDGYNGFGNDGSNFGGGGSYNDFGNYNNQSSNFGPMKGGNFGGRSSGGGGGGGQYFAKPRNQGGYGGSSSSSSYGSGRRF'
# build the SequenceParameters object from the sequence
S = SequenceParameters(A1)
# Compute the omega_aro patterning parameter for the WT sequence
# (corresponds to the vertical 'WT' line on Figure 4A
omega_aro = S.get_kappa_X(['Y','F','W'])
print('WT A1 Omega_aro: %1.3f' %(omega_aro))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment