annotate bin/html.pm @ 60:9645d995fb3c draft

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