-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtutorial_pdz_v5.py
More file actions
39 lines (31 loc) · 971 Bytes
/
tutorial_pdz_v5.py
File metadata and controls
39 lines (31 loc) · 971 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
"""
Analysis of an alignment of the PDZ domain family
Calculate SVD of a matrix using numpy functions
e.g.
A = floor(random.rand(4,4)*20-10)
linalg.svd(A)
for sparse matrices, there are methods in SciPy
"""
from sca import *
from sca.tutorial_helpers import truncate
from sca.sca_read import *
from sca.msa_search import *
PDB_FILE = './Inputs/1BE9.pdb'
FREE_FILE = './Inputs/al_pdz.free'
CHAINID = 'A'
FRAC_ALPHA_CUTOFF = 0.8
def tutorial():
"""
Analysis of an alignment of the PDZ domain family
"""
pdb_res_list = read_pdb(PDB_FILE, CHAINID)
alignments = read_free(FREE_FILE)
# n_alignments = len(alignments)
# len_alignment = len(alignments[0])
# truncate alignments to sequence positions with
# gap frequency no greater than 20% - to avoid over-representation of gaps
alignments = truncate(alignments, FRAC_ALPHA_CUTOFF)
return msa_search(pdb_res_list, alignments)
OUTPUT = tutorial()
print 'output: '
print OUTPUT