How to Create a Comparison of Chromosomal Regions for a Set of PEGs

There are points where you might wish to get code to display regions surrounding a set of PEGs. If you find yourself in that position try the following:
$ENV{'REQUEST_METHOD'} = 'GET';

# @pegs should contain the list of PEGs.

$parms = 'sim_cutoff=1.0e-5&pinned_to=' . join('&pinned_to=',@pegs);
$ENV{'QUERY_STRING'} = $parms;
@out = `./chromosomal_clusters.cgi 2> /dev/null`;
for ($i=$#out; ($i >= 0) && ($out[$i] !~ /^Content-Type/); $i--) {}
splice(@out,0,$i);
At this point @out should contain the HTML required to show the regions.