[Bio] / FigWebServices / show_pegs.cgi Repository:
ViewVC logotype

Annotation of /FigWebServices/show_pegs.cgi

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (view) (download)

1 : olson 1.1
2 :     use FIG;
3 :     use CGI;
4 :     use strict;
5 :     use Data::Dumper;
6 :    
7 :     my $fig = new FIG;
8 :    
9 :     my $cgi = new CGI;
10 :    
11 :     my @pegs = $cgi->param("pegs");
12 :    
13 :     my @expt = $cgi->param("experiment");
14 :    
15 :     my @locs = $fig->feature_location_bulk(\@pegs);
16 :    
17 :     my $genome = $fig->genome_of($pegs[0]);
18 :    
19 :     my($contig, $min, $max) = $fig->boundaries_of($locs[0]->[1]);
20 :     ($min, $max) = ($max, $min) if $min > $max;
21 :    
22 :     for my $loc (map { $_->[1] } @locs[1..$#locs])
23 :     {
24 :     my ($contig, $beg, $end) = $fig->boundaries_of($loc);
25 :     ($beg, $end) = ($end, $beg) if $beg > $end;
26 :     $min = $beg if $beg < $min;
27 :     $max = $end if $end > $max;
28 :     }
29 :    
30 :     $min -= 100;
31 :     $min = 0 if $min < 0;
32 :     $max += 100;
33 :    
34 :     my $expts = join(",", map { "probes_$_" } @expt);
35 :     my $url = "http://bioseed.mcs.anl.gov/ross/FIG-Tmp/jbrowse/$genome/?loc=$genome:$contig:$min..$max&tracks=DNA,features,$expts";
36 :     print "$url\n";

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3