<s> """<STR_LIT>""" <EOL> import os <EOL> import sys <EOL> from fabric . main import load_settings <EOL> from fabric . api import * <EOL> from fabric . contrib . files import * <EOL> from fabric . context_managers import path <EOL> try : <EOL> import boto <EOL> except ImportError : <EOL> boto = None <EOL> for to_remove in [ p for p in sys . path if p . find ( "<STR_LIT>" ) > <NUM_LIT:0> ] : <EOL> sys . path . remove ( to_remove ) <EOL> sys . path . append ( os . path . dirname ( __file__ ) ) <EOL> from cloudbio . utils import _setup_logging , _configure_fabric_environment <EOL> from cloudbio . biodata import genomes <EOL> env . remove_old_genomes = False <EOL> def setup_environment ( ) : <EOL> """<STR_LIT>""" <EOL> _setup_logging ( env ) <EOL> _add_defaults ( ) <EOL> _configure_fabric_environment ( env , ignore_distcheck = True ) <EOL> def _add_defaults ( ) : <EOL> """<STR_LIT>""" <EOL> env . config_dir = os . path . join ( os . path . dirname ( __file__ ) , "<STR_LIT>" ) <EOL> conf_file = "<STR_LIT>" <EOL> env . tool_data_table_conf_file = os . path . join ( os . path . dirname ( __file__ ) , <EOL> "<STR_LIT>" , conf_file ) <EOL> if not env . has_key ( "<STR_LIT>" ) : <EOL> config_file = os . path . join ( env . config_dir , "<STR_LIT>" ) <EOL> if os . path . exists ( config_file ) : <EOL> env . update ( load_settings ( config_file ) ) <EOL> CONFIG_FILE = os . path . join ( os . path . dirname ( __file__ ) , "<STR_LIT>" , "<STR_LIT>" ) <EOL> def install_data ( config_source = CONFIG_FILE ) : <EOL> """<STR_LIT>""" <EOL> setup_environment ( ) <EOL> genomes . install_data ( config_source ) <EOL> def install_data_raw ( config_source = CONFIG_FILE ) : <EOL> """<STR_LIT>""" <EOL> setup_environment ( ) <EOL> genomes . install_data ( config_source , approaches = [ "<STR_LIT>" ] ) <EOL> def install_data_s3 ( config_source = CONFIG_FILE , do_setup_environment = True ) : <EOL> """<STR_LIT>""" <EOL> setup_environment ( ) <EOL> genomes . install_data_s3 ( config_source ) <EOL> def install_data_rsync ( config_source = CONFIG_FILE ) : <EOL> """<STR_LIT>""" <EOL> setup_environment ( ) <EOL> genomes . install_data_rsync ( config_source ) <EOL> def install_data_ggd ( recipe , organism ) : <EOL> """<STR_LIT>""" <EOL> setup_environment ( ) <EOL> from cloudbio . biodata import ggd , genomes <EOL> genome_dir = os . path . join ( genomes . _make_genome_dir ( ) , organism ) <EOL> recipe_file = os . path . join ( os . path . dirname ( __file__ ) , "<STR_LIT>" , organism , "<STR_LIT>" % recipe ) <EOL> ggd . install_recipe ( genome_dir , recipe_file ) <EOL> def upload_s3 ( config_source = CONFIG_FILE ) : <EOL> """<STR_LIT>""" <EOL> setup_environment ( ) <EOL> genomes . upload_s3 ( config_source ) </s>
