Skip to content

demographics

set_cache_path(path='~/.dadi/TwoLocus_cache')

Set directory in which demographic equilibrium phi spectra will be cached.

The collection of cached spectra can get large, so it may be helpful to store them outside the user's home directory.

Source code in dadi/TwoLocus/demographics.py
 6
 7
 8
 9
10
11
12
13
14
15
16
def set_cache_path(path='~/.dadi/TwoLocus_cache'):
    """
    Set directory in which demographic equilibrium phi spectra will be cached.

    The collection of cached spectra can get large, so it may be helpful to
    store them outside the user's home directory.
    """
    global cache_path
    cache_path = os.path.expanduser(path)
    if not os.path.isdir(cache_path):
        os.makedirs(cache_path)