aboutsummaryrefslogtreecommitdiff
path: root/gn3
diff options
context:
space:
mode:
authorBonfaceKilz2021-05-19 21:44:34 +0300
committerBonfaceKilz2021-05-20 23:25:59 +0300
commit28ebb9434038121abb80e602714603a2ec6e4e48 (patch)
tree616f8e7ab37af876aacf817ec96ff09f3031d0d2 /gn3
parentef9e368735514706f32df7d3c9ed6e79043a30fc (diff)
downloadgenenetwork3-28ebb9434038121abb80e602714603a2ec6e4e48.tar.gz
db: phenotypes: Add phenotype table mapping
Diffstat (limited to 'gn3')
-rw-r--r--gn3/db/phenotypes.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/gn3/db/phenotypes.py b/gn3/db/phenotypes.py
index 11d67db..645c0af 100644
--- a/gn3/db/phenotypes.py
+++ b/gn3/db/phenotypes.py
@@ -23,6 +23,23 @@ class Phenotype:
authorized_users: Optional[str] = None
+# Mapping from the Phenotype dataclass to the actual column names in the
+# database
+phenotype_column_mapping = {
+ "id_": "id",
+ "pre_pub_description": "Pre_publication_description",
+ "post_pub_description": "Post_publication_description",
+ "original_description": "Original_description",
+ "units": "Units",
+ "pre_pub_abbrevition": "Pre_publication_abbreviation",
+ "post_pub_abbreviation": "Post_publication_abbreviation",
+ "lab_code": "Lab_code",
+ "submitter": "Submitter",
+ "owner": "Owner",
+ "authorized_users": "Authorized_Users",
+}
+
+
@dataclass(frozen=True)
class PublishXRef:
"""Data Type that represents the table PublishXRef"""