Most of the heavy lifting has already been done to use IGV as a display application in Galaxy (by the wonderful folks on the Galaxy Team), but there is a bit of configuration that needs to be done to make it all work. The configuration depends on your specific setup, and in our case we have Galaxy running locally on a CentOS box, with Apache as a proxy server, and we're using our institution's CAS system as external authentication for Galaxy.
There are a few requirements that must be met for Galaxy and IGV to talk properly.
<display file="igv/bam.xml" />
<LocationMatch ^/display_application/[a-zA-Z0-9]+/igv.*>
RequestHeader set REMOTE_USER igv_display@example.org
Satisfy Any
Order deny,allow
Allow from all
</LocationMatch>
LocationMatch
matches incoming requests by IGV for the bam files. Only requests that match the regular expression will have the additional rules applied. Other requests are authenticated by CAS as usual.RequestHeader
is setting the header REMOTE_USER to igv_display@example.org so that Galaxy will think that user has been authenticated. This is similar to how the UCSC browser authenticates, except that lib/galaxy/web/framework/middleware/remoteuser.py
includes some code to set REMOTE_USER when the incoming servers are one of the UCSC genome browsers.Satisfy Any
tells Apache to allow requests that statisfy either the CAS authentication specified earlier or the Allow rules in this LocationMatch
directive.Allow from all
tells Apache to allow any IP address access.