utils
load_json(path)
Loads a json file into a dictionary.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
Path to the .json file to load. |
required |
Returns:
Type | Description |
---|---|
Dict
|
Content of the .json file as a dictionary. |
Source code in pydebiaseddta/utils.py
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
|
load_sample_dta_data(mini=False)
Loads a portion of the BDB dataset for fast experimenting.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mini |
bool, optional
|
Whether to load all drug-target pairs embedded in the library, or a mini version.
Set to |
False
|
Returns:
Type | Description |
---|---|
Dict[str, List]
|
The dictionary has three keys: |
Source code in pydebiaseddta/utils.py
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
|
load_sample_smiles()
Returns examples SMILES strings from ChEMBL for testing.
Returns:
Type | Description |
---|---|
List[str]
|
SMILES examples from ChEMBL. |
Source code in pydebiaseddta/utils.py
30 31 32 33 34 35 36 37 38 39 40 |
|
save_json(obj, path)
Saves a dictionary in json format. The indent is set to 4 for readability.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
obj |
Dict
|
Dictionary to store. |
required |
path |
str
|
Path to store the .json file. |
required |
Returns:
Type | Description |
---|---|
None
|
Source code in pydebiaseddta/utils.py
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
|