From 9927c94b92601bd84b43a3b01de076432cee43d0 Mon Sep 17 00:00:00 2001 From: David B Sauer <40378905+DavidBSauer@users.noreply.github.com> Date: Fri, 3 May 2019 20:02:11 -0400 Subject: [PATCH] bugfixes correct mistakes in calculating EK/QH and in the total AAs in percent_ERK --- feature_calculation/protein.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/feature_calculation/protein.py b/feature_calculation/protein.py index f31965e..b9d5363 100755 --- a/feature_calculation/protein.py +++ b/feature_calculation/protein.py @@ -83,12 +83,12 @@ def percent_thermolabile(AA_counts): def EKQH(AA_counts): #calculate the ratio of EK/QH in the proteome EK = 0.0 - QT=0.0 + QH=0.0 for x in ['E','K']: EK=EK+AA_counts[x] - for x in ['Q','T']: - QT=QT+AA_counts[x] - return EK/QT + for x in ['Q','H']: + QH=QH+AA_counts[x] + return EK/QH def EFMR(AA_counts): #calculate the fraction of EFMR in the proteome @@ -124,8 +124,6 @@ def percent_ERK(AA_counts): counts= sum(AA_counts.values()) for x in ['E','R','K']: ERK=ERK+AA_counts[x] - for x in AAs: - counts=counts+AA_counts[x] return ERK/counts def LKQ(AA_counts):