Skip to content

Commit c56c28f

Browse files
committed
microarray percentile summary from dcallan
1 parent 4c1232a commit c56c28f

File tree

1 file changed

+66
-0
lines changed

1 file changed

+66
-0
lines changed
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
package ApiCommonWebsite::View::GraphPackage::Templates::MicroarrayPercentileSummary;
2+
3+
use strict;
4+
use vars qw( @ISA );
5+
6+
@ISA = qw( ApiCommonWebsite::View::GraphPackage::Templates::Expression );
7+
use ApiCommonWebsite::View::GraphPackage::Templates::Expression;
8+
use Data::Dumper;
9+
use LWP::Simple;
10+
use JSON;
11+
12+
# @Override
13+
sub getAllProfileSetNames {
14+
my ($self) = @_;
15+
16+
my $id = $self->getId();
17+
18+
my @rv = ();
19+
20+
my $url = $self->getBaseUrl() . '/a/service/profileSet/MicroarraySummaryProfiles/' . $id;
21+
my $content = get($url);
22+
my $json = from_json($content);
23+
foreach my $profile (@$json) {
24+
my $profileName = $profile->{'PROFILE_SET_NAME'};
25+
my $displayName = $profile->{'DISPLAY_NAME'};
26+
my $profileType = $profile->{'PROFILE_TYPE'};
27+
next if($self->isExcludedProfileSet($profileName));
28+
my $p = {profileName=>$profileName, profileType=>$profileType, displayName=>$displayName};
29+
push @rv, $p;
30+
}
31+
32+
return \@rv;
33+
}
34+
35+
36+
# @Override
37+
# so as not to sort plotprofiles
38+
sub orderPlotProfiles {
39+
my ($self, $plotProfiles) = @_;
40+
return $plotProfiles;
41+
}
42+
43+
# avoid any specific logic in Expression around percentile profiles
44+
sub getKey {
45+
return "microarray_summary";
46+
}
47+
48+
1;
49+
50+
51+
package ApiCommonWebsite::View::GraphPackage::Templates::MicroarrayPercentileSummary::All;
52+
use base qw( ApiCommonWebsite::View::GraphPackage::Templates::MicroarrayPercentileSummary );
53+
54+
use strict;
55+
56+
sub getGraphType { 'line' }
57+
sub excludedProfileSetsString { '' }
58+
sub getSampleLabelsString { '' }
59+
sub getColorsString { 'black' }
60+
sub getForceXLabelsHorizontalString { 'true' }
61+
sub getBottomMarginSize { 0 }
62+
sub getExprPlotPartModuleString { 'MicroarrayPercentileSummary' }
63+
sub getXAxisLabel { 'Percentile - Sample 1' }
64+
sub useLegacy { return 0; }
65+
66+
1;

0 commit comments

Comments
 (0)