Setup default paths & global scope variables.
 

Every file in the library imports this, so all global set up required everywhere can be added here.

  1. Defines default paths for different stores - so that they are out of version control by default.
  2. Global scope variables - for convenience in other modules.

To change any of the paths, update this settings file.

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.

settings_template[source]

settings_template()

Create initial settings for library.
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    

read_settings[source]

read_settings()

Read settings file at "~/.peptide/settings.yaml", if doesnt exist, create it from template.

Global Scope Variables

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
  • Resulting folder structure will be
    • ~/.peptide/datasets/acp/train_data.csv
    • ~/.peptide/datasets/amp/all_data.csv
    • ~/.peptide/datasets/dna_binding/train.csv