Mercurial > repos > brasset_jensen > srnapipe
comparison 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 |
comparison
equal
deleted
inserted
replaced
59:eeb89c3331ad | 60:9645d995fb3c |
---|---|
8 our @ISA = qw( Exporter ); | 8 our @ISA = qw( Exporter ); |
9 our @EXPORT_OK = qw( &main_page &details_pages &menu_page &ppp_page ); | 9 our @EXPORT_OK = qw( &main_page &details_pages &menu_page &ppp_page ); |
10 | 10 |
11 sub main_page | 11 sub main_page |
12 { | 12 { |
13 my ( $dir, $file, $list_mainTabP, $current, $ma, $ma_uni, $dir_root ) = @_; | 13 my ( $dir, $file, $list_mainTabP, $current, $ma, $ma_uni, $dir_root ) = @_; |
14 my ( $futHashP, $uniqueTabP, $randTabP, $pngTabP ) = get_genome ( $dir, $dir_root ); | 14 my ( $futHashP, $uniqueTabP, $randTabP, $pngTabP ) = get_genome ( $dir, $dir_root ); |
15 | 15 |
16 open my $h, '>', $file || die "cannot create $file $!\n"; | 16 open my $h, '>', $file || die "cannot create $file $!\n"; |
17 header ( $h ); | 17 header ( $h ); |
18 navbar ( $h, $list_mainTabP, $current ); | 18 navbar ( $h, $list_mainTabP, $current ); |
19 print $h "<div class=\"container\"><p><a class=\"btn\" href=\"$current-sub.html\">View details »</a></p></div>\n"; | 19 print $h "<div class=\"container\"><p><a class=\"btn\" href=\"$current-sub.html\">View details »</a></p></div>\n"; |
20 futurette( $h, $current, $pngTabP, $futHashP ); | 20 futurette( $h, $current, $pngTabP, $futHashP ); |
21 print $h "<div class=\"container\"><h2>mappers #: $ma</h2><h2>unique mappers #: $ma_uni</h2> </div>\n"; | 21 print $h "<div class=\"container\"><h2>mappers #: $ma</h2><h2>unique mappers #: $ma_uni</h2> </div>\n"; |
22 carousel2( $h, $uniqueTabP, $randTabP, $dir_root ); | 22 carousel2( $h, $uniqueTabP, $randTabP, $dir_root ); |
23 footer($h); | 23 footer($h); |
24 close $h; | 24 close $h; |
25 } | 25 } |
26 | 26 |
27 sub menu_page | 27 sub menu_page |
28 { | 28 { |
29 my ( $dir, $file, $list_mainTabP, $current, $min, $max, $simin, $simax, $pimin, $pimax, $dir_root ) = @_; | 29 my ( $dir, $file, $list_mainTabP, $current, $min, $max, $simin, $simax, $pimin, $pimax, $dir_root ) = @_; |
30 my $html_ref = $1 if $dir =~ /$dir_root(.*)/; | 30 my $html_ref = $1 if $dir =~ /$dir_root(.*)/; |
31 open my $h, '>', $file || die "cannot create $file $!\n"; | 31 open my $h, '>', $file || die "cannot create $file $!\n"; |
32 header($h); | 32 header($h); |
33 navbar ( $h, $list_mainTabP, $current ); | 33 navbar ( $h, $list_mainTabP, $current ); |
34 span( $h, $current, $min, $max, $simin, $simax, $pimin, $pimax ); | 34 span( $h, $current, $min, $max, $simin, $simax, $pimin, $pimax ); |
35 print $h " <div class=\"container\"> <div class=\"row text-center\"> <img src=\"$html_ref/pie_chart.png\"/><br />\n"; | 35 print $h " <div class=\"container\"> <div class=\"row text-center\"> <img src=\"$html_ref/pie_chart.png\"/><br />\n"; |
36 print $h " <A HREF=\"$html_ref/repartition.txt\">text file</A><br/>\n </div></div>"; | 36 print $h " <A HREF=\"$html_ref/repartition.txt\">text file</A><br/>\n </div></div>"; |
38 close $h; | 38 close $h; |
39 } | 39 } |
40 | 40 |
41 sub details_pages | 41 sub details_pages |
42 { | 42 { |
43 my ( $dir_details, $prefix, $list_mainTabP, $current, $misTE, $dir_root, $ppp ) = @_; | 43 my ( $dir_details, $prefix, $list_mainTabP, $current, $misTE, $dir_root, $ppp ) = @_; |
44 my ($Hex, $HTE, $HG, $NonUniTE, $NonUniG, $UniG ) = get_subgroups( $dir_details, $current, $misTE, $dir_root ); | 44 my ($Hex, $HTE, $HG, $NonUniTE, $NonUniG, $UniG ) = get_subgroups( $dir_details, $current, $misTE, $dir_root ); |
45 | 45 |
46 my $html_ref = $1.'-PPP.html' if $prefix =~ /$dir_root(.*)/; | 46 my $html_ref = $1.'-PPP.html' if $prefix =~ /$dir_root(.*)/; |
47 open my $h, '>', $prefix.'-TEs.html' || die "cannot create $prefix-TEs.html $!\n"; | 47 open my $h, '>', $prefix.'-TEs.html' || die "cannot create $prefix-TEs.html $!\n"; |
48 header($h); | 48 header($h); |
49 navbar ( $h, $list_mainTabP, $current ); | 49 navbar ( $h, $list_mainTabP, $current ); |
50 if ( $prefix =~ /piRNAs$/ && $ppp eq 'true' ) | 50 if ( $prefix =~ /piRNAs$/ && $ppp eq 'true' ) |
51 { | 51 { |
52 print $h " <div class=\"container\">"; | 52 print $h " <div class=\"container\">"; |
53 print $h " <p><a class=\"btn\" href=\"$html_ref\">Ping Pong Partners</a></p>\n"; | 53 print $h " <p><a class=\"btn\" href=\"$html_ref\">Ping Pong Partners</a></p>\n"; |
54 print $h "</div>"; | 54 print $h "</div>"; |
55 } | 55 } |
56 fut($h,'Transposable elements',$HTE); | 56 fut($h,'Transposable elements',$HTE); |
57 carousel($h,$NonUniTE,$dir_root); | 57 carousel($h,$NonUniTE,$dir_root); |
58 footer($h); | 58 footer($h); |
59 close $h; | 59 close $h; |
74 close $h; | 74 close $h; |
75 } | 75 } |
76 | 76 |
77 sub ppp_page | 77 sub ppp_page |
78 { | 78 { |
79 my ( $dir, $file, $list_mainTabP, $current, $ppp, $dir_root ) = @_; | 79 my ( $dir, $file, $list_mainTabP, $current, $ppp, $dir_root ) = @_; |
80 | 80 |
81 my $ppp_file = $ppp.'ppp.txt'; | 81 my $ppp_file = $ppp.'ppp.txt'; |
82 open my $h, '>', $file || die "cannot create $file $!\n"; | 82 open my $h, '>', $file || die "cannot create $file $!\n"; |
83 header($h); | 83 header($h); |
84 navbar ( $h, $list_mainTabP, $current ); | 84 navbar ( $h, $list_mainTabP, $current ); |
85 print $h '<div class="container"> <table class="wb-tables table table-striped table-hover">'."\n"; | 85 print $h '<div class="container"> <table class="wb-tables table table-striped table-hover">'."\n"; |
86 print $h '<thead> | 86 print $h '<thead> |
87 <tr> | 87 <tr> |
88 <th data-sortable="true">ID</th> | 88 <th data-sortable="true">ID</th> |
89 <th data-sortable="true">overlap sum</th> | 89 <th data-sortable="true">overlap sum</th> |
90 <th data-sortable="true">ten overlap sum</th> | 90 <th data-sortable="true">ten overlap sum</th> |
91 <th data-sortable="true">mean</th> | 91 <th data-sortable="true">mean</th> |
94 <th data-sortable="true">p-value</th> | 94 <th data-sortable="true">p-value</th> |
95 </tr> | 95 </tr> |
96 </thead> | 96 </thead> |
97 <tbody>'; | 97 <tbody>'; |
98 | 98 |
99 open my $f, '<', $ppp_file || die "cannot open $ppp_file $!\n"; | 99 open my $f, '<', $ppp_file || die "cannot open $ppp_file $!\n"; |
100 while ( <$f> ) | 100 while ( <$f> ) |
101 { | 101 { |
102 chomp; | 102 chomp; |
103 print $h '<tr>'; | 103 print $h '<tr>'; |
104 my ( $id, $sum, $ten, $mean, $sd, $zscore, $prob) = split /\t/, $_; | 104 my ( $id, $sum, $ten, $mean, $sd, $zscore, $prob) = split /\t/, $_; |
105 if( -d "$ppp/$id" ) | 105 if( -d "$ppp/$id" ) |
106 { | 106 { |
107 my $sub_html = $ppp.$id.'.html'; | 107 my $sub_html = $ppp.$id.'.html'; |
108 my $sub_html_ref = $1.$id if $ppp =~ /$dir_root(.*)/; | 108 my $sub_html_ref = $1.$id if $ppp =~ /$dir_root(.*)/; |
109 print $h "<td> <a href=\"$sub_html_ref.html\">$id</a> </td>"; | 109 print $h "<td> <a href=\"$sub_html_ref.html\">$id</a> </td>"; |
110 | 110 |
111 open my $sub, '>', $sub_html || die "cannot create $sub_html\n"; | 111 open my $sub, '>', $sub_html || die "cannot create $sub_html\n"; |
112 { | 112 { |
113 header($sub); | 113 header($sub); |
114 print $sub " | 114 print $sub " |
115 <div align=\"center\"> | 115 <div align=\"center\"> |
116 <h2>$id</h2> | 116 <h2>$id</h2> |
117 <p> <img class=\"featurette-image\" src=\"$id/histogram.png\"/></p> | 117 <p> <img class=\"featurette-image\" src=\"$id/histogram.png\"/></p> |
118 <p><a href=\"$id/overlap_size.txt\">ping pong signature</a></p> | 118 <p><a href=\"$id/overlap_size.txt\">ping pong signature</a></p> |
119 <p><a href=\"$id/sensPPP.txt\">sense reads with PPP</a></p> | 119 <p><a href=\"$id/sensPPP.txt\">sense reads with PPP</a></p> |
120 <p><a href=\"$id/antisensPPP.txt\">reverse reads with PPP</a></p> | 120 <p><a href=\"$id/antisensPPP.txt\">reverse reads with PPP</a></p> |
121 <p><a href=\"$id/sens.txt\">sense reads without PPP</a></p> | 121 <p><a href=\"$id/sens.txt\">sense reads without PPP</a></p> |
122 <p><a href=\"$id/antisens.txt\">reverse reads without PPP</a></p> | 122 <p><a href=\"$id/antisens.txt\">reverse reads without PPP</a></p> |
123 </div>"; | 123 </div>"; |
124 footer($sub); | 124 footer($sub); |
125 } | 125 } |
126 close $sub; | 126 close $sub; |
127 | 127 } |
128 } | 128 else { print $h "<td> $id </td>\n"; } |
129 else { print $h "<td> $id </td>\n"; } | 129 print $h "<td> $sum </td><td> $ten </td><td> $mean </td><td> $sd </td><td> $zscore </td><td> $prob </td>\n"; |
130 print $h "<td> $sum </td><td> $ten </td><td> $mean </td><td> $sd </td><td> $zscore </td><td> $prob </td>\n"; | 130 |
131 | 131 print $h '</tr>'; |
132 print $h '</tr>'; | 132 } |
133 } | 133 close $f; |
134 close $f; | 134 print $h "</tbody></table></div>"; |
135 print $h "</tbody></table></div>"; | 135 footer($h); |
136 footer($h); | 136 close $h; |
137 close $h; | |
138 } | 137 } |
139 | 138 |
140 sub get_genome | 139 sub get_genome |
141 { | 140 { |
142 my ( $dir, $dir_root ) = @_; | 141 my ( $dir, $dir_root ) = @_; |
143 my ( %hash, @group, @Unique, @NonUnique, @png ); | 142 my ( %hash, @group, @Unique, @NonUnique, @png ); |
144 | 143 |
145 my $fut = $dir.'/*'; | 144 my $fut = "'$dir'".'/*'; |
146 my @fut = glob $fut; | 145 my @fut = glob $fut; |
147 | 146 |
148 | 147 |
149 foreach my $fr ( @fut ) | 148 foreach my $fr ( @fut ) |
150 { | 149 { |
151 my $f = $1 if $fr =~ /$dir_root(.*)/; | 150 my $f = $1 if $fr =~ /$dir_root(.*)/; |
152 if ( $fr =~ /.*Gviz/ ) | 151 if ( $fr =~ /.*Gviz/ ) |
153 { | 152 { |
154 my $nu = $fr.'/rand/*'; | 153 my $nu = "'$fr'".'/rand/*'; |
155 @NonUnique = glob $nu; | 154 @NonUnique = glob $nu; |
156 my $u = $fr.'/unique/*'; | 155 my $u = "'$fr'".'/unique/*'; |
157 @Unique = glob $u; | 156 @Unique = glob $u; |
158 } | 157 } |
159 elsif ( $f =~ /.*distribution\.txt$/ ) { $hash{'mappers size distribution (txt)'} = $f; } | 158 elsif ( $f =~ /.*distribution\.txt$/ ) { $hash{'mappers size distribution (txt)'} = $f; } |
160 elsif ( $f =~ /.*distribution\.png$/ ) { push @png, $f; } | 159 elsif ( $f =~ /.*distribution\.png$/ ) { push @png, $f; } |
161 elsif ( $f =~ /.*unique\.fastq$/ ) { $hash{'unique mappers (fastq.gz)'} = $f.'.gz'; `gzip $fr`; } | 160 elsif ( $f =~ /.*unique\.fastq$/ ) { $hash{'unique mappers (fastq.gz)'} = $f.'.gz'; `gzip '$fr'`; } |
162 elsif ( $f =~ /.*rejected\.fastq$/ ) { $hash{'unmapped (fastq.gz)'} = $f.'.gz'; `gzip $fr`; } | 161 elsif ( $f =~ /.*rejected\.fastq$/ ) { $hash{'unmapped (fastq.gz)'} = $f.'.gz'; `gzip '$fr'`; } |
163 elsif ( $f =~ /.*all\.fastq$/ ) { $hash{'mappers (fastq.gz)'} = $f.'.gz'; `gzip $fr`; } | 162 elsif ( $f =~ /.*all\.fastq$/ ) { $hash{'mappers (fastq.gz)'} = $f.'.gz'; `gzip '$fr'`; } |
164 elsif ( $f =~ /.*dup_unique\.txt$/ ) { $hash{'unique mappers (txt)'} = $f; } | 163 elsif ( $f =~ /.*dup_unique\.txt$/ ) { $hash{'unique mappers (txt)'} = $f; } |
165 elsif ( $f =~ /.*dup_mapnum\.txt$/ ) { $hash{'mappers (txt)'} = $f; } | 164 elsif ( $f =~ /.*dup_mapnum\.txt$/ ) { $hash{'mappers (txt)'} = $f; } |
166 elsif ( $f =~ /.*dup_nonmapp\.txt$/ ) { $hash{'unmapped (txt)'} = $f; } | 165 elsif ( $f =~ /.*dup_nonmapp\.txt$/ ) { $hash{'unmapped (txt)'} = $f; } |
167 elsif ( $f =~ /.*_unique_sorted\.bam$/ ) { $hash{'unique alignment (bam)'} = $f; } | 166 elsif ( $f =~ /.*_unique_sorted\.bam$/ ) { $hash{'unique alignment (bam)'} = $f; } |
168 elsif ( $f =~ /.*_sorted\.bam$/ ) { $hash{'alignment (bam)'} = $f; } | 167 elsif ( $f =~ /.*_sorted\.bam$/ ) { $hash{'alignment (bam)'} = $f; } |
169 elsif ( $f =~ /.*unique_plus.bedgraph/) { $hash{'bedgraph unique plus strand'} = $f; } | 168 elsif ( $f =~ /.*unique_plus.bedgraph/) { $hash{'bedgraph unique plus strand'} = $f; } |
170 elsif ( $f =~ /.*unique_minus.bedgraph/) { $hash{'bedgraph unique minus strand'} = $f; } | 169 elsif ( $f =~ /.*unique_minus.bedgraph/) { $hash{'bedgraph unique minus strand'} = $f; } |
171 elsif ( $f =~ /.*plus.bedgraph/) { $hash{'bedgraph plus strand'} = $f; } | 170 elsif ( $f =~ /.*plus.bedgraph/) { $hash{'bedgraph plus strand'} = $f; } |
172 elsif ( $f =~ /.*minus.bedgraph/) { $hash{'bedgraph minus strand'} = $f; } | 171 elsif ( $f =~ /.*minus.bedgraph/) { $hash{'bedgraph minus strand'} = $f; } |
173 else { unlink $fr; } | 172 else { unlink $fr; } |
174 } | 173 } |
175 return (\%hash, \@Unique, \@NonUnique, \@png); | 174 return (\%hash, \@Unique, \@NonUnique, \@png); |
176 } | 175 } |
177 | 176 |
178 sub span | 177 sub span |
179 { | 178 { |
180 my ( $file, $name, $min, $max, $simin, $simax, $pimin, $pimax ) = @_; | 179 my ( $file, $name, $min, $max, $simin, $simax, $pimin, $pimax ) = @_; |
219 sub get_subgroups | 218 sub get_subgroups |
220 { | 219 { |
221 my ( $dir, $name, $misTE, $dir_root ) = @_; | 220 my ( $dir, $name, $misTE, $dir_root ) = @_; |
222 my (%Hex, %HTE, %HG, @group, @png, @pngTE, @NonUniTE, @UniG, @NonUniG ); | 221 my (%Hex, %HTE, %HG, @group, @png, @pngTE, @NonUniTE, @UniG, @NonUniG ); |
223 | 222 |
224 my $fut = $dir.'/*'; | 223 my $fut = "'$dir'".'/*'; |
225 my @fut = glob $fut; | 224 my @fut = glob $fut; |
226 my $f =''; | 225 my $f =''; |
227 foreach my $fr ( @fut ) | 226 foreach my $fr ( @fut ) |
228 { | 227 { |
229 $f = $1 if $fr =~ /$dir_root(.*)/; | 228 $f = $1 if $fr =~ /$dir_root(.*)/; |
230 | 229 |
231 if ( $f =~ /genome_unique_sorted\.bam$/ ) { $HG{'genome unique mappers (sorted bam)'} = $f; } | 230 if ( $f =~ /genome_unique_sorted\.bam$/ ) { $HG{'genome unique mappers (sorted bam)'} = $f; } |
232 elsif ( $f =~ /genome_sorted\.bam$/ ) { $HG{'genome mappers (sorted bam)'} = $f; } | 231 elsif ( $f =~ /genome_sorted\.bam$/ ) { $HG{'genome mappers (sorted bam)'} = $f; } |
233 elsif ( $f =~ /miRNAs_reads_counts\.txt$/ ) { $HG{'miRNAs per type (txt)'} = $f; } | 232 elsif ( $f =~ /miRNAs_reads_counts\.txt$/ ) { $HG{'miRNAs per type (txt)'} = $f; } |
236 elsif ( $f =~ /genome_plus\.bedgraph$/) { $HG{'bedgraph plus strand'} = $f; } | 235 elsif ( $f =~ /genome_plus\.bedgraph$/) { $HG{'bedgraph plus strand'} = $f; } |
237 elsif ( $f =~ /genome_minus\.bedgraph$/) { $HG{'bedgraph minus strand'} = $f; } | 236 elsif ( $f =~ /genome_minus\.bedgraph$/) { $HG{'bedgraph minus strand'} = $f; } |
238 elsif ( $f =~ /TEs_plus\.bedgraph$/) { $HTE{'bedgraph plus strand'} = $f; } | 237 elsif ( $f =~ /TEs_plus\.bedgraph$/) { $HTE{'bedgraph plus strand'} = $f; } |
239 elsif ( $f =~ /TEs_minus\.bedgraph$/) { $HTE{'bedgraph minus strand'} = $f; } | 238 elsif ( $f =~ /TEs_minus\.bedgraph$/) { $HTE{'bedgraph minus strand'} = $f; } |
240 elsif ( $f =~ /transcripts_sorted\.bam$/) { $Hex{'transcripts mappers (sorted bam)'} = $f;} | 239 elsif ( $f =~ /transcripts_sorted\.bam$/) { $Hex{'transcripts mappers (sorted bam)'} = $f;} |
241 elsif ( $f =~ /transcripts_unique_sorted\.bam$/) { $Hex{'transcripts unique mappers (sorted bam)'} = $f;} | 240 elsif ( $f =~ /transcripts_unique_sorted\.bam$/) { $Hex{'transcripts unique mappers (sorted bam)'} = $f;} |
242 elsif ( $f =~ /transcripts_reads_counts\.txt$/) { $Hex{'read number per transcript (txt)'} = $f;} | 241 elsif ( $f =~ /transcripts_reads_counts\.txt$/) { $Hex{'read number per transcript (txt)'} = $f;} |
243 elsif ( $f =~ /TEs_reads_counts\.txt$/) { $HTE{"read number per TE 0 to $misTE mismatches (txt)"} = $f; } | 242 elsif ( $f =~ /TEs_reads_counts\.txt$/) { $HTE{"read number per TE 0 to $misTE mismatches (txt)"} = $f; } |
244 elsif ( $f =~ /TEs_reads_counts_mismatches\.txt$/) { $HTE{"read number per TE with 1 to $misTE mismatches (txt)"} = $f; } | 243 elsif ( $f =~ /TEs_reads_counts_mismatches\.txt$/) { $HTE{"read number per TE with 1 to $misTE mismatches (txt)"} = $f; } |
245 elsif ( $f =~ /TEs_reads_counts_nomismatches\.txt$/) { $HTE{'read number per TE with no mismatch (txt)'} = $f; } | 244 elsif ( $f =~ /TEs_reads_counts_nomismatches\.txt$/) { $HTE{'read number per TE with no mismatch (txt)'} = $f; } |
246 elsif ( $f =~ /TEs_unique_sorted\.bam$/) { $HTE{'TEs unique mappers (sorted bam)'} = $f; } | 245 elsif ( $f =~ /TEs_unique_sorted\.bam$/) { $HTE{'TEs unique mappers (sorted bam)'} = $f; } |
247 elsif ( $f =~ /TEs_sorted\.bam$/) { $HTE{'TEs mappers (sorted bam)'} = $f; } | 246 elsif ( $f =~ /TEs_sorted\.bam$/) { $HTE{'TEs mappers (sorted bam)'} = $f; } |
248 elsif ( $fr =~ /.*Gviz_TEs/ ) | 247 elsif ( $fr =~ /.*Gviz_TEs/ ) |
249 { | 248 { |
250 my $nu = $fr.'/*'; | 249 my $nu = "'$fr'".'/*'; |
251 @NonUniTE = glob $nu; | 250 @NonUniTE = glob $nu; |
252 } | 251 } |
253 elsif ( $fr =~ /.*Gviz_genome/ ) | 252 elsif ( $fr =~ /.*Gviz_genome/ ) |
254 { | 253 { |
255 my $nu = $fr.'/rand/*'; | 254 my $nu = "'$fr'".'/rand/*'; |
256 @NonUniG = glob $nu; | 255 @NonUniG = glob $nu; |
257 my $u = $fr.'/unique/*'; | 256 my $u = "'$fr'".'/unique/*'; |
258 @UniG = glob $u; | 257 @UniG = glob $u; |
259 } | 258 } |
260 else { unlink $fr; } | 259 else { unlink $fr; } |
261 } | 260 } |
262 return (\%Hex, \%HTE, \%HG, \@NonUniTE, \@NonUniG, \@UniG); | 261 return (\%Hex, \%HTE, \%HG, \@NonUniTE, \@NonUniG, \@UniG); |
263 } | 262 } |
264 | 263 |
478 } | 477 } |
479 | 478 |
480 sub navbar | 479 sub navbar |
481 { | 480 { |
482 my ( $file, $fastq, $actif ) = @_; | 481 my ( $file, $fastq, $actif ) = @_; |
483 | 482 |
484 print $file " | 483 print $file " |
485 <div class=\"navbar navbar-inverse navbar-fixed-top\"> | 484 <div class=\"navbar navbar-inverse navbar-fixed-top\"> |
486 <div class=\"navbar-inner\"> | 485 <div class=\"navbar-inner\"> |
487 <div class=\"container\"> | 486 <div class=\"container\"> |
488 <button type=\"button\" class=\"btn btn-navbar\" data-toggle=\"collapse\" data-target=\".nav-collapse\"> | 487 <button type=\"button\" class=\"btn btn-navbar\" data-toggle=\"collapse\" data-target=\".nav-collapse\"> |
524 <!-- Placed at the end of the document so the pages load faster --> | 523 <!-- Placed at the end of the document so the pages load faster --> |
525 <script type=\"text/javascript\" src=\"js/filter.js\"></script> | 524 <script type=\"text/javascript\" src=\"js/filter.js\"></script> |
526 <script type=\"text/javascript\" src=\"js/jquery.js\"></script> | 525 <script type=\"text/javascript\" src=\"js/jquery.js\"></script> |
527 <script type=\"text/javascript\" src=\"js/jquery-1.3.2.js\"></script> | 526 <script type=\"text/javascript\" src=\"js/jquery-1.3.2.js\"></script> |
528 <script type=\"text/javascript\" src=\"js/jquery.galleriffic.js\"></script> | 527 <script type=\"text/javascript\" src=\"js/jquery.galleriffic.js\"></script> |
529 <script type=\"text/javascript\" src=\"js/jquery.opacityrollover.js\"></script> | 528 <script type=\"text/javascript\" src=\"js/jquery.opacityrollover.js\"></script> |
530 <script type=\"text/javascript\" src=\"js/bootstrap-table.js\"></script> | 529 <script type=\"text/javascript\" src=\"js/bootstrap-table.js\"></script> |
531 <script type=\"text/javascript\" src=\"js/bootstrap.min.js\"></script> | 530 <script type=\"text/javascript\" src=\"js/bootstrap.min.js\"></script> |
532 <script type=\"text/javascript\"> | 531 <script type=\"text/javascript\"> |
533 jQuery(document).ready(function(\$) { | 532 jQuery(document).ready(function(\$) { |
534 // We only want these styles applied when javascript is enabled | 533 // We only want these styles applied when javascript is enabled |
611 <input type=\"text\" id=\"myInput0\" onkeyup=\"search(this)\" placeholder=\"Search for names...\"> | 610 <input type=\"text\" id=\"myInput0\" onkeyup=\"search(this)\" placeholder=\"Search for names...\"> |
612 <ul class=\"thumbs noscript\"> | 611 <ul class=\"thumbs noscript\"> |
613 "; | 612 "; |
614 foreach my $u (@{$non_unique}) | 613 foreach my $u (@{$non_unique}) |
615 { | 614 { |
616 my $name = basename($u,'.png'); | 615 my $name = basename($u,'.png'); |
617 $u = $1 if $u =~ /$dir_root(.*)/; | 616 $u = $1 if $u =~ /$dir_root(.*)/; |
618 print $file " | 617 print $file " |
619 <li> | 618 <li> |
620 <a class=\"thumb\" href=\"$u\" title=\"$name\">$name</a> | 619 <a class=\"thumb\" href=\"$u\" title=\"$name\">$name</a> |
621 </li> | 620 </li> |
650 <ul class=\"thumbs noscript\"> | 649 <ul class=\"thumbs noscript\"> |
651 "; | 650 "; |
652 | 651 |
653 foreach my $u (@{$unique}) | 652 foreach my $u (@{$unique}) |
654 { | 653 { |
655 my $name = basename($u,'.png'); | 654 my $name = basename($u,'.png'); |
656 $u = $1 if $u =~ /$dir_root(.*)/; | 655 $u = $1 if $u =~ /$dir_root(.*)/; |
657 print $file " | 656 print $file " |
658 <li> | 657 <li> |
659 <a class=\"thumb\" href=\"$u\" title=\"$name\">$name</a> | 658 <a class=\"thumb\" href=\"$u\" title=\"$name\">$name</a> |
660 </li> | 659 </li> |
680 <ul class=\"thumbs noscript\"> | 679 <ul class=\"thumbs noscript\"> |
681 "; | 680 "; |
682 | 681 |
683 foreach my $nu (@{$non_unique}) | 682 foreach my $nu (@{$non_unique}) |
684 { | 683 { |
685 my $name = basename($nu,'.png'); | 684 my $name = basename($nu,'.png'); |
686 $nu = $1 if $nu =~ /$dir_root(.*)/; | 685 $nu = $1 if $nu =~ /$dir_root(.*)/; |
687 print $file " | 686 print $file " |
688 <li> | 687 <li> |
689 <a class=\"thumb\" href=\"$nu\" title=\"$name\">$name</a> | 688 <a class=\"thumb\" href=\"$nu\" title=\"$name\">$name</a> |
690 </li> | 689 </li> |
748 | 747 |
749 sub get_distri_exon | 748 sub get_distri_exon |
750 { | 749 { |
751 my ($dir, $name) = @_; | 750 my ($dir, $name) = @_; |
752 my (@out,@group); | 751 my (@out,@group); |
753 my $group = $dir.'/'.$name.'-subgroups-bonafide_reads-transcripts-*distribution-*.png'; | 752 my $group = "'$dir'".'/'."'$name'".'-subgroups-bonafide_reads-transcripts-*distribution-*.png'; |
754 @group = glob $group; | 753 @group = glob $group; |
755 foreach (my $g =0; $g <= $#group; $g++) | 754 foreach (my $g =0; $g <= $#group; $g++) |
756 { | 755 { |
757 if ($group[$g] =~ /.*($name-subgroups-bonafide_reads-transcripts-.*distribution-.*\.png)/ ) | 756 if ($group[$g] =~ /.*($name-subgroups-bonafide_reads-transcripts-.*distribution-.*\.png)/ ) |
758 { | 757 { |
765 | 764 |
766 sub get_distri_TE | 765 sub get_distri_TE |
767 { | 766 { |
768 my ($dir, $name) = @_; | 767 my ($dir, $name) = @_; |
769 my (@out,@group); | 768 my (@out,@group); |
770 my $group = $dir.'/'.$name.'-subgroups-bonafide_reads-TE-*distribution-*.png'; | 769 my $group = "'$dir'".'/'."'$name'".'-subgroups-bonafide_reads-TE-*distribution-*.png'; |
771 @group = glob $group; | 770 @group = glob $group; |
772 foreach (my $g =0; $g <= $#group; $g++) | 771 foreach (my $g =0; $g <= $#group; $g++) |
773 { | 772 { |
774 if ($group[$g] =~ /.*($name-subgroups-bonafide_reads-TE-.*distribution-.*\.png)/ ) | 773 if ($group[$g] =~ /.*($name-subgroups-bonafide_reads-TE-.*distribution-.*\.png)/ ) |
775 { | 774 { |
782 | 781 |
783 sub get_PPP | 782 sub get_PPP |
784 { | 783 { |
785 my ($dir,$name) = @_; | 784 my ($dir,$name) = @_; |
786 my (%distri,@group); | 785 my (%distri,@group); |
787 my $group = $dir.'/'.$name.'-subgroups-bonafide_reads-TE-PPPartners-*'; | 786 my $group = "'$dir'".'/'."'$name'".'-subgroups-bonafide_reads-TE-PPPartners-*'; |
788 @group = glob $group; | 787 @group = glob $group; |
789 | 788 |
790 foreach (my $g =0; $g <= $#group; $g++) | 789 foreach (my $g =0; $g <= $#group; $g++) |
791 { | 790 { |
792 if ($group[$g] =~ /.*($name-subgroups-bonafide_reads-TE-PPPartners-.*)/ ) | 791 if ($group[$g] =~ /.*($name-subgroups-bonafide_reads-TE-PPPartners-.*)/ ) |
793 { | 792 { |
794 my $tmp = $1; | 793 my $tmp = $1; |
829 | 828 |
830 sub PPPrint | 829 sub PPPrint |
831 { | 830 { |
832 my ($h, $hash) = @_; | 831 my ($h, $hash) = @_; |
833 my $cmp = 0; | 832 my $cmp = 0; |
834 | 833 |
835 print $h "<div class=\"container\">\n"; | 834 print $h "<div class=\"container\">\n"; |
836 print $h "<div class=\"row text-center\">"; | 835 print $h "<div class=\"row text-center\">"; |
837 while ( my ($k,$v) = each %{$hash} ) | 836 while ( my ($k,$v) = each %{$hash} ) |
838 { | 837 { |
839 print $h "</div><div class=\"row text-center\">" if $cmp != 0 && $cmp % 2 == 0; | 838 print $h "</div><div class=\"row text-center\">" if $cmp != 0 && $cmp % 2 == 0; |
849 <p class=\"featurette-p\"><a href=\"$v->[1]\">reverse reads without PPP</a></p> | 848 <p class=\"featurette-p\"><a href=\"$v->[1]\">reverse reads without PPP</a></p> |
850 </div> | 849 </div> |
851 "; | 850 "; |
852 $cmp++; | 851 $cmp++; |
853 } | 852 } |
854 | 853 |
855 print $h "</div></div>"; | 854 print $h "</div></div>"; |
856 } | 855 } |
857 | 856 |
858 sub printDistri | 857 sub printDistri |
859 { | 858 { |
878 <p class=\"featurette-p\"><a href=\"$txt\">text file</a></p> | 877 <p class=\"featurette-p\"><a href=\"$txt\">text file</a></p> |
879 </div> | 878 </div> |
880 "; | 879 "; |
881 $cmp++; | 880 $cmp++; |
882 } | 881 } |
883 | 882 |
884 print $h "</div></div>"; | 883 print $h "</div></div>"; |
885 } | 884 } |
886 | 885 |
887 sub mapnum | 886 sub mapnum |
888 { | 887 { |