Setup default paths & global scope variables.
Every file in the library imports this, so all global set up required everywhere can be added here.
- Defines default paths for different stores - so that they are out of version control by default.
- Global scope variables - for convenience in other modules.
To change any of the paths, update this settings file.
A YAML file called settings.yaml
is created (from a template) the first time the library is used.
The default template is shown below.
def settings_template():
'''Create initial settings for library.'''
template = {
'STORES' :
{
'DATA_STORE' : f'{Path.home()}/.peptide/datasets',
'LOG_STORE' : f'{Path.home()}/.peptide/logs',
'MODEL_STORE' : f'{Path.home()}/.peptide/models',
'EXPERIMENT_STORE' : f'{Path.home()}/.peptide/experiments'
}
}
return template
settings = read_settings()
DATA_STORE = settings.STORES.DATA_STORE
LOG_STORE = settings.STORES.LOG_STORE
MODEL_STORE = settings.STORES.MODEL_STORE
EXPERIMENT_STORE = settings.STORES.EXPERIMENT_STORE
Copy Datasets Into DataStore
- Copy dataset directories into the location pointed to by the
DATASTORE
global variable- for example
~/.peptide/datasets
- for example
- Resulting folder structure will be
~/.peptide/datasets/acp/train_data.csv
~/.peptide/datasets/amp/all_data.csv
~/.peptide/datasets/dna_binding/train.csv