-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgenerate_bar_graphs.html
24 lines (22 loc) · 1.34 KB
/
generate_bar_graphs.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
<br>
Making graphs for <% $species %>
<%perl>
my $boot_table = "boot_$species";
my $mt = "mfe_$species";
my $points_stmt = qq"SELECT $mt.mfe, $boot_table.zscore, $mt.accession, $mt.knotp, $mt.slipsite, $mt.start, genome.genename FROM $mt, $boot_table, genome 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 = $seqlength AND $mt.id = $boot_table.mfe_id AND $mt.genome_id = genome.id";
my $averages_stmt = qq"SELECT avg($mt.mfe), avg($boot_table.zscore), stddev($mt.mfe), stddev($boot_table.zscore) 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 = $seqlength AND $mt.id = $boot_table.mfe_id";
my $points = $db->MySelect(statement => $points_stmt);
my $averages = $db->MySelect(statement => $averages_stmt, type => 'row');
my $cloud = new PRFGraph(config=>$config);
my $cloud_data = $cloud->Make_Cloud(seqlength => $seqlength,
species => $species,
points => $points,
averages => $averages,
filename => qq"$ENV{PRFDB_HOME}/images/cloud/$species/cloud-all-AAAAAAA-100.png",
url => $ENV{PRFDB_HOME},
slipsites => 'AAAAAAA',);
</%perl>
<%args>
$species => "saccharomyces_cerevisiae"
$seqlength => 100
</%args>