annotate bin/html.pm @ 61:9185ca0a7b43 draft

Updated package according to recommendations.
author pierre.pouchin
date Wed, 16 Jan 2019 08:18:13 -0500
parents 9645d995fb3c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
61
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
1 package html;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
2
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
3 use strict;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
4 use warnings;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
5 use File::Basename;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
6
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
7 use Exporter;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
8 our @ISA = qw( Exporter );
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
9 our @EXPORT_OK = qw( &main_page &details_pages &menu_page &ppp_page );
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
10
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
11 sub main_page
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
12 {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
13 my ( $dir, $file, $list_mainTabP, $current, $ma, $ma_uni, $dir_root ) = @_;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
14 my ( $futHashP, $uniqueTabP, $randTabP, $pngTabP ) = get_genome ( $dir, $dir_root );
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
15
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
16 open my $h, '>', $file || die "cannot create $file $!\n";
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
17 header ( $h );
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
18 navbar ( $h, $list_mainTabP, $current );
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
19 print $h "<div class=\"container\"><p><a class=\"btn\" href=\"$current-sub.html\">View details &raquo;</a></p></div>\n";
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
20 futurette( $h, $current, $pngTabP, $futHashP );
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
21 print $h "<div class=\"container\"><h2>mappers #: $ma</h2><h2>unique mappers #: $ma_uni</h2> </div>\n";
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
22 carousel2( $h, $uniqueTabP, $randTabP, $dir_root );
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
23 footer($h);
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
24 close $h;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
25 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
26
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
27 sub menu_page
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
28 {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
29 my ( $dir, $file, $list_mainTabP, $current, $min, $max, $simin, $simax, $pimin, $pimax, $dir_root ) = @_;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
30 my $html_ref = $1 if $dir =~ /$dir_root(.*)/;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
31 open my $h, '>', $file || die "cannot create $file $!\n";
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
32 header($h);
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
33 navbar ( $h, $list_mainTabP, $current );
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
34 span( $h, $current, $min, $max, $simin, $simax, $pimin, $pimax );
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
35 print $h " <div class=\"container\"> <div class=\"row text-center\"> <img src=\"$html_ref/pie_chart.png\"/><br />\n";
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
36 print $h " <A HREF=\"$html_ref/repartition.txt\">text file</A><br/>\n </div></div>";
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
37 footer($h);
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
38 close $h;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
39 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
40
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
41 sub details_pages
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
42 {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
43 my ( $dir_details, $prefix, $list_mainTabP, $current, $misTE, $dir_root, $ppp ) = @_;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
44 my ($Hex, $HTE, $HG, $NonUniTE, $NonUniG, $UniG ) = get_subgroups( $dir_details, $current, $misTE, $dir_root );
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
45
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
46 my $html_ref = $1.'-PPP.html' if $prefix =~ /$dir_root(.*)/;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
47 open my $h, '>', $prefix.'-TEs.html' || die "cannot create $prefix-TEs.html $!\n";
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
48 header($h);
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
49 navbar ( $h, $list_mainTabP, $current );
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
50 if ( $prefix =~ /piRNAs$/ && $ppp eq 'true' )
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
51 {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
52 print $h " <div class=\"container\">";
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
53 print $h " <p><a class=\"btn\" href=\"$html_ref\">Ping Pong Partners</a></p>\n";
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
54 print $h "</div>";
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
55 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
56 fut($h,'Transposable elements',$HTE);
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
57 carousel($h,$NonUniTE,$dir_root);
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
58 footer($h);
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
59 close $h;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
60
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
61 open $h, '>', $prefix.'-genome.html' || die "cannot create $prefix-genome.html $!\n";
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
62 header($h);
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
63 navbar ( $h, $list_mainTabP, $current );
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
64 fut($h,'Genome',$HG);
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
65 carousel2($h,$UniG, $NonUniG,$dir_root);
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
66 footer($h);
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
67 close $h;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
68
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
69 open $h, '>', $prefix.'-transcripts.html' || die "cannot create $prefix-transcripts.html $!\n";
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
70 header($h);
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
71 navbar ( $h, $list_mainTabP, $current );
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
72 fut($h,'transcripts',$Hex);
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
73 footer($h);
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
74 close $h;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
75 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
76
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
77 sub ppp_page
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
78 {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
79 my ( $dir, $file, $list_mainTabP, $current, $ppp, $dir_root ) = @_;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
80
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
81 my $ppp_file = $ppp.'ppp.txt';
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
82 open my $h, '>', $file || die "cannot create $file $!\n";
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
83 header($h);
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
84 navbar ( $h, $list_mainTabP, $current );
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
85 print $h '<div class="container"> <table class="wb-tables table table-striped table-hover">'."\n";
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
86 print $h '<thead>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
87 <tr>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
88 <th data-sortable="true">ID</th>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
89 <th data-sortable="true">overlap sum</th>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
90 <th data-sortable="true">ten overlap sum</th>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
91 <th data-sortable="true">mean</th>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
92 <th data-sortable="true">standard deviation</th>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
93 <th data-sortable="true">z-score</th>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
94 <th data-sortable="true">p-value</th>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
95 </tr>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
96 </thead>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
97 <tbody>';
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
98
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
99 open my $f, '<', $ppp_file || die "cannot open $ppp_file $!\n";
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
100 while ( <$f> )
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
101 {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
102 chomp;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
103 print $h '<tr>';
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
104 my ( $id, $sum, $ten, $mean, $sd, $zscore, $prob) = split /\t/, $_;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
105 if( -d "$ppp/$id" )
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
106 {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
107 my $sub_html = $ppp.$id.'.html';
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
108 my $sub_html_ref = $1.$id if $ppp =~ /$dir_root(.*)/;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
109 print $h "<td> <a href=\"$sub_html_ref.html\">$id</a> </td>";
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
110
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
111 open my $sub, '>', $sub_html || die "cannot create $sub_html\n";
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
112 {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
113 header($sub);
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
114 print $sub "
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
115 <div align=\"center\">
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
116 <h2>$id</h2>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
117 <p> <img class=\"featurette-image\" src=\"$id/histogram.png\"/></p>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
118 <p><a href=\"$id/overlap_size.txt\">ping pong signature</a></p>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
119 <p><a href=\"$id/sensPPP.txt\">sense reads with PPP</a></p>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
120 <p><a href=\"$id/antisensPPP.txt\">reverse reads with PPP</a></p>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
121 <p><a href=\"$id/sens.txt\">sense reads without PPP</a></p>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
122 <p><a href=\"$id/antisens.txt\">reverse reads without PPP</a></p>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
123 </div>";
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
124 footer($sub);
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
125 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
126 close $sub;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
127 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
128 else { print $h "<td> $id </td>\n"; }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
129 print $h "<td> $sum </td><td> $ten </td><td> $mean </td><td> $sd </td><td> $zscore </td><td> $prob </td>\n";
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
130
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
131 print $h '</tr>';
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
132 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
133 close $f;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
134 print $h "</tbody></table></div>";
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
135 footer($h);
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
136 close $h;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
137 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
138
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
139 sub get_genome
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
140 {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
141 my ( $dir, $dir_root ) = @_;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
142 my ( %hash, @group, @Unique, @NonUnique, @png );
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
143
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
144 my $fut = "'$dir'".'/*';
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
145 my @fut = glob $fut;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
146
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
147
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
148 foreach my $fr ( @fut )
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
149 {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
150 my $f = $1 if $fr =~ /$dir_root(.*)/;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
151 if ( $fr =~ /.*Gviz/ )
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
152 {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
153 my $nu = "'$fr'".'/rand/*';
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
154 @NonUnique = glob $nu;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
155 my $u = "'$fr'".'/unique/*';
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
156 @Unique = glob $u;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
157 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
158 elsif ( $f =~ /.*distribution\.txt$/ ) { $hash{'mappers size distribution (txt)'} = $f; }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
159 elsif ( $f =~ /.*distribution\.png$/ ) { push @png, $f; }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
160 elsif ( $f =~ /.*unique\.fastq$/ ) { $hash{'unique mappers (fastq.gz)'} = $f.'.gz'; `gzip '$fr'`; }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
161 elsif ( $f =~ /.*rejected\.fastq$/ ) { $hash{'unmapped (fastq.gz)'} = $f.'.gz'; `gzip '$fr'`; }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
162 elsif ( $f =~ /.*all\.fastq$/ ) { $hash{'mappers (fastq.gz)'} = $f.'.gz'; `gzip '$fr'`; }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
163 elsif ( $f =~ /.*dup_unique\.txt$/ ) { $hash{'unique mappers (txt)'} = $f; }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
164 elsif ( $f =~ /.*dup_mapnum\.txt$/ ) { $hash{'mappers (txt)'} = $f; }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
165 elsif ( $f =~ /.*dup_nonmapp\.txt$/ ) { $hash{'unmapped (txt)'} = $f; }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
166 elsif ( $f =~ /.*_unique_sorted\.bam$/ ) { $hash{'unique alignment (bam)'} = $f; }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
167 elsif ( $f =~ /.*_sorted\.bam$/ ) { $hash{'alignment (bam)'} = $f; }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
168 elsif ( $f =~ /.*unique_plus.bedgraph/) { $hash{'bedgraph unique plus strand'} = $f; }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
169 elsif ( $f =~ /.*unique_minus.bedgraph/) { $hash{'bedgraph unique minus strand'} = $f; }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
170 elsif ( $f =~ /.*plus.bedgraph/) { $hash{'bedgraph plus strand'} = $f; }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
171 elsif ( $f =~ /.*minus.bedgraph/) { $hash{'bedgraph minus strand'} = $f; }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
172 else { unlink $fr; }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
173 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
174 return (\%hash, \@Unique, \@NonUnique, \@png);
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
175 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
176
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
177 sub span
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
178 {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
179 my ( $file, $name, $min, $max, $simin, $simax, $pimin, $pimax ) = @_;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
180
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
181 print $file "
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
182 <div class=\"container text-center\">
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
183 <div class=\"row-fluid\">
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
184 <div class=\"span6\">
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
185 <h2>Bonafide</h2>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
186 reads of size between $min and $max<br>with no mi, sn, t and r RNAs
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
187 <p><a class=\"btn\" href=\"$name-bonafide_reads-genome.html\">Genome</a></p>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
188 <p><a class=\"btn\" href=\"$name-bonafide_reads-TEs.html\">TE</a></p>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
189 <p><a class=\"btn\" href=\"$name-bonafide_reads-transcripts.html\">Transcripts</a></p>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
190 <div class=\"row-fluid\">
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
191 <div class=\"span6\">
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
192 <h2>siRNAs</h2>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
193 bonafide reads of size between $simin and $simax
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
194 <p><a class=\"btn\" href=\"$name-siRNAs-genome.html\">Genome</a></p>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
195 <p><a class=\"btn\" href=\"$name-siRNAs-TEs.html\">TE</a></p>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
196 <p><a class=\"btn\" href=\"$name-siRNAs-transcripts.html\">Transcripts</a></p>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
197 </div>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
198 <div class=\"span6\">
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
199 <h2>piRNAs</h2>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
200 bonafide reads of size between $pimin and $pimax
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
201 <p><a class=\"btn\" href=\"$name-piRNAs-genome.html\">Genome</a></p>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
202 <p><a class=\"btn\" href=\"$name-piRNAs-TEs.html\">TE</a></p>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
203 <p><a class=\"btn\" href=\"$name-piRNAs-transcripts.html\">Transcripts</a></p>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
204 </div>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
205 </div>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
206 </div>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
207 <div class=\"span6\">
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
208 <h2>miRNAs</h2>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
209 <p><a class=\"btn\" href=\"$name-miRNAs-genome.html\">Genome</a></p>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
210 <p><a class=\"btn\" href=\"$name-miRNAs-TEs.html\">TE</a></p>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
211 <p><a class=\"btn\" href=\"$name-miRNAs-transcripts.html\">Transcripts</a></p>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
212 </div>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
213 </div>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
214 </div>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
215 ";
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
216 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
217
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
218 sub get_subgroups
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
219 {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
220 my ( $dir, $name, $misTE, $dir_root ) = @_;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
221 my (%Hex, %HTE, %HG, @group, @png, @pngTE, @NonUniTE, @UniG, @NonUniG );
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
222
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
223 my $fut = "'$dir'".'/*';
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
224 my @fut = glob $fut;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
225 my $f ='';
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
226 foreach my $fr ( @fut )
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
227 {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
228 $f = $1 if $fr =~ /$dir_root(.*)/;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
229
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
230 if ( $f =~ /genome_unique_sorted\.bam$/ ) { $HG{'genome unique mappers (sorted bam)'} = $f; }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
231 elsif ( $f =~ /genome_sorted\.bam$/ ) { $HG{'genome mappers (sorted bam)'} = $f; }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
232 elsif ( $f =~ /miRNAs_reads_counts\.txt$/ ) { $HG{'miRNAs per type (txt)'} = $f; }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
233 elsif ( $f =~ /genome_unique_plus\.bedgraph$/) { $HG{'bedgraph unique plus strand'} = $f; }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
234 elsif ( $f =~ /genome_unique_minus\.bedgraph$/) { $HG{'bedgraph unique minus strand'} = $f; }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
235 elsif ( $f =~ /genome_plus\.bedgraph$/) { $HG{'bedgraph plus strand'} = $f; }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
236 elsif ( $f =~ /genome_minus\.bedgraph$/) { $HG{'bedgraph minus strand'} = $f; }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
237 elsif ( $f =~ /TEs_plus\.bedgraph$/) { $HTE{'bedgraph plus strand'} = $f; }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
238 elsif ( $f =~ /TEs_minus\.bedgraph$/) { $HTE{'bedgraph minus strand'} = $f; }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
239 elsif ( $f =~ /transcripts_sorted\.bam$/) { $Hex{'transcripts mappers (sorted bam)'} = $f;}
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
240 elsif ( $f =~ /transcripts_unique_sorted\.bam$/) { $Hex{'transcripts unique mappers (sorted bam)'} = $f;}
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
241 elsif ( $f =~ /transcripts_reads_counts\.txt$/) { $Hex{'read number per transcript (txt)'} = $f;}
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
242 elsif ( $f =~ /TEs_reads_counts\.txt$/) { $HTE{"read number per TE 0 to $misTE mismatches (txt)"} = $f; }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
243 elsif ( $f =~ /TEs_reads_counts_mismatches\.txt$/) { $HTE{"read number per TE with 1 to $misTE mismatches (txt)"} = $f; }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
244 elsif ( $f =~ /TEs_reads_counts_nomismatches\.txt$/) { $HTE{'read number per TE with no mismatch (txt)'} = $f; }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
245 elsif ( $f =~ /TEs_unique_sorted\.bam$/) { $HTE{'TEs unique mappers (sorted bam)'} = $f; }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
246 elsif ( $f =~ /TEs_sorted\.bam$/) { $HTE{'TEs mappers (sorted bam)'} = $f; }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
247 elsif ( $fr =~ /.*Gviz_TEs/ )
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
248 {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
249 my $nu = "'$fr'".'/*';
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
250 @NonUniTE = glob $nu;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
251 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
252 elsif ( $fr =~ /.*Gviz_genome/ )
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
253 {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
254 my $nu = "'$fr'".'/rand/*';
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
255 @NonUniG = glob $nu;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
256 my $u = "'$fr'".'/unique/*';
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
257 @UniG = glob $u;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
258 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
259 else { unlink $fr; }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
260 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
261 return (\%Hex, \%HTE, \%HG, \@NonUniTE, \@NonUniG, \@UniG);
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
262 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
263
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
264 sub header
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
265 {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
266 my $file = shift;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
267 print $file "
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
268 <!DOCTYPE html>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
269 <html lang=\"en\">
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
270 <head>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
271 <meta charset=\"utf-8\">
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
272 <title>pipeline</title>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
273 <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
274 <meta name=\"description\" content=\"\">
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
275 <meta name=\"author\" content=\"\">
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
276 <!-- Le styles -->
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
277 <link href=\"css/bootstrap.css\" rel=\"stylesheet\">
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
278 <link href=\"css/bootstrap-table.css\" rel=\"stylesheet\">
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
279 <style type=\"text/css\">
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
280 body {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
281 padding-top: 60px;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
282 padding-bottom: 40px;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
283 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
284 div#page {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
285 width: 940px;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
286 background-color: #fff;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
287 margin: 0 auto;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
288 text-align: left;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
289 border-color: #fff;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
290 border-style: none solid solid;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
291 border-width: medium 1px 1px;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
292 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
293
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
294 div.content {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
295 display: none;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
296 float: right;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
297 width: 550px;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
298 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
299 div.content a, div.navigation a {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
300 text-decoration: none;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
301 color: #777;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
302 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
303 div.content a:focus, div.content a:hover, div.content a:active {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
304 text-decoration: underline;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
305 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
306
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
307 div.controls {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
308 margin-top: 5px;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
309 height: 23px;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
310 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
311
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
312 div.controls a {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
313 padding: 5px;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
314 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
315 div.ss-controls {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
316 float: left;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
317 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
318 div.nav-controls {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
319 float: right;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
320 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
321 div.slideshow-container {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
322 position: relative;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
323 clear: both;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
324 height: 502px; /* This should be set to be at least the height of the largest image in the slideshow */
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
325 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
326 div.loader {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
327 position: absolute;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
328 top: 0;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
329 left: 0;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
330 background-image: url('loader.gif');
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
331 background-repeat: no-repeat;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
332 background-position: center;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
333 width: 550px;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
334 height: 502px; /* This should be set to be at least the height of the largest image in the slideshow */
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
335 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
336 div.slideshow {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
337
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
338 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
339
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
340 div.slideshow span.image-wrapper {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
341 display: block;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
342 position: absolute;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
343 top: 0;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
344 left: 0;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
345 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
346 div.slideshow a.advance-link {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
347 display: block;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
348 width: 550px;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
349 height: 502px; /* This should be set to be at least the height of the largest image in the slideshow */
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
350 line-height: 502px; /* This should be set to be at least the height of the largest image in the slideshow */
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
351 text-align: center;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
352 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
353 div.slideshow a.advance-link:hover, div.slideshow a.advance-link:active, div.slideshow a.advance-link:visited {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
354 text-decoration: none;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
355 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
356 div.slideshow img {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
357 vertical-align: middle;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
358 border: 1px solid #ccc;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
359 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
360
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
361 div.image-title {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
362 font-weight: bold;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
363 font-size: 1.4em;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
364 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
365
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
366 div.image-desc {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
367 line-height: 1.3em;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
368 padding-top: 12px;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
369 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
370 div.navigation {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
371
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
372 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
373 ul.thumbs {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
374 clear: both;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
375 margin: 0;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
376 padding: 0;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
377 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
378 ul.thumbs li {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
379 float: none;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
380 padding: 0;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
381 margin: 0;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
382 list-style: none;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
383 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
384 a.thumb {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
385 padding: 0;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
386 display: inline;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
387 border: none;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
388 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
389 ul.thumbs li.selected a.thumb {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
390 color: #000;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
391 font-weight: bold;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
392 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
393 a.thumb:focus {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
394 outline: none;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
395 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
396 ul.thumbs img {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
397 border: none;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
398 display: block;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
399 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
400 div.pagination {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
401 clear: both;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
402 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
403 div.navigation div.top {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
404 margin-bottom: 12px;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
405 height: 11px;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
406 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
407 div.navigation div.bottom {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
408 margin-top: 12px;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
409 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
410 div.pagination a, div.pagination span.current, div.pagination span.ellipsis {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
411 display: block;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
412 float: left;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
413 margin-right: 2px;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
414 padding: 4px 7px 2px 7px;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
415 border: 1px solid #ccc;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
416 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
417 div.pagination a:hover {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
418 background-color: #eee;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
419 text-decoration: none;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
420 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
421 div.pagination span.current {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
422 font-weight: bold;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
423 background-color: #000;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
424 border-color: #000;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
425 color: #fff;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
426 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
427 div.pagination span.ellipsis {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
428 border: none;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
429 padding: 5px 0 3px 2px;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
430 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
431
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
432 div.download {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
433 float: right;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
434 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
435
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
436 div.caption-container {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
437 position: relative;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
438 clear: left;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
439 height: 75px;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
440 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
441 span.image-caption {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
442 display: block;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
443 position: absolute;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
444 width: 550px;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
445 top: 0;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
446 left: 0;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
447 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
448 div.caption {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
449 padding: 12px;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
450 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
451
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
452 /* Featurettes
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
453 ------------------------- */
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
454
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
455 .featurette {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
456 padding-top: 20px; /* Vertically center images part 1: add padding above and below text. */
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
457 overflow: hidden; /* Vertically center images part 2: clear their floats. */
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
458 text-align: center;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
459 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
460
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
461 .featurette-p
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
462 {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
463 text-align: left;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
464 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
465
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
466 .featurette-image {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
467 margin-top: 10px; /* Vertically center images part 3: negative margin up the image the same amount of the padding to center it. */
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
468 width: 450px;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
469 height: auto;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
470 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
471
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
472 </style>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
473 <link href=\"css/bootstrap-responsive.css\" rel=\"stylesheet\">
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
474 </head>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
475 <body>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
476 ";
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
477 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
478
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
479 sub navbar
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
480 {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
481 my ( $file, $fastq, $actif ) = @_;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
482
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
483 print $file "
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
484 <div class=\"navbar navbar-inverse navbar-fixed-top\">
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
485 <div class=\"navbar-inner\">
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
486 <div class=\"container\">
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
487 <button type=\"button\" class=\"btn btn-navbar\" data-toggle=\"collapse\" data-target=\".nav-collapse\">
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
488 <span class=\"icon-bar\"></span>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
489 <span class=\"icon-bar\"></span>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
490 <span class=\"icon-bar\"></span>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
491 </button>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
492 <a class=\"brand\" href=\"report.txt\">Report</a>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
493 <div class=\"nav-collapse collapse\">
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
494 <ul class=\"nav\">
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
495 ";
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
496 for (my $i = 0 ; $i <= $#{$fastq}; $i++)
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
497 {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
498 # my $fa = basename($fastq->[$i],'.dat');
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
499 my $fa = $fastq->[$i];
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
500 if ($actif eq $fa){ print $file "<li class=\"active\"><a href=\"$fastq->[$i].html\">$fa</a></li>";}
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
501 else {print $file "<li><a href=\"$fastq->[$i].html\">$fa</a></li>" ;}
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
502 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
503 print $file "
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
504 </ul>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
505 </div><!--/.nav-collapse -->
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
506 </div>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
507 </div>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
508 </div>";
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
509 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
510
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
511 sub footer
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
512 {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
513 my $file = shift;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
514 print $file "
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
515 <!-- FOOTER -->
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
516 <div class=\"container\">
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
517 <footer>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
518
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
519 </footer>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
520 </div>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
521 <!-- Le javascript
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
522 ================================================== -->
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
523 <!-- Placed at the end of the document so the pages load faster -->
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
524 <script type=\"text/javascript\" src=\"js/filter.js\"></script>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
525 <script type=\"text/javascript\" src=\"js/jquery.js\"></script>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
526 <script type=\"text/javascript\" src=\"js/jquery-1.3.2.js\"></script>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
527 <script type=\"text/javascript\" src=\"js/jquery.galleriffic.js\"></script>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
528 <script type=\"text/javascript\" src=\"js/jquery.opacityrollover.js\"></script>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
529 <script type=\"text/javascript\" src=\"js/bootstrap-table.js\"></script>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
530 <script type=\"text/javascript\" src=\"js/bootstrap.min.js\"></script>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
531 <script type=\"text/javascript\">
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
532 jQuery(document).ready(function(\$) {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
533 // We only want these styles applied when javascript is enabled
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
534 \$('div.navigation').css({'width' : '300px', 'float' : 'left'});
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
535 \$('div.content').css('display', 'block');
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
536
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
537 \$(\".each-gallery\").each(function(i){
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
538 // Initially set opacity on thumbs and add
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
539 // additional styling for hover effect on thumbs
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
540 var onMouseOutOpacity = 0.67;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
541 \$('#thumbs + i + ul.thumbs li').opacityrollover({
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
542 mouseOutOpacity: onMouseOutOpacity,
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
543 mouseOverOpacity: 1.0,
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
544 fadeSpeed: 'fast',
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
545 exemptionSelector: '.selected'
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
546 });
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
547
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
548 // Initialize Advanced Galleriffic Gallery
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
549 var gallery = \$('#thumbs'+i).galleriffic({
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
550 delay: 2500,
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
551 numThumbs: 22,
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
552 preloadAhead: 10,
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
553 enableTopPager: true,
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
554 enableBottomPager: true,
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
555 maxPagesToShow: 7,
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
556 imageContainerSel: '#slideshow'+ i,
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
557 controlsContainerSel: '#controls' + i,
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
558 captionContainerSel: '#caption' + i,
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
559 loadingContainerSel: '#loading' + i,
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
560 renderSSControls: true,
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
561 renderNavControls: true,
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
562 playLinkText: 'Play',
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
563 pauseLinkText: 'Pause',
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
564 prevLinkText: '&lsaquo; Previous',
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
565 nextLinkText: 'Next &rsaquo;',
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
566 nextPageLinkText: 'Next &rsaquo;',
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
567 prevPageLinkText: '&lsaquo; Prev',
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
568 enableHistory: false,
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
569 autoStart: false,
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
570 syncTransitions: true,
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
571 defaultTransitionDuration: 900,
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
572 onSlideChange: function(prevIndex, nextIndex) {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
573 // 'this' refers to the gallery, which is an extension of \$('#thumbs')
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
574 this.find('ul.thumbs').children()
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
575 .eq(prevIndex).fadeTo('fast', onMouseOutOpacity).end()
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
576 .eq(nextIndex).fadeTo('fast', 1.0);
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
577 },
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
578 onPageTransitionOut: function(callback) {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
579 this.fadeTo('fast', 0.0, callback);
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
580 },
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
581 onPageTransitionIn: function() {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
582 this.fadeTo('fast', 1.0);
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
583 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
584 });
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
585 });
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
586 });
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
587 </script>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
588 </body>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
589 </html>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
590 ";
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
591 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
592
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
593 sub carousel
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
594 {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
595 my ($file, $non_unique, $dir_root) = @_;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
596 my $ac = 0;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
597 print $file "
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
598 <div id=\"page\">
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
599 <div id=\"container\">
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
600 <div class=\"each-gallery\">
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
601 <div id=\"gallery\" class=\"content\">
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
602 <div id=\"controls0\" class=\"controls\"></div>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
603 <div class=\"slideshow-container\">
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
604 <div id=\"loading0\" class=\"loader\"></div>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
605 <div id=\"slideshow0\" class=\"slideshow\"></div>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
606 </div>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
607 <div id=\"caption0\" class=\"caption-container\">Reads randomly assigned</div>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
608 </div>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
609 <div id=\"thumbs0\" class=\"navigation\">
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
610 <input type=\"text\" id=\"myInput0\" onkeyup=\"search(this)\" placeholder=\"Search for names...\">
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
611 <ul class=\"thumbs noscript\">
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
612 ";
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
613 foreach my $u (@{$non_unique})
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
614 {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
615 my $name = basename($u,'.png');
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
616 $u = $1 if $u =~ /$dir_root(.*)/;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
617 print $file "
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
618 <li>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
619 <a class=\"thumb\" href=\"$u\" title=\"$name\">$name</a>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
620 </li>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
621 ";
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
622 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
623 print $file "
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
624 </ul>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
625 </div>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
626 <div style=\"clear: both;\"></div></div>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
627 </div>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
628 </div>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
629 ";
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
630 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
631
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
632 sub carousel2
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
633 {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
634 my ($file, $unique, $non_unique, $dir_root) = @_;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
635 print $file "
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
636 <div id=\"page\">
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
637 <div id=\"container\">
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
638 <div class=\"each-gallery\">
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
639 <div id=\"gallery\" class=\"content\">
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
640 <div id=\"controls0\" class=\"controls\"></div>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
641 <div class=\"slideshow-container\">
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
642 <div id=\"loading0\" class=\"loader\"></div>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
643 <div id=\"slideshow0\" class=\"slideshow\"></div>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
644 </div>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
645 <div id=\"caption0\" class=\"caption-container\">Uniquely mapped reads</div>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
646 </div>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
647 <div id=\"thumbs0\" class=\"navigation\">
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
648 <input type=\"text\" id=\"myInput0\" onkeyup=\"search(this)\" placeholder=\"Search for names...\">
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
649 <ul class=\"thumbs noscript\">
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
650 ";
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
651
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
652 foreach my $u (@{$unique})
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
653 {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
654 my $name = basename($u,'.png');
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
655 $u = $1 if $u =~ /$dir_root(.*)/;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
656 print $file "
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
657 <li>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
658 <a class=\"thumb\" href=\"$u\" title=\"$name\">$name</a>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
659 </li>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
660 ";
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
661 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
662 print $file "
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
663 </ul>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
664 </div>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
665 </div>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
666 <div id=\"page\">
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
667 <div id=\"container\">
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
668 <div class=\"each-gallery\">
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
669 <div id=\"gallery\" class=\"content\">
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
670 <div id=\"controls1\" class=\"controls\"></div>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
671 <div class=\"slideshow-container\">
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
672 <div id=\"loading1\" class=\"loader\"></div>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
673 <div id=\"slideshow1\" class=\"slideshow\"></div>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
674 </div>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
675 <div id=\"caption1\" class=\"caption-container\">Reads randomly assigned</div>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
676 </div>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
677 <div id=\"thumbs1\" class=\"navigation\">
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
678 <input type=\"text\" id=\"myInput1\" onkeyup=\"search(this)\" placeholder=\"Search for names...\">
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
679 <ul class=\"thumbs noscript\">
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
680 ";
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
681
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
682 foreach my $nu (@{$non_unique})
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
683 {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
684 my $name = basename($nu,'.png');
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
685 $nu = $1 if $nu =~ /$dir_root(.*)/;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
686 print $file "
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
687 <li>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
688 <a class=\"thumb\" href=\"$nu\" title=\"$name\">$name</a>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
689 </li>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
690 ";
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
691 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
692 print $file "
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
693 </ul>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
694 </div>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
695 <div style=\"clear: both;\"></div></div>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
696 </div>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
697 </div>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
698 ";
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
699 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
700
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
701 sub futurette
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
702 {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
703 my ($file, $name, $png, $hash) = @_;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
704 print $file "
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
705 <div class=\"container\">
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
706 <div class=\"featurette\">
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
707 <h1>$name</h1>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
708 <p class=\"featurette-p\">
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
709 ";
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
710 foreach my $k (sort keys %{$hash})
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
711 {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
712 print $file "<A HREF=\"".${$hash}{$k}."\">$k</A><br/> \n" ;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
713 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
714
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
715 print $file "
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
716 </p>";
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
717
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
718 foreach my $pn (@{$png}){print $file "<img class=\"featurette-image\" src=\"$pn\"/><br />";}
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
719
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
720 print $file "
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
721 </div>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
722 </div>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
723 ";
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
724 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
725
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
726 sub fut
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
727 {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
728 my ($file, $name, $hash) = @_;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
729 print $file "
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
730 <div class=\"container\">
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
731 <div class=\"featurette\">
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
732 <h1>$name</h1>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
733 <p class=\"featurette-p\">
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
734 ";
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
735
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
736 foreach my $k (sort { ${$hash}{$a} cmp ${$hash}{$b} } keys %{$hash})
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
737 {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
738 print $file "<A HREF=\"".${$hash}{$k}."\">$k</A><br/> \n" ;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
739 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
740
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
741 print $file "
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
742 </p>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
743 </div>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
744 </div>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
745 ";
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
746 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
747
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
748 sub get_distri_exon
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
749 {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
750 my ($dir, $name) = @_;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
751 my (@out,@group);
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
752 my $group = "'$dir'".'/'."'$name'".'-subgroups-bonafide_reads-transcripts-*distribution-*.png';
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
753 @group = glob $group;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
754 foreach (my $g =0; $g <= $#group; $g++)
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
755 {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
756 if ($group[$g] =~ /.*($name-subgroups-bonafide_reads-transcripts-.*distribution-.*\.png)/ )
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
757 {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
758 my $tmp = $1;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
759 push @out, $1;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
760 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
761 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
762 return (\@out);
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
763 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
764
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
765 sub get_distri_TE
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
766 {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
767 my ($dir, $name) = @_;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
768 my (@out,@group);
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
769 my $group = "'$dir'".'/'."'$name'".'-subgroups-bonafide_reads-TE-*distribution-*.png';
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
770 @group = glob $group;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
771 foreach (my $g =0; $g <= $#group; $g++)
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
772 {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
773 if ($group[$g] =~ /.*($name-subgroups-bonafide_reads-TE-.*distribution-.*\.png)/ )
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
774 {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
775 my $tmp = $1;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
776 push @out, $1;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
777 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
778 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
779 return (\@out);
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
780 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
781
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
782 sub get_PPP
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
783 {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
784 my ($dir,$name) = @_;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
785 my (%distri,@group);
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
786 my $group = "'$dir'".'/'."'$name'".'-subgroups-bonafide_reads-TE-PPPartners-*';
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
787 @group = glob $group;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
788
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
789 foreach (my $g =0; $g <= $#group; $g++)
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
790 {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
791 if ($group[$g] =~ /.*($name-subgroups-bonafide_reads-TE-PPPartners-.*)/ )
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
792 {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
793 my $tmp = $1;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
794 if ($tmp =~ /PPPartners-(.*?)-sens\.txt$/)
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
795 {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
796 $distri{$1} = ['','','','','',''] unless exists $distri{$1};
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
797 $distri{$1}->[0] = $tmp;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
798 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
799 elsif ($tmp =~ /PPPartners-(.*?)-antisens\.txt$/)
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
800 {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
801 $distri{$1} = ['','','','','',''] unless exists $distri{$1};
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
802 $distri{$1}->[1] = $tmp;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
803 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
804 elsif ($tmp =~ /PPPartners-(.*?)-sensPPP\.txt$/)
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
805 {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
806 $distri{$1} = ['','','','','',''] unless exists $distri{$1};
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
807 $distri{$1}->[2] = $tmp;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
808 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
809 elsif ($tmp =~ /PPPartners-(.*?)-antisensPPP\.txt$/)
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
810 {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
811 $distri{$1} = ['','','','','',''] unless exists $distri{$1};
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
812 $distri{$1}->[3] = $tmp;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
813 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
814 elsif ($tmp =~ /PPPartners-(.*?)-overlap_size\.txt$/)
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
815 {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
816 $distri{$1} = ['','','','','',''] unless exists $distri{$1};
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
817 $distri{$1}->[4] = $tmp;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
818 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
819 elsif ($tmp =~ /PPPartners-(.*?)-histogram\.png$/)
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
820 {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
821 $distri{$1} = ['','','','','',''] unless exists $distri{$1};
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
822 $distri{$1}->[5] = $tmp;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
823 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
824 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
825 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
826 return \%distri;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
827 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
828
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
829 sub PPPrint
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
830 {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
831 my ($h, $hash) = @_;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
832 my $cmp = 0;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
833
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
834 print $h "<div class=\"container\">\n";
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
835 print $h "<div class=\"row text-center\">";
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
836 while ( my ($k,$v) = each %{$hash} )
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
837 {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
838 print $h "</div><div class=\"row text-center\">" if $cmp != 0 && $cmp % 2 == 0;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
839 print $h "
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
840
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
841 <div class=\"span6\">
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
842 <h2>$k</h2>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
843 <p class=\"featurette-p\"> <img src=\"$v->[5]\"/></p>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
844 <p class=\"featurette-p\"><a href=\"$v->[4]\">ping pong signature</a></p>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
845 <p class=\"featurette-p\"><a href=\"$v->[2]\">sense reads with PPP</a></p>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
846 <p class=\"featurette-p\"><a href=\"$v->[3]\">reverse reads with PPP</a></p>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
847 <p class=\"featurette-p\"><a href=\"$v->[0]\">sense reads without PPP</a></p>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
848 <p class=\"featurette-p\"><a href=\"$v->[1]\">reverse reads without PPP</a></p>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
849 </div>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
850 ";
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
851 $cmp++;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
852 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
853
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
854 print $h "</div></div>";
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
855 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
856
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
857 sub printDistri
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
858 {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
859 my ($h, $tab) = @_;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
860 my ($txt, $name);
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
861 my $cmp = 0;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
862 print $h "<div class=\"container\">\n";
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
863 print $h "<div class=\"row text-center\">";
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
864 foreach my $k (@{$tab})
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
865 {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
866 if ($k =~ /(.*)-(.*)\.png$/)
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
867 {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
868 $txt = $1.'-'.$2.'.txt';
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
869 $name = $2;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
870 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
871 print $h "</div><div class=\"row text-center\">" if $cmp != 0 && $cmp % 2 == 0;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
872 print $h "
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
873
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
874 <div class=\"span6\">
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
875 <h2>$name</h2>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
876 <p> <img src=\"$k\"/></p>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
877 <p class=\"featurette-p\"><a href=\"$txt\">text file</a></p>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
878 </div>
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
879 ";
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
880 $cmp++;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
881 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
882
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
883 print $h "</div></div>";
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
884 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
885
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
886 sub mapnum
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
887 {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
888 my $dupmapnum = shift;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
889 my $dupnum_genome = shift;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
890 open (my $dupTE, $dupmapnum) || die "cannot open ".$dupmapnum."\n";
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
891 my %dupnum_TE = ();
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
892 my $header = <$dupTE>;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
893 while (<$dupTE>)
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
894 {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
895 chomp $_;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
896 my @dupline = split /\t/, $_;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
897 $dupnum_TE{$dupline[0]} = $dupline[2];
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
898 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
899 close $dupTE;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
900 open (my $du_TE, '>'.$dupmapnum) || die "cannot open to write ".$dupmapnum."\n";
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
901 print $du_TE "sequence\tduplicate\tgenome map num\tmap num\n";
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
902 while (my ($k, $v) = each %dupnum_TE )
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
903 {
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
904 my $hashRef = ${$dupnum_genome}{$k};
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
905 print $du_TE "$k\t$hashRef->[0]\t$hashRef->[1]\t$v\n";
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
906 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
907 close $du_TE;
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
908 }
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
909
9185ca0a7b43 Updated package according to recommendations.
pierre.pouchin
parents: 60
diff changeset
910 1;