Module Expr Str Import alias Import alias ImportFrom alias Import alias Import alias Import alias ImportFrom alias Import alias FunctionDef arguments args NameParam NameParam defaults body Expr Str Assert CompareEq AttributeLoad NameLoad attr ListLoad Str Str If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad If UnaryOpNot Call NameLoad NameLoad NameLoad body If Call NameLoad Call AttributeLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str attr Str ListLoad body With Call NameLoad NameLoad NameStore body With Call NameLoad NameLoad body Print BinOpMod Str SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Expr Call NameLoad NameLoad SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Index Str SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Index Str Expr Call NameLoad NameLoad NameLoad SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Index Str Expr Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str FunctionDef arguments args NameParam defaults body Return BoolOpAnd Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr decorator_list For NameStore NameLoad body Assign NameStore NameLoad For NameStore Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Str attr AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad If Call NameLoad NameLoad body Assign NameStore NameLoad Break If UnaryOpNot NameLoad body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assert CompareEq NameLoad Str Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str With Call NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr BinOpMod Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad NameLoad attr ListLoad Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body For NameStore NameLoad body If Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad body Assign NameStore ListComp Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad comprehension NameStore Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad orelse Assign NameStore ListLoad NameLoad For NameStore NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assert Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad BinOpMod Str TupleLoad NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad With Call NameLoad NameLoad NameStore body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Return BoolOpAnd CompareIn SubscriptLoad SubscriptLoad NameLoad Index Str Index Str NameLoad CompareGtE Call NameLoad SubscriptLoad NameLoad Index SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Call NameLoad Call NameLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call NameLoad NameLoad Assign SubscriptStore NameLoad Index SubscriptLoad SubscriptLoad NameLoad Index Str Index Str SubscriptLoad SubscriptLoad NameLoad Index Str Index Str With Call NameLoad Call NameLoad NameLoad Str NameStore body For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body With Call NameLoad NameLoad NameStore body For NameStore NameLoad body Assign TupleStore NameStore NameStore Call AttributeLoad Call AttributeLoad NameLoad attr attr Str Assign SubscriptStore NameLoad Index NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Expr Yield NameLoad Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad TryFinally body Expr Yield finalbody Expr Call AttributeLoad NameLoad attr NameLoad decorator_list AttributeLoad NameLoad attr
N/A N/A Process GGD (Get Genomics Data) configurations for installation in biodata directories.

Builds off work done by Aaron Quinlan to define and install genomic data:

https://github.com/arq5x/ggd
 N/A collections N/A contextlib distutils.version LooseVersion N/A os N/A shutil N/A subprocess fabric.api env N/A yaml install_recipe N/A N/A base_dir recipe_file N/A N/A N/A Install data in a biodata directory given instructions from GGD YAML recipe.
     N/A N/A N/A env hosts N/A localhost GGD recipes only work for local runs N/A N/A N/A N/A N/A os path exists base_dir N/A N/A N/A N/A os makedirs base_dir N/A recipe N/A _read_recipe recipe_file N/A N/A N/A version_uptodate base_dir recipe N/A N/A N/A _has_required_programs N/A N/A N/A N/A recipe N/A recipe N/A full get required N/A N/A N/A N/A tx_tmpdir base_dir tmpdir N/A N/A N/A chdir tmpdir N/A N/A N/A Running GGD recipe: %s N/A N/A recipe N/A attributes N/A name N/A N/A _run_recipe tmpdir N/A N/A N/A recipe N/A recipe N/A full N/A recipe_cmds N/A N/A N/A recipe N/A recipe N/A full N/A recipe_type N/A N/A _move_files tmpdir base_dir N/A N/A N/A recipe N/A recipe N/A full N/A recipe_outfiles N/A N/A add_version base_dir recipe N/A _has_required_programs N/A N/A programs N/A N/A N/A Ensure the provided programs exist somewhere in the current PATH.

    http://stackoverflow.com/questions/377017/test-if-executable-exists-in-python
     is_exe N/A N/A fpath N/A N/A N/A N/A N/A N/A N/A os path isfile fpath N/A N/A os access fpath N/A os X_OK N/A N/A p programs N/A N/A found False N/A path N/A N/A N/A N/A os environ N/A PATH split N/A os pathsep N/A N/A path N/A N/A path strip " N/A exe_file N/A N/A N/A os path join path p N/A N/A is_exe exe_file N/A N/A found True N/A N/A N/A found N/A N/A False N/A True N/A _run_recipe N/A N/A work_dir recipe_cmds recipe_type N/A N/A N/A Create a bash script and run the recipe to download data.
     N/A N/A recipe_type bash Can only currently run bash recipes N/A run_file N/A N/A N/A os path join work_dir ggd-run.sh N/A N/A open run_file w out_handle N/A N/A N/A N/A out_handle write N/A #!/bin/bash
set -eu -o pipefail
export PATH=%s/bin:$PATH
 N/A env system_install N/A N/A N/A out_handle write N/A N/A join recipe_cmds N/A N/A N/A subprocess check_output N/A bash run_file N/A _move_files N/A N/A tmp_dir final_dir targets N/A N/A N/A target targets N/A N/A N/A N/A N/A os path isdir N/A N/A N/A os path join tmp_dir target N/A N/A out_files N/A N/A N/A N/A os path join target f N/A f N/A N/A os listdir N/A N/A N/A os path join tmp_dir target N/A N/A out_files N/A target N/A out_file out_files N/A N/A orig N/A N/A N/A os path join tmp_dir out_file N/A final N/A N/A N/A os path join final_dir out_file N/A N/A N/A N/A os path exists orig N/A Did not find expected output file %s in %s N/A out_file tmp_dir N/A cur_dir N/A N/A N/A os path dirname final N/A N/A N/A N/A N/A os path exists cur_dir N/A N/A N/A N/A os makedirs cur_dir N/A N/A N/A N/A os path exists final N/A N/A N/A N/A os remove final N/A N/A N/A shutil move orig final N/A _read_recipe N/A N/A in_file N/A N/A N/A in_file N/A N/A N/A os path abspath N/A N/A N/A os path expanduser in_file N/A N/A open in_file in_handle N/A N/A recipe N/A N/A yaml safe_load in_handle N/A recipe N/A version_uptodate N/A N/A base_dir recipe N/A N/A N/A Check if we have an up to date GGD installation in this directory.
     N/A versions N/A _get_versions base_dir N/A N/A N/A N/A N/A recipe N/A attributes N/A name versions N/A N/A LooseVersion N/A versions N/A N/A N/A recipe N/A attributes N/A name N/A LooseVersion N/A str N/A N/A recipe N/A attributes N/A version N/A add_version N/A N/A base_dir recipe N/A N/A N/A versions N/A _get_versions base_dir N/A N/A versions N/A N/A N/A recipe N/A attributes N/A name N/A N/A recipe N/A attributes N/A version N/A N/A open N/A _get_version_file base_dir w out_handle N/A N/A N/A n v N/A N/A versions items N/A N/A N/A N/A out_handle write N/A %s,%s
 N/A n v N/A _get_versions N/A N/A base_dir N/A N/A N/A version_file N/A _get_version_file base_dir N/A versions N/A N/A collections OrderedDict N/A N/A N/A N/A os path exists version_file N/A N/A N/A open version_file in_handle N/A N/A line in_handle N/A N/A N/A name version N/A N/A N/A N/A line strip split , N/A N/A versions N/A name version N/A versions N/A _get_version_file N/A N/A base_dir N/A N/A N/A N/A N/A N/A os path join base_dir versions.csv N/A tx_tmpdir N/A N/A base_dir N/A N/A N/A Context manager to create and remove a transactional temporary directory.
     N/A tmp_dir N/A N/A N/A os path join base_dir txtmp N/A N/A N/A N/A N/A os path exists tmp_dir N/A N/A N/A N/A os makedirs tmp_dir N/A N/A tmp_dir N/A N/A N/A shutil rmtree tmp_dir ignore_errors True N/A N/A contextlib contextmanager chdir N/A N/A new_dir N/A N/A N/A Context manager to temporarily change to a new directory.

    http://lucentbeing.com/blog/context-managers-and-the-with-statement-in-python/
     N/A cur_dir N/A N/A os getcwd N/A N/A N/A os chdir new_dir N/A N/A N/A N/A N/A N/A N/A N/A os chdir cur_dir N/A N/A contextlib contextmanager