{ "info": { "author": "Erick Matsen", "author_email": "matsen@fhcrc.org", "bugtrack_url": null, "classifiers": [], "description": "======\nnestly\n======\n\n``nestly`` is a collection of functions designed to ease running software with combinatorial choices of parameters.\nIt can easily do so for \"cartesian products\" of parameter choices, but can do much more-- arbitrary \"backwards-looking\" dependencies can be used.\n\nThe vision here is that we take a fixed set of parameters and generate a single type of output for each defined combination, which can then be combined in some way for comparison and retrieval.\nWe would like to set things up tidily with nested directories for output reflecting nested parameter choices.\n\nThe `full documentation`_ is available on ReadTheDocs.\n\nInstalling\n==========\n\n.. image:: https://travis-ci.org/fhcrc/nestly.svg?branch=master\n :target: https://travis-ci.org/fhcrc/nestly\n\nThe easiest way is with `pip`_::\n\n $ pip install nestly\n\nOr, for the latest commit from master::\n\n $ pip install git+git://github.com/fhcrc/nestly.git@master\n\nPython 2.7 is required.\n\nIntroductory example\n====================\n\nImagine you'd like to try all possible combinations of the following:\n\n========== ==============================\nOption Choices\n---------- ------------------------------\nstrategy approximate, exhaustive\n---------- ------------------------------\nrun_count 10, 100, 1000\n---------- ------------------------------\ninput file any file matching inputs/file*\n========== ==============================\n\nFor this we can write a little ``make_nest.py``. The guts are::\n\n nest = Nest()\n\n nest.add('strategy', ('exhaustive', 'approximate'))\n nest.add('run_count', [10**i for i in xrange(3)])\n nest.add('input_file', glob.glob(os.path.join(input_dir, 'file*')),\n label_func=os.path.basename)\n\n nest.build('runs')\n\nRunning ``make_nest.py``, you get a directory tree like::\n\n runs\n \u251c\u2500\u2500 approximate\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 10\n \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 file1\n \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2514\u2500\u2500 control.json\n \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 file2\n \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u00a0\u00a0 \u2514\u2500\u2500 control.json\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 100\n \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 file1\n \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2514\u2500\u2500 control.json\n \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 file2\n \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u00a0\u00a0 \u2514\u2500\u2500 control.json\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 1000\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 file1\n \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2514\u2500\u2500 control.json\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 file2\n \u2502\u00a0\u00a0 \u00a0\u00a0 \u2514\u2500\u2500 control.json\n \u2514\u2500\u2500 exhaustive\n \u251c\u2500\u2500 10\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 file1\n \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2514\u2500\u2500 control.json\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 file2\n \u2502\u00a0\u00a0 \u00a0\u00a0 \u2514\u2500\u2500 control.json\n \u251c\u2500\u2500 100\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 file1\n \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2514\u2500\u2500 control.json\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 file2\n \u2502\u00a0\u00a0 \u00a0\u00a0 \u2514\u2500\u2500 control.json\n \u2514\u2500\u2500 1000\n \u251c\u2500\u2500 file1\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 control.json\n \u251c\u2500\u2500 file2\n \u00a0\u00a0 \u2514\u2500\u2500 control.json\n\nWith the final ``control.json`` reading, for example::\n\n {\n \"input_file\": \"/Users/cmccoy/Development/nestly/examples/basic_nest/inputs/file3\",\n \"run_count\": \"1000\",\n \"strategy\": \"exhaustive\"\n }\n\nThe control files created then serve as inputs to ``nestrun`` for template substition, for example::\n\n nestrun --save-cmd-file command.sh \\\n --template='my_command -s {strategy} --count={run_count} {input_file}' \\\n $(find runs -name \"control.json\")\n\nThis command runs ``my_command`` in all of the tip directories with the appropriate values for the parameters.\n\nThis was a \"cartesian product\" example.\nThe \"meal\" example in the repository exhibits a setup with more complex dependencies between the nests.\n\nTemplates\n=========\n\n``nestrun`` takes a template and a list of control.json files with variables to\nsubstitute. By default, substitution is performed using the Python built-in\n``str.format`` method. See the `Python Formatter documentation`_ for details on syntax,\nand ``examples/jsonrun/do_nestrun.sh`` for an example.\n\nSCons integration\n=================\n\nThere is also a ``nestly.scons`` module to integrate nestly with the ``make`` replacement SCons_.\n\nRunning the tests\n=================\n\nRun::\n\n python setup.py test\n\nThe `mock`_ library is required, but will be downloaded if missing.\n\nPaper\n=====\n\nMcCoy CO, Gallagher A, Hoffman NG, Matsen FA (2013) nestly--a framework for running software with nested parameter choices and aggregating results. Bioinformatics 29: 387-388. `pubmed`_\n\nLicense\n=======\n\n``nestly`` source code is freely available under the `MIT License`_.\n\n.. _`Python Formatter documentation`: http://docs.python.org/library/string.html#formatstrings\n.. _`full documentation`: http://nestly.readthedocs.org/\n.. _`pip`: http://www.pip-installer.org\n.. _Scons: http://scons.org/\n.. _`MIT License`: http://www.opensource.org/licenses/mit-license.html\n.. _mock: https://pypi.python.org/pypi/mock\n.. _pubmed: http://www.ncbi.nlm.nih.gov/pubmed/23220574\n", "description_content_type": null, "docs_url": "https://pythonhosted.org/nestly/", "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/fhcrc/nestly", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "nestly", "package_url": "https://pypi.org/project/nestly/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/nestly/", "project_urls": { "Homepage": "https://github.com/fhcrc/nestly" }, "release_url": "https://pypi.org/project/nestly/0.6.1/", "requires_dist": null, "requires_python": "", "summary": "Nestly is a collection of functions designed to make running software with combinatorial choices of parameters easier.", "version": "0.6.1" }, "last_serial": 2823277, "releases": { "0.3": [ { "comment_text": "", "digests": { "md5": "379190e1747a1a0c1f3e646ff8bad65b", "sha256": "d9255c11efbed91b7dd70cbb041a7c2598c0a42cf59fa09a573567aa2c313b65" }, "downloads": -1, "filename": "nestly-0.3.tar.gz", "has_sig": false, "md5_digest": "379190e1747a1a0c1f3e646ff8bad65b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11166, "upload_time": "2012-05-17T18:48:25", "url": "https://files.pythonhosted.org/packages/f3/a6/bc2f47e6990f245b11f77495cedc203b82549be8a8956c1775e04e1809de/nestly-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "4e8ea0b8fac37ce5e4c6a6a0d1f521c3", "sha256": "7de883d24d26d101eacc33716dc67a4a8b3472b20def1f7b0b7f4f849c3b3e1e" }, "downloads": -1, "filename": "nestly-0.4.tar.gz", "has_sig": false, "md5_digest": "4e8ea0b8fac37ce5e4c6a6a0d1f521c3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13678, "upload_time": "2013-04-16T00:30:47", "url": "https://files.pythonhosted.org/packages/38/df/6781c6a4eff8c680e789384233d766db7e39276448c435072f26ac44c395/nestly-0.4.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "15cb61a3203e2e89dc4de49d2c0dba53", "sha256": "575ebaf238d439cf6c6d68a47679c2509cdaadd353398f370971a677a0048508" }, "downloads": -1, "filename": "nestly-0.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "15cb61a3203e2e89dc4de49d2c0dba53", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 32986, "upload_time": "2014-04-11T17:24:12", "url": "https://files.pythonhosted.org/packages/9c/c9/68a895586e86f606b9883888ce585fb65dfbb94bbe8813ac149c1ad59995/nestly-0.5-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1f80980058789fb7de35ec9f04935f1c", "sha256": "67f4f0cd86dfaf74585d514d703c06e73ff02f25873585fe35ccdeb39a7c3d24" }, "downloads": -1, "filename": "nestly-0.5.tar.gz", "has_sig": false, "md5_digest": "1f80980058789fb7de35ec9f04935f1c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15437, "upload_time": "2014-04-11T17:24:10", "url": "https://files.pythonhosted.org/packages/73/2a/c04221de750a7a6ffc984ef65008f4509b14a9084431d974d8a0387092ba/nestly-0.5.tar.gz" } ], "0.6": [ { "comment_text": "", "digests": { "md5": "fbe8bd91376423c9b3f1baf93cf98f0a", "sha256": "2092a5d3dcb2b4bcd19be14f4004bbf0ae92c935e15a4ac254bd223b34d5a765" }, "downloads": -1, "filename": "nestly-0.6-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "fbe8bd91376423c9b3f1baf93cf98f0a", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 18474, "upload_time": "2014-11-26T01:05:26", "url": "https://files.pythonhosted.org/packages/09/4d/36aae6ef402fe5cde9a9140490b26b1e6550fef32fb9893ae7e47931fa1c/nestly-0.6-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "eabd05db0c6b6447a720ad7f0739c741", "sha256": "209adc1ea67c124a88952dc2d2286b465a0d6516c34c2a81a834f0b094bd2ff3" }, "downloads": -1, "filename": "nestly-0.6.tar.gz", "has_sig": false, "md5_digest": "eabd05db0c6b6447a720ad7f0739c741", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15939, "upload_time": "2014-11-26T01:05:24", "url": "https://files.pythonhosted.org/packages/35/62/e7e636bd46cd1f0c0b8f54ff381f907c4040c26e49411c4203c0670e8f93/nestly-0.6.tar.gz" } ], "0.6.1": [ { "comment_text": "", "digests": { "md5": "3cde1c44c8583110cd989bb5d58b1395", "sha256": "655094e0f4c29cadbb61adccd22c8339de4e3f890a6eada67741fa375d08442e" }, "downloads": -1, "filename": "nestly-0.6.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "3cde1c44c8583110cd989bb5d58b1395", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 18498, "upload_time": "2017-04-23T12:14:00", "url": "https://files.pythonhosted.org/packages/90/30/979cf1e13afa5a6c351180f347d1bfb097909ab64e37a0897153b0662bd1/nestly-0.6.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "24760ecd002d089e4ae5df842df3f990", "sha256": "7f74a33a6ba4064ee6a7c0115eb39e517b07d64bdbc37330f365573ed0a0c43f" }, "downloads": -1, "filename": "nestly-0.6.1.tar.gz", "has_sig": false, "md5_digest": "24760ecd002d089e4ae5df842df3f990", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15809, "upload_time": "2017-04-23T12:14:02", "url": "https://files.pythonhosted.org/packages/74/80/834ae6d3a7aa75438fec5347c37c3009fef905659868c2d20881685d7d61/nestly-0.6.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3cde1c44c8583110cd989bb5d58b1395", "sha256": "655094e0f4c29cadbb61adccd22c8339de4e3f890a6eada67741fa375d08442e" }, "downloads": -1, "filename": "nestly-0.6.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "3cde1c44c8583110cd989bb5d58b1395", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 18498, "upload_time": "2017-04-23T12:14:00", "url": "https://files.pythonhosted.org/packages/90/30/979cf1e13afa5a6c351180f347d1bfb097909ab64e37a0897153b0662bd1/nestly-0.6.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "24760ecd002d089e4ae5df842df3f990", "sha256": "7f74a33a6ba4064ee6a7c0115eb39e517b07d64bdbc37330f365573ed0a0c43f" }, "downloads": -1, "filename": "nestly-0.6.1.tar.gz", "has_sig": false, "md5_digest": "24760ecd002d089e4ae5df842df3f990", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15809, "upload_time": "2017-04-23T12:14:02", "url": "https://files.pythonhosted.org/packages/74/80/834ae6d3a7aa75438fec5347c37c3009fef905659868c2d20881685d7d61/nestly-0.6.1.tar.gz" } ] }