diff options
author | BonfaceKilz | 2021-05-19 22:23:56 +0300 |
---|---|---|
committer | BonfaceKilz | 2021-05-20 23:25:59 +0300 |
commit | 26d3e0d3db944b9842419a6fdb56607400d3faff (patch) | |
tree | f889ab2ca8a2023d1a477644e30e1ba696497a0a /gn3/db | |
parent | 08e82448462babd1e5bad88e419326039abdf43d (diff) | |
download | genenetwork3-26d3e0d3db944b9842419a6fdb56607400d3faff.tar.gz |
db: phenotypes: Add Publication dataclass and mapping
Diffstat (limited to 'gn3/db')
-rw-r--r-- | gn3/db/phenotypes.py | 30 |
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, |