aboutsummaryrefslogtreecommitdiff
path: root/gn3
diff options
context:
space:
mode:
authorBonfaceKilz2021-05-19 22:23:56 +0300
committerzsloan2021-06-18 22:08:04 +0000
commit1965fef7170a5de14988bc672424be2be6884ec2 (patch)
tree07fdb3532fbe8c3e7fbd18b2c2af22ca36ffc454 /gn3
parent856d4a72ace3584b731a7c45470e3df2704be02f (diff)
downloadgenenetwork3-1965fef7170a5de14988bc672424be2be6884ec2.tar.gz
db: phenotypes: Add Publication dataclass and mapping
Diffstat (limited to 'gn3')
-rw-r--r--gn3/db/phenotypes.py30
1 files changed, 30 insertions, 0 deletions
diff --git a/gn3/db/phenotypes.py b/gn3/db/phenotypes.py
index fdb148b..92d8e84 100644
--- a/gn3/db/phenotypes.py
+++ b/gn3/db/phenotypes.py
@@ -79,6 +79,36 @@ publish_x_ref_mapping = {
"comments": "comments",
}
+
+@dataclass(frozen=True)
+class Publication:
+ """Data Type that represents the table Publication"""
+ id_: Optional[int] = None
+ pubmed_id: Optional[int] = None
+ abstract: Optional[str] = None
+ authors: Optional[str] = None
+ title: Optional[str] = None
+ journal: Optional[str] = None
+ volume: Optional[str] = None
+ pages: Optional[str] = None
+ month: Optional[str] = None
+ year: Optional[str] = None
+
+
+publication_mapping = {
+ "id_": "id",
+ "PubMed_ID": "pubmed_id",
+ "Abstract": "abstract",
+ "Authors": "authors",
+ "Title": "title",
+ "Journal": "journal",
+ "Volume": "volume",
+ "Pages": "pages",
+ "Month": "month",
+ "Year": "year",
+}
+
+
TABLEMAP = {
"Phenotype": phenotype_column_mapping,
"PublishXRef": publish_x_ref_mapping,