From 06ad627f0a0a8eda4c85db4dd0b02358641336ec Mon Sep 17 00:00:00 2001 From: Max Zwiessele Date: Fri, 24 Jan 2014 11:59:54 +0000 Subject: [PATCH] version change (early beta, do not change until everythin works --- GPy/util/datasets.py | 25 +++++++++++++++++++++++++ GPy/version | 2 +- setup.py | 2 +- 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/GPy/util/datasets.py b/GPy/util/datasets.py index 83983832..11863385 100644 --- a/GPy/util/datasets.py +++ b/GPy/util/datasets.py @@ -431,6 +431,31 @@ def swiss_roll_generated(num_samples=1000, sigma=0.0): c = c[so, :] return {'Y':Y, 't':t, 'colors':c} +def hapmapIII(data_set='hapmapIII'): + try: + from pandas import read_pickle + except ImportError as i: + raise i, "Need pandas for hapmap dataset, make sure to install pandas before loading the hapmap dataset" + if not data_available(data_set): + download_data(data_set) + datadf = read_pickle(os.path.join(data_path,'HapMapIII','hapmap3_r2_b36_fwd.consensus.qc.poly.snps.pickle')) + infodf = read_pickle(os.path.join(data_path,'HapMapIII','hapmap3_r2_b36_fwd.consensus.qc.poly.info.pickle')) + inan = read_pickle(os.path.join(data_path,'HapMapIII','hapmap3_r2_b36_fwd.consensus.qc.poly.nan.pickle')) + snps = datadf.iloc[:,6:].values + populations = datadf.population.values.astype('S3') + hapmap = dict(name='HapMapIII', + describtion='The HapMap phase three SNP dataset - ' + '1184 samples out of 11 populations. inan is a ' + 'boolean array, containing wheather or not the ' + 'given entry is nan (nans are masked as ' + '-128 in snps).', + datadf=datadf, + infodf=infodf, + snps=snps, + inan=inan, + populations=populations) + return hapmap + def swiss_roll_1000(): return swiss_roll(num_samples=1000) diff --git a/GPy/version b/GPy/version index c650d5af..6aec936a 100644 --- a/GPy/version +++ b/GPy/version @@ -1 +1 @@ -0.4.8 \ No newline at end of file +0.4.9b \ No newline at end of file diff --git a/setup.py b/setup.py index 6b399114..b6b78f18 100644 --- a/setup.py +++ b/setup.py @@ -24,7 +24,7 @@ setup(name = 'GPy', package_data = {'GPy': ['GPy/examples', 'gpy_config.cfg', 'util/data_resources.json', 'version']}, py_modules = ['GPy.__init__'], long_description=read('README.md'), - install_requires=['scipy == 0.12','matplotlib >= 1.2', 'nose'], + install_requires=['scipy >= 0.12','matplotlib >= 1.2', 'nose'], extras_require = { 'docs':['Sphinx', 'ipython'], },