From c56d91b58d35b7a82afe43b240fd1001a19baf83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20M=C3=A9nager?= <herve.menager@pasteur.fr> Date: Sun, 19 Apr 2020 16:45:26 +0200 Subject: [PATCH] change labels for pIC50, pEC50 etc. to IC50, EC50 FIX #200 --- ippisite/ippidb/forms.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ippisite/ippidb/forms.py b/ippisite/ippidb/forms.py index 9bf26ed4..b1a09f6d 100644 --- a/ippisite/ippidb/forms.py +++ b/ippisite/ippidb/forms.py @@ -937,10 +937,20 @@ class CompoundActivityResultForm(ModelForm): class CompoundActivityResultBaseInlineNestedFormSet(BaseInlineNestedFormSet): __compound_names = [] + # pIC50, pEC50, etc. activity types are labelled below as IC50, EC50, etc. + # specifically because the user enters them in these forms as the former + # value but they are converted to and stored in the latter. + __activity_types = [ + ("pIC50", "IC50 (half maximal inhibitory concentration)"), + ("pEC50", "EC50 (half maximal effective concentration)"), + ("pKd", "Kd (dissociation constant)"), + ("pKi", "Ki (inhibition constant)"), + ] def add_fields(self, form, index): super().add_fields(form, index) form.fields["compound_name"].choices = self.__compound_names + form.fields["activity_type"].choices = self.__activity_types def set_modulation_type(self, modulation_type): for form in self.forms: -- GitLab