Exemplo n.º 1
0
"""
Contains paths to the various files and directories inside solarpy.
"""


__author__ = "smathias"


import os
from os.path import join as pj
from os.path import dirname as pd

# local paths
PACKAGE_DIR = os.path.abspath(pd(pd(__file__)))
DATA_DIR = pj(PACKAGE_DIR, "data")
SUPPORT_DIR = pj(PACKAGE_DIR, "support_files")
MIBD_DIR = pj(SUPPORT_DIR, "mibd")
OLD_PED_DIR = pj(SUPPORT_DIR, "old_ped_files")
NEW_PED_DIR = pj(SUPPORT_DIR, "new_ped_files")
JOBS_DIR = pj(PACKAGE_DIR, "jobs")
RESULTS_DIR = pj(PACKAGE_DIR, "results")
OUTPUTS_DIR = pj(PACKAGE_DIR, "outputs")
FIGURES_DIR = pj(PACKAGE_DIR, "figures")
DISTRIBUTIONS_DIR = pj(FIGURES_DIR, "distributions")
SURF_DIR = pj(DATA_DIR, "surfaces")

# paths in Texas
MIBD_DIR_TX = "/data/SAFS/Linkage/Sep2011/MIBD"


if __name__ == "__main__":
Exemplo n.º 2
0
"""
Contains paths to the various files and directories inside the solarpy package.
"""


__author__ = 'smathias'


import os
from os.path import join as pj
from os.path import dirname as pd


# local paths
root_dir = os.path.abspath(pd(pd(pd(__file__))))
data_dir = pj(root_dir, 'data')
pheno_dir = pj(data_dir, 'phenotypes')
merv_dir = pj(data_dir, 'merv')
gwa_dir = pj(data_dir, 'gwa')
mibd_dir = pj(data_dir, 'mibd')
solarpy_dir = pj(root_dir, 'solarpy')
analysis_dir = pj(root_dir, 'analysis')
newest_ped_dir = pj(data_dir, 'newest_ped_files')
oldest_ped_dir = pj(data_dir, 'oldest_ped_files')
linkage_ped_dir = pj(data_dir, 'linkage_ped_files')
solar_path = pj(pd(root_dir), 'solar')
cormat_dir = pj(data_dir, 'correlation_matrices')


if __name__ == '__main__':
    pass
Exemplo n.º 3
0
from os import makedirs
from os.path import exists
from os.path import dirname as pd
from os.path import join as pj


root_dir = pd(__file__)
data_dir = pj(root_dir, 'data')
csv_dir = pj(data_dir, 'csvs')
new_csv_dir = pj(data_dir, 'new_csvs')
demo_dir = pj(data_dir, 'demographics')
mcmc_dir = pj(root_dir, 'mcmc')
analysis_dir = pj(root_dir, 'analysis')


def get_model_dir(depends_on, includes):
    """Returns the directory for a model."""

    _depends_on = ','.join(depends_on)

    if len(includes) == 0:

        _includes = 'none'
    else:

        _includes = ','.join(includes)

    model_dir = pj('mcmc', _depends_on, _includes)

    if not exists(model_dir):