Skip to content

Commit

Permalink
Python types are now converted to Numpy Data types.
Browse files Browse the repository at this point in the history
  • Loading branch information
biomadeira committed Sep 27, 2017
1 parent ac74dd2 commit 8c9555a
Showing 1 changed file with 23 additions and 8 deletions.
31 changes: 23 additions & 8 deletions prointvar/library.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"""

mmcif_types = {
_mmcif_types = {
'group_PDB': str,
'id': int,
'type_symbol': str,
Expand Down Expand Up @@ -52,7 +52,7 @@
'contact_indexes': str,
}

dssp_types = {
_dssp_types = {
'LINE': int,
'RES': str,
'CHAIN': str,
Expand Down Expand Up @@ -85,7 +85,7 @@
'Z-CA': float
}

sifts_types = {
_sifts_types = {
'PDB_regionId': int,
'PDB_regionStart': int,
'PDB_regionEnd': int,
Expand Down Expand Up @@ -127,7 +127,7 @@
'Pfam_dbAccessionId': str
}

hbplus_types = {
_hbplus_types = {
"CHAIN_D": str,
"RES_D": str,
"INSCODE_D": str,
Expand All @@ -147,7 +147,7 @@
"ID": int
}

arpeggio_types = {
_arpeggio_types = {
"ENTRY_A": str,
"CHAIN_A": str,
"RES_A": str,
Expand Down Expand Up @@ -180,9 +180,9 @@
"ENTITIES": str
}

probe_types = {}
_probe_types = {}

stamp_types = {
_stamp_types = {
"Domain1": str,
"Domain2": str,
"Fits": int,
Expand All @@ -199,13 +199,28 @@
"Pm": float,
}

uni_ens_var_types = {
_uni_ens_var_types = {
'begin': int,
'end': int,
'polyphenScore': float,
'siftScore': float,
}

_dtypes_convert = {
int: 'int64',
float: 'float64',
str: 'object'
}

mmcif_types = {k: _dtypes_convert[v] for k, v in _mmcif_types.items()}
dssp_types = {k: _dtypes_convert[v] for k, v in _dssp_types.items()}
sifts_types = {k: _dtypes_convert[v] for k, v in _sifts_types.items()}
hbplus_types = {k: _dtypes_convert[v] for k, v in _hbplus_types.items()}
arpeggio_types = {k: _dtypes_convert[v] for k, v in _arpeggio_types.items()}
probe_types = {k: _dtypes_convert[v] for k, v in _probe_types.items()}
stamp_types = {k: _dtypes_convert[v] for k, v in _stamp_types.items()}
uni_ens_var_types = {k: _dtypes_convert[v] for k, v in _uni_ens_var_types.items()}

arpeggio_col_renames = {
"STERIC_CLASH": "Steric-Clash",
"COVALENT": "Covalent-Bond",
Expand Down

0 comments on commit 8c9555a

Please sign in to comment.