-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathoverlay.html
57 lines (53 loc) · 2.16 KB
/
overlay.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
% my $query = $overlayquery;
% $query =~ s/\s+//g;
% my $boot_table = qq"boot_$species";
% my $mt = "mfe_$species";
% my $new_accession = $db->MySelect({statement => qq/SELECT accession FROM genome WHERE accession regexp '$query' or genename regexp '$query' or or comment regexp '$query'/, type => 'single'});
% my $query_statement = qq"SELECT $mt.mfe, $boot_table.zscore, $mt.start, $mt.mfe_method FROM $mt,$boot_table WHERE $boot_table.zscore IS NOT NULL AND $mt.mfe > -80 AND $mt.mfe < 5 AND $boot_table.zscore > -10 AND $boot_table.zscore < 10 AND $mt.seqlength = 100 AND $mt.id = $boot_table.mfe_id AND $mt.accession = '$new_accession'";
% my $overlay_points = $db->MySelect(statement => $query_statement,);
% my $cloud_url = qq"images/cloud/${species}/cloud-${slipsites}-${seqlength}.png";
% my $image_dir = "$ENV{PRFDB_HOME}/images/tmp";
% my $overlay_output = PRFdb::MakeTempfile(directory => $image_dir, SUFFIX => '.png', template => 'cloud_XXXXX',);
% my $overlay_map = qq"${overlay_output}.map";
% my @t = split(/\//, $overlay_output);
% my $short_overlay = pop @t;
% my $overlay_url = qq"images/tmp/$short_overlay";
% my $args = {
% seqlength => 100,
% url => qq"images/",
% species => $species,
% points => $overlay_points,
% filename => $overlay_output,
% map => $overlay_map,
% accession => $new_accession,
%# inputstring => $inputstring,
% };
% my $cloud = new PRFGraph(config => $config);
% my $overlay_data = $cloud->Make_Overlay(%{$args});
<center>
<p>This is a cloud for <i><% $species %></i> with an overlay for <% $new_accession %>
<br>
<div style="position: absolute; z-index:100">
<img src="<% $cloud_url %>" usemap="#map">
</div>
<div style="position: absolute; z-index:5000">
<img src="<% $overlay_url %>" usemap="#overlaymap">
</div>
</center>
<div>
<br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br>
<br><br><br><br>
<br>
% open(OUT, "<$overlay_map");
% while (my $l = <OUT>) { print $l };
% close(OUT);
<%args>
$species => undef
$seqlength => undef
$slipsites => undef
$cloud_filters => undef
$overlayquery => undef
</%args>