code: def upgrade_bcbio_data(args, remotes):
      
      if hasattr(args, "datadir") and args.datadir and os.path.exists(args.datadir):
          data_dir = args.datadir
      else:
          data_dir = _get_data_dir()
      tooldir = args.tooldir or get_defaults().get("tooldir")
      galaxy_home = os.path.join(data_dir, "galaxy")
      cbl = get_cloudbiolinux(remotes)
      tool_data_table_conf_file = os.path.join(cbl["dir"], "installed_files", "tool_data_table_conf.xml")
      genome_opts = _get_biodata(cbl["biodata"], args)
      sys.path.insert(0, cbl["dir"])
      cbl_genomes = __import__("cloudbio.biodata.genomes", fromlist=["genomes"])
      cbl_genomes.install_data_local(genome_opts, tooldir, data_dir, galaxy_home, tool_data_table_conf_file,
                                     args.cores, ["ggd", "s3", "raw"])
      _upgrade_genome_resources(galaxy_home, remotes["genome_resources"])
      _upgrade_snpeff_data(galaxy_home, args, remotes)
      if "vep" in args.datatarget:
          _upgrade_vep_data(galaxy_home, tooldir)
      if "kraken" in args.datatarget:
          _install_kraken_db(_get_data_dir(), args)
      if args.cwl:
          _prepare_cwl_tarballs(data_dir)
docs: Upgrade required genome data files in place.