annotate bin/html.pm @ 42:cb33c7d521c4 draft

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