def _setup_distribution_environment(ignore_distcheck=False): """Setup distribution environment """ env.logger.info("Distribution %s" % env.distribution) if env.hosts == ["vagrant"]: _setup_vagrant_environment() elif env.hosts == ["localhost"]: _setup_local_environment() if env.distribution == "ubuntu": _setup_ubuntu() elif env.distribution == "centos": _setup_centos() elif env.distribution == "scientificlinux": _setup_scientificlinux() elif env.distribution == "debian": _setup_debian() else: raise ValueError("Unexpected distribution %s" % env.distribution) configure_runsudo(env) if not ignore_distcheck: _validate_target_distribution(env.distribution, env.get('dist_name', None)) _cloudman_compatibility(env) _setup_nixpkgs() _setup_fullpaths(env) # allow us to check for packages only available on 64bit machines machine = env.safe_run_output("uname -m") env.is_64bit = machine.find("_64") > 0
def _setup_distribution_environment(ignore_distcheck=False): """Setup distribution environment. In low-level terms, this method attempts to populate various values in the fabric env data structure for use other places in CloudBioLinux. """ if "distribution" not in env: env.distribution = "__auto__" if "dist_name" not in env: env.dist_name = "__auto__" env.logger.info("Distribution %s" % env.distribution) if env.hosts == ["vagrant"]: _setup_vagrant_environment() elif env.hosts == ["localhost"]: _setup_local_environment() configure_runsudo(env) if env.distribution == "__auto__": env.distribution = _determine_distribution(env) if env.distribution == "ubuntu": ## TODO: Determine if dist_name check works with debian. if env.dist_name == "__auto__": env.dist_name = _ubuntu_dist_name(env) _setup_ubuntu() elif env.distribution == "centos": _setup_centos() elif env.distribution == "scientificlinux": _setup_scientificlinux() elif env.distribution == "debian": if env.dist_name == "__auto__": env.dist_name = _debian_dist_name(env) _setup_debian() elif env.distribution == "arch": pass # No package support for Arch yet elif env.distribution == "suse": pass # No package support for SUSE yet elif env.distribution == "macosx": _setup_macosx(env) ignore_distcheck = True else: raise ValueError("Unexpected distribution %s" % env.distribution) if not ignore_distcheck: _validate_target_distribution(env.distribution, env.get('dist_name', None)) _cloudman_compatibility(env) _setup_nixpkgs() _setup_fullpaths(env) # allow us to check for packages only available on 64bit machines machine = env.safe_run_output("uname -m") env.is_64bit = machine.find("_64") > 0
parser.add_argument("-n", "--name", required=True, help="Name of genome.") parser.add_argument("-b", "--build", required=True, help="Build of genome.") parser.add_argument("-d", "--genome-dir", required=True, help="Path to bcbio-nextgen genomes directory.") parser.add_argument("-i", "--indexes", choices=genomes.INDEX_FNS.keys(), nargs="*", required=True, help="List of indexes to make") parser.add_argument("-p", "--picard-dir", default=None, help="Path to Picard installation") parser.add_argument("--prepare-tx", default=None, help="Path to prepare_tx_gff.py (in utils/cloudbiolinux)") args = parser.parse_args() fabutils.configure_runsudo(env) args.genome_dir = os.path.abspath(args.genome_dir) args.fasta = os.path.abspath(args.fasta) args.gtf = os.path.abspath(args.gtf) if args.gtf else None env.system_install = args.genome_dir print "Creating directories using %s as the base." % (args.genome_dir) build_dir = setup_base_directories(args.genome_dir, args.name, args.build, args.gtf) os.chdir(build_dir) print "Genomes will be installed into %s." % (build_dir) fasta_file = install_fasta_file(build_dir, args.fasta, args.build) print "Installed genome as %s." % (fasta_file) if args.gtf: gtf_file = install_gtf_file(build_dir, args.gtf, args.build)
choices=genomes.INDEX_FNS.keys(), nargs="*", required=True, help="List of indexes to make") parser.add_argument("-p", "--picard-dir", default=None, help="Path to Picard installation") parser.add_argument( "--prepare-tx", default=None, help="Path to prepare_tx_gff.py (in utils/cloudbiolinux)") args = parser.parse_args() env.hosts = ["localhost"] fabutils.configure_runsudo(env) args.genome_dir = os.path.abspath(args.genome_dir) args.fasta = os.path.abspath(args.fasta) args.gtf = os.path.abspath(args.gtf) if args.gtf else None env.system_install = args.genome_dir print "Creating directories using %s as the base." % (args.genome_dir) build_dir = setup_base_directories(args.genome_dir, args.name, args.build, args.gtf) os.chdir(build_dir) print "Genomes will be installed into %s." % (build_dir) fasta_file = install_fasta_file(build_dir, args.fasta, args.build) print "Installed genome as %s." % (fasta_file) if args.gtf: gtf_file = install_gtf_file(build_dir, args.gtf, args.build)