def install_galaxy_vcr(env):
	with cd("~"):
		print("Installing galaxy VCR tools (python and xml scripts).")
		sudo("git clone git://github.com/JCVI-Cloud/galaxy-tools-vcr.git")
		sudo("cp -R galaxy-tools-vcr/tools/viral_assembly_annotation %s" % galaxy_VCR_path)
		sudo("chown -R galaxy:galaxy %s" % galaxy_VCR_path)
	with cd(galaxy_central):
		print("Adding VCR to tool_conf.xml.")
		tcx_file = "tool_conf.xml"
		_set_pre_VCR(tcx_file,"galaxy","galaxy")
		tcx_string = _get_file_string(tcx_file,galaxy_central)
		
		vcr_header = "<section name=\"Viral Assembly and Annotation\" id=\"viral_assembly_annotation\">\""
		if (tcx_string.find(vcr_header) != -1):
			print("Galaxy VCR tools already included in tools_conf.xml!")
		else:
			sudo("sed -i '$d' %s/%s" % (galaxy_central,tcx_file))
			sudo("echo -e '  <section name=\"Viral Assembly and Annotation\" id=\"viral_assembly_annotation\">' >> %s" % tcx_file)
			sudo("echo -e '    <tool file=\"viral_assembly_annotation/viral_assembly.xml\" />' >> %s" % tcx_file)
			sudo("echo -e '    <tool file=\"viral_assembly_annotation/VIGOR.xml\" />' >> %s" % tcx_file)
			sudo("echo -e '  </section>' >> %s" % tcx_file)
			sudo("echo -e '</toolbox>' >> %s" % tcx_file)
		
		print("Adding 'sanitize_all_html = False' to universe_wsgi.ini to enable JBrowse for VICVB.")
		uwi_file = "universe_wsgi.ini"
		_set_pre_VCR(uwi_file,"galaxy","galaxy")
		uwi_string = _get_file_string(uwi_file,galaxy_central)
		
		if (uwi_string.find("sanitize_all_html") != -1):
			print("Setting sanitize_all_html in %s to False." % uwi_file)
			sudo("sed -i '/^sanitize_all_html/c\sanitize_all_html = False' %s" % uwi_file)
		else:
			print("No sanitize_all_html present! Adding...")
			sudo("sed -i '/^\[app:main\]/a\\\nsanitize_all_html = False' %s" % uwi_file)


# Viral Assembly
dataset/ETHPy150Open chapmanb/cloudbiolinux/cloudbio/custom/vcr.py/install_galaxy_vcr/original