Module Expr Str Import alias Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias alias FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore BinOpMod Str TupleLoad NameLoad NameLoad Assign NameStore BinOpMod Str TupleLoad NameLoad NameLoad Assign NameStore BinOpMod Str TupleLoad NameLoad NameLoad Assign NameStore BinOpMod Str TupleLoad NameLoad NameLoad Assign NameStore BinOpMod Str Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad SubscriptLoad NameLoad Index Str With Call AttributeLoad NameLoad attr NameLoad body With Call NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad keyword NameLoad With Call NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad keyword NameLoad With Call NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr keyword NameLoad keyword Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad keyword Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If NameLoad body Expr Call NameLoad NameLoad NameLoad NameLoad orelse Expr Call AttributeLoad NameLoad attr ListLoad Str Str NameLoad NameLoad NameLoad NameLoad Str Assign NameStore ListLoad Str Str SubscriptLoad NameLoad Index Str Str Call NameLoad Call NameLoad BinOpMult Call NameLoad SubscriptLoad NameLoad Index Str Num Str Call NameLoad SubscriptLoad NameLoad Index Str Str Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad For NameStore ListLoad BinOpMod Str NameLoad body AugAssignAdd NameStore ListLoad Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str With Call NameLoad Call AttributeLoad NameLoad attr NameLoad SubscriptLoad NameLoad Index Str NameStore body Assign NameStore Call AttributeLoad NameLoad attr NameLoad For NameStore ListLoad NameLoad NameLoad NameLoad NameLoad NameLoad body If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad With Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr ListLoad Str Str NameLoad NameLoad NameLoad decorator_list Assign NameStore Str
N/A N/A Run individual tasks within the Clusterk framework.
 N/A os N/A shutil N/A subprocess N/A uuid N/A yaml bcbio utils bcbio.provenance do bcbiovm.ship pack reconstitute runfn N/A N/A fn_name queue wrap_args parallel run_args N/A N/A N/A Run external function submitting to existing queue.
     N/A testing True N/A run_id N/A N/A uuid uuid4 N/A work_dir N/A N/A os getcwd N/A script_file N/A bcbio-%s-%s-run.sh N/A fn_name run_id N/A arg_file N/A bcbio-%s-%s-args.json N/A fn_name run_id N/A parallel_file N/A bcbio-%s-%s-parallel.json N/A fn_name run_id N/A tarball N/A bcbio-%s-%s.tar.gz N/A fn_name run_id N/A out_file N/A %s-out%s N/A N/A N/A os path splitext arg_file N/A run_args N/A N/A pack send_run run_args N/A parallel N/A pack N/A N/A N/A utils chdir work_dir N/A N/A N/A open arg_file w out_handle N/A N/A N/A N/A yaml safe_dump run_args out_handle default_flow_style False allow_unicode False N/A N/A open parallel_file w out_handle N/A N/A N/A N/A yaml safe_dump parallel out_handle default_flow_style False allow_unicode False N/A N/A open script_file w out_handle N/A N/A N/A N/A out_handle write N/A N/A _bootstrap_sh format fn_name fn_name arg_file N/A N/A N/A os path basename arg_file parallel_file N/A N/A N/A os path basename parallel_file N/A testing N/A N/A N/A _test_clusterk fn_name parallel_file arg_file N/A N/A N/A N/A do run N/A tar -czvpf tarball script_file arg_file parallel_file Prepare submission tarball N/A cmd N/A ksub.py -q N/A queue N/A queue -e N/A str N/A int N/A N/A float N/A queue N/A mem 1024 -c N/A str N/A queue N/A cores_per_job -u N/A N/A N/A os path abspath tarball N/A N/A N/A os path basename script_file N/A tag N/A N/A fnname=%s fn_name N/A N/A cmd N/A --tag tag N/A N/A N/A do run cmd Submit to clusterk N/A N/A open N/A N/A reconstitute get_output out_file N/A parallel N/A pack in_handle N/A N/A out N/A N/A yaml safe_load in_handle N/A f N/A script_file parallel_file arg_file tarball out_file N/A N/A N/A N/A N/A os path exists f N/A N/A N/A N/A os remove f N/A out N/A _test_clusterk N/A N/A fn_name parallel_file arg_file N/A N/A N/A Do local runs of equivalent
     N/A test_dir N/A N/A utils safe_makedir N/A N/A N/A os path expanduser ~/tmp/bcbiotest N/A N/A N/A shutil copy parallel_file test_dir N/A N/A N/A shutil copy arg_file test_dir N/A N/A N/A utils chdir test_dir N/A N/A N/A N/A subprocess check_call N/A bcbio_vm.py runfn fn_name parallel_file arg_file N/A N/A _bootstrap_sh 
# Bootstrap a bcbio-nextgen-vm installation on a bare Ubuntu machine
# Targets recent Ubuntu versions (Ubuntu 13.10, Ubuntu 14.04)

# Install Docker
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
sudo sh -c "echo deb http://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list"
sudo apt-get update
sudo apt-get install lxc-docker

# Install bcbio-nextgen-vm
sudo apt-get install wget
sudo mkdir /usr/local/share/bcbio-vm
sudo chown $USER /usr/local/share/bcbio-vm
wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh
bash Miniconda-latest-Linux-x86_64.sh -b -p /usr/local/share/bcbio-vm/anaconda
/usr/local/share/bcbio-vm/anaconda/bin/conda install -y -c bioconda bcbio-nextgen-vm
sudo ln -s /usr/local/share/bcbio-vm/anaconda/bin/bcbio_vm.py /usr/local/bin/bcbio_vm.py
sudo bcbio_vm.py install --tools

# Run bcbio-vm
bcbio_vm.py runfn {fn_name} {parallel_file} {arg_file}
