annotate bin/html.pm @ 45:263819fdda14 draft

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