From e859527fb1708004e7389b4e782840edcedd0376 Mon Sep 17 00:00:00 2001 From: Cezary Czaplewski Date: Wed, 24 Jan 2018 10:26:46 +0100 Subject: [PATCH] aminoacid list update and chain without CA correction --- django_simple/todo/forms.py | 5 +++-- django_simple/todo/views.py | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/django_simple/todo/forms.py b/django_simple/todo/forms.py index 22aef8d..61b9144 100644 --- a/django_simple/todo/forms.py +++ b/django_simple/todo/forms.py @@ -9,9 +9,10 @@ import urllib aa_3letter = [ 'DPR','DLY','DAR','DHI','DAS','DGL','DSG','DGN','DSN','DTH', - 'DYY','DAL','DTY','DTR','DVA','DLE','DIL','DPN','MED','DCY', + 'DAL','DTY','DTR','DVA','DLE','DIL','DPN','MED','DCY', 'CYS','MET','PHE','ILE','LEU','VAL','TRP','TYR','ALA','GLY','THR', - 'SER','GLN','ASN','GLU','ASP','HIS','ARG','LYS','PRO'] + 'SER','GLN','ASN','GLU','ASP','HIS','ARG','LYS','PRO', + 'SME','AIB','ABU','DBZ'] def pdb_code_chain(pdbid): diff --git a/django_simple/todo/views.py b/django_simple/todo/views.py index 31c5976..2db5186 100644 --- a/django_simple/todo/views.py +++ b/django_simple/todo/views.py @@ -103,7 +103,7 @@ def from_pdb(file): unres_shift = {} chain_sorted=[] newchain = True - + i='' for line in file: if line[0:6] == 'ATOM ' and line[13:15] == 'CA': aa = three_to_one.get(line[17:20]) @@ -116,7 +116,7 @@ def from_pdb(file): chain_start[ch]=i chain_sorted.extend(ch) newchain = False - if line[0:3] == 'TER': + if line[0:3] == 'TER' and i != '': sequence.append('XX') chain_end[ch]=i newchain = True -- 1.7.9.5