| 1 |
#!/usr/bin/perl |
| 2 |
|
| 3 |
# Convers the output of statsGenerator into a nice Excel spreadsheet. |
| 4 |
|
| 5 |
use strict; |
| 6 |
use lib "/home/bwalenz/linux/lib/perl5/site_perl/5.8.0"; |
| 7 |
use Spreadsheet::WriteExcel; |
| 8 |
use Spreadsheet::WriteExcel::Big; |
| 9 |
|
| 10 |
if (scalar(@ARGV) != 1) { |
| 11 |
die "usage: $0 stats-prefix\n"; |
| 12 |
} |
| 13 |
|
| 14 |
my $prefix = shift @ARGV; |
| 15 |
|
| 16 |
################################################################################ |
| 17 |
# |
| 18 |
# First, suck in the big ugly stdout from statsGenerator. |
| 19 |
# |
| 20 |
if (! -e "$prefix.out") { |
| 21 |
die "I looked for the stdout from statsGenerator in '$prefix.out', but didn't find it.\n"; |
| 22 |
} |
| 23 |
|
| 24 |
my $workbook = Spreadsheet::WriteExcel::Big->new("$prefix.xls"); |
| 25 |
my $summary = $workbook->add_worksheet("Summary"); |
| 26 |
|
| 27 |
my $format = $workbook->add_format(); |
| 28 |
$format->set_size(10); |
| 29 |
$format->set_color('black'); |
| 30 |
$format->set_num_format(1); |
| 31 |
|
| 32 |
my $formatFP = $workbook->add_format(); |
| 33 |
$format->set_size(10); |
| 34 |
$format->set_color('black'); |
| 35 |
|
| 36 |
my $format_heading = $workbook->add_format(); |
| 37 |
$format_heading->set_size(10); |
| 38 |
$format_heading->set_bold(); |
| 39 |
$format_heading->set_color('black'); |
| 40 |
$format_heading->set_num_format(1); |
| 41 |
|
| 42 |
my $format_label = $workbook->add_format(); |
| 43 |
$format_heading->set_size(10); |
| 44 |
$format_heading->set_bold(); |
| 45 |
$format_heading->set_color('black'); |
| 46 |
$format_heading->set_num_format(1); |
| 47 |
|
| 48 |
my $format_comment = $workbook->add_format(); |
| 49 |
$format_heading->set_size(10); |
| 50 |
$format_heading->set_bold(); |
| 51 |
$format_heading->set_color('black'); |
| 52 |
$format_heading->set_num_format(1); |
| 53 |
|
| 54 |
$summary->set_column(0, 2, 20); |
| 55 |
$summary->set_column(3, 3, 30); |
| 56 |
|
| 57 |
my %stats; # scratch space |
| 58 |
|
| 59 |
open(F, "< $prefix.out"); |
| 60 |
while (!eof(F)) { |
| 61 |
$_ = <F>; |
| 62 |
|
| 63 |
if (m/^\s*$/) { |
| 64 |
# Nop; |
| 65 |
} if (m/^SEQUENCE$/) { |
| 66 |
$summary->write(1, 0, "Input Sequences", $format_heading); |
| 67 |
$summary->write(2, 0, "totalLength", $format_label); |
| 68 |
$summary->write(2, 3, "all letters, including N", $format_comment); |
| 69 |
$summary->write(3, 0, "totalLength", $format_label); |
| 70 |
$summary->write(3, 3, "ACGT only", $format_comment); |
| 71 |
|
| 72 |
$_ = <F>; |
| 73 |
if (m/totalLength\s+(\S+)\s+(\d+)\s+(\S+)\s+(\d+)\s+#\s+all\s+letters/) { |
| 74 |
$summary->write(0, 1, $1, $format_heading); |
| 75 |
$summary->write(0, 2, $3, $format_heading); |
| 76 |
|
| 77 |
# remember which column is for which assembly |
| 78 |
$stats{$1} = 1; |
| 79 |
$stats{$3} = 2; |
| 80 |
|
| 81 |
# and which assembly is in which column |
| 82 |
$stats{1} = $1; |
| 83 |
$stats{2} = $3; |
| 84 |
|
| 85 |
$summary->write(2, 1, "$2", $format); |
| 86 |
$summary->write(2, 2, "$4", $format); |
| 87 |
} else { |
| 88 |
die "Parse error $_\n"; |
| 89 |
} |
| 90 |
|
| 91 |
$_ = <F>; |
| 92 |
if (m/totalLength\s+(\S+)\s+(\d+)\s+(\S+)\s+(\d+)\s+#\s+ACGT/) { |
| 93 |
$summary->write(3, 1, "$2", $format); |
| 94 |
$summary->write(3, 2, "$4", $format); |
| 95 |
} else { |
| 96 |
die "Parse error $_\n"; |
| 97 |
} |
| 98 |
} if (m/^TANDEM REPEATS in (.*)$/) { |
| 99 |
my $asm = $1; |
| 100 |
|
| 101 |
$summary->write(5, 0, "Tandem Repeats", $format_heading); |
| 102 |
$summary->write(6, 0, "number", $format_label); |
| 103 |
$summary->write(7, 0, "totalLength", $format_label); |
| 104 |
$summary->write(8, 0, "coveredLength", $format_label); |
| 105 |
|
| 106 |
$_ = <F>; |
| 107 |
if (m/numberOfItems\s+(\d+)/) { |
| 108 |
$summary->write(6, $stats{$asm}, "$1", $format); |
| 109 |
} else { |
| 110 |
die "Parse error $_\n"; |
| 111 |
} |
| 112 |
|
| 113 |
$_ = <F>; |
| 114 |
if (m/totalLength\s+(\d+)\s+#\s+sum\s+of\s+lengths/) { |
| 115 |
$summary->write(7, $stats{$asm}, "$1", $format); |
| 116 |
} else { |
| 117 |
die "Parse error $_\n"; |
| 118 |
} |
| 119 |
|
| 120 |
$_ = <F>; |
| 121 |
if (m/coveredLength\s+(\d+)\s+#\s+sequence\s+covered/) { |
| 122 |
$summary->write(8, $stats{$asm}, "$1", $format); |
| 123 |
} else { |
| 124 |
die "Parse error $_\n"; |
| 125 |
} |
| 126 |
} if (m/^MATCHES IN RUNS$/) { |
| 127 |
$summary->write(10, 0, "Matches in Runs", $format_heading); |
| 128 |
$summary->write(11, 0, "runMissingFull", $format_label); |
| 129 |
$summary->write(11, 3, "covered by a run, not by a match, including N", $format_comment); |
| 130 |
$summary->write(12, 0, "runMissingACGT", $format_label); |
| 131 |
$summary->write(12, 3, "covered by a run, not by a match, ACGT only", $format_comment); |
| 132 |
|
| 133 |
$_ = <F>; |
| 134 |
if (m/runMissingFull\s+(\S+)\s+(\d+)\s+(\S+)\s+(\d+)\s+#\s+sequence\s+in\s+run,\s+not\s+covered,\s+including\s+N/) { |
| 135 |
$summary->write(11, 1, "$2", $format); |
| 136 |
$summary->write(11, 2, "$4", $format); |
| 137 |
} else { |
| 138 |
die "Parse error $_\n"; |
| 139 |
} |
| 140 |
|
| 141 |
$_ = <F>; |
| 142 |
if (m/runMissingFull\s+(\S+)\s+(\d+)\s+(\S+)\s+(\d+)\s+#\s+sequence\s+in\s+run,\s+not\s+covered,\s+ACGT\s+only/) { |
| 143 |
$summary->write(12, 1, "$2", $format); |
| 144 |
$summary->write(12, 2, "$4", $format); |
| 145 |
} else { |
| 146 |
die "Parse error $_\n"; |
| 147 |
} |
| 148 |
} if ((m/^MATCHES$/) || (m/^RUNS$/)) { |
| 149 |
my $begin; |
| 150 |
my $chrcov; |
| 151 |
|
| 152 |
if (m/^MATCHES$/) { |
| 153 |
$begin = 14; |
| 154 |
$summary->write($begin, 0, "Matches", $format_heading); |
| 155 |
$chrcov = $workbook->add_worksheet("Chr Cov Match"); |
| 156 |
} else { |
| 157 |
$begin = 26; |
| 158 |
$summary->write($begin, 0, "Runs", $format_heading); |
| 159 |
$chrcov = $workbook->add_worksheet("Chr Cov Run"); |
| 160 |
} |
| 161 |
|
| 162 |
$chrcov->set_column(0, 0, 10); |
| 163 |
$chrcov->set_column(1, 6, 20); |
| 164 |
|
| 165 |
$summary->write($begin+1, 0, "number", $format_label); |
| 166 |
$summary->write($begin+2, 0, "totalLength", $format_label); |
| 167 |
$summary->write($begin+3, 1, "histogram", $format_label); |
| 168 |
$summary->write($begin+4, 2, "histogram", $format_label); |
| 169 |
|
| 170 |
$summary->write($begin+5, 0, "coveredLengthFull", $format_label); |
| 171 |
$summary->write($begin+6, 0, "coveredLengthACGT", $format_label); |
| 172 |
$summary->write($begin+7, 0, "coveredLengthNonACGT", $format_label); |
| 173 |
$summary->write($begin+8, 1, "histogram", $format_label); |
| 174 |
$summary->write($begin+9, 2, "histogram", $format_label); |
| 175 |
|
| 176 |
$_ = <F>; |
| 177 |
if (m/numberOfItems\s+(\d+)/) { |
| 178 |
$summary->write($begin+1, 1, "$1", $format); |
| 179 |
} else { |
| 180 |
die "Parse error $_\n"; |
| 181 |
} |
| 182 |
|
| 183 |
$_ = <F>; |
| 184 |
if (m/matchLength\s+(\S+)\s+(\d+)\s+(\S+)\s+(\d+)\s#\sSum\s+of\s+lengths/) { |
| 185 |
$summary->write($begin+2, 1, "$2", $format); |
| 186 |
$summary->write($begin+2, 2, "$4", $format); |
| 187 |
} else { |
| 188 |
die "Parse error $_\n"; |
| 189 |
} |
| 190 |
|
| 191 |
histogram($begin+3); |
| 192 |
histogram($begin+4); |
| 193 |
|
| 194 |
$_ = <F>; |
| 195 |
if (m/coveredLength\s+(\S+)\s+(\d+)\s+(\S+)\s+(\d+)\s/) { |
| 196 |
$summary->write($begin+5, 1, "$2", $format); |
| 197 |
$summary->write($begin+5, 2, "$4", $format); |
| 198 |
} else { |
| 199 |
die "Parse error $_\n"; |
| 200 |
} |
| 201 |
|
| 202 |
$_ = <F>; |
| 203 |
if (m/coveredLength\s+(\S+)\s+(\d+)\s+(\S+)\s+(\d+)\s/) { |
| 204 |
$summary->write($begin+6, 1, "$2", $format); |
| 205 |
$summary->write($begin+6, 2, "$4", $format); |
| 206 |
} else { |
| 207 |
die "Parse error $_\n"; |
| 208 |
} |
| 209 |
|
| 210 |
$_ = <F>; |
| 211 |
if (m/coveredLength\s+(\S+)\s+(\d+)\s+(\S+)\s+(\d+)\s/) { |
| 212 |
$summary->write($begin+7, 1, "$2", $format); |
| 213 |
$summary->write($begin+7, 2, "$4", $format); |
| 214 |
} else { |
| 215 |
die "Parse error $_\n"; |
| 216 |
} |
| 217 |
|
| 218 |
histogram($begin+8); |
| 219 |
histogram($begin+9); |
| 220 |
|
| 221 |
# chromosome covered |
| 222 |
|
| 223 |
$chrcov->write(0, 1, "all sequence covered", $format_heading); |
| 224 |
$chrcov->write(0, 2, "all sequence length", $format_heading); |
| 225 |
$chrcov->write(0, 3, "percent covered", $format_heading); |
| 226 |
|
| 227 |
$chrcov->write(0, 4, "ACGT sequence covered", $format_heading); |
| 228 |
$chrcov->write(0, 5, "ACGT sequence length", $format_heading); |
| 229 |
$chrcov->write(0, 6, "percent covered", $format_heading); |
| 230 |
|
| 231 |
for (my $i=1; $i<23; $i++) { |
| 232 |
$chrcov->write($i, 0, "Chr$i", $format_heading); |
| 233 |
} |
| 234 |
$chrcov->write(23, 0, "ChrX", $format_heading); |
| 235 |
$chrcov->write(24, 0, "ChrY", $format_heading); |
| 236 |
$chrcov->write(25, 0, "ChrMT", $format_heading); |
| 237 |
$chrcov->write(26, 0, "ChrUn", $format_heading); |
| 238 |
|
| 239 |
$_ = <F>; |
| 240 |
while (m/chrCoveredLength\[\s*(\d+)\]\s+\S+\s+(\d+)\s+(\d+)\s+(\d+.\d+)%\s+(\d+)\s+(\d+)\s+(\d+.\d+)%\s+/) { |
| 241 |
my $i = $1 + 1; |
| 242 |
my $j = $1 + 2; |
| 243 |
|
| 244 |
$chrcov->write($i, 1, "$2", $format); |
| 245 |
$chrcov->write($i, 2, "$3", $format); |
| 246 |
$chrcov->write($i, 3, "=B$j / C$j * 100", $formatFP); |
| 247 |
$chrcov->write($i, 4, "$5", $format); |
| 248 |
$chrcov->write($i, 5, "$6", $format); |
| 249 |
$chrcov->write($i, 6, "=E$j / F$j * 100", $formatFP); |
| 250 |
|
| 251 |
$_ = <F>; |
| 252 |
} |
| 253 |
} |
| 254 |
} |
| 255 |
close(F); |
| 256 |
|
| 257 |
|
| 258 |
|
| 259 |
sub histogram ($) { |
| 260 |
my $x = shift @_; |
| 261 |
|
| 262 |
$_ = <F>; |
| 263 |
if (m/histogram\s+\S+\s+(\d+)\s+items\s+(\d+.\d+)\s+average\s+(\d+.\d+)\s+std.dev./) { |
| 264 |
$summary->write($x, 3, "items, average, std.dev.", $format_comment); |
| 265 |
$summary->write($x, 4, "$1", $format); |
| 266 |
$summary->write($x, 5, "$2", $formatFP); |
| 267 |
$summary->write($x, 6, "$3", $formatFP); |
| 268 |
} else { |
| 269 |
die "Parse error $_\n"; |
| 270 |
} |
| 271 |
} |
| 272 |
|
| 273 |
|
| 274 |
################################################################################ |
| 275 |
# |
| 276 |
# Nx |
| 277 |
# |
| 278 |
my $nx = $workbook->add_worksheet("Nx"); |
| 279 |
|
| 280 |
$nx->write(0, 1, "matches", $format_heading); |
| 281 |
$nx->write(0, 2, "runs", $format_heading); |
| 282 |
|
| 283 |
open(A, "< $prefix-matches.Nx"); |
| 284 |
open(B, "< $prefix-runs.Nx"); |
| 285 |
while (!eof(A)) { |
| 286 |
my $a = <A>; |
| 287 |
my $b = <B>; |
| 288 |
my ($ai, $an) = split '\s+', $a; |
| 289 |
my ($bi, $bn) = split '\s+', $b; |
| 290 |
die "Nx error: ai=$ai != bi=$bi\n" if ($ai != $bi); |
| 291 |
$nx->write($ai, 0, $ai); |
| 292 |
$nx->write($ai, 1, $an); |
| 293 |
$nx->write($ai, 2, $bn); |
| 294 |
} |
| 295 |
close(B); |
| 296 |
close(A); |
| 297 |
|
| 298 |
|
| 299 |
################################################################################ |
| 300 |
# |
| 301 |
# Histograms of lengths |
| 302 |
# |
| 303 |
# |
| 304 |
my $sheet = $workbook->add_worksheet("Matches Histogram"); |
| 305 |
$sheet->set_column(0, 4, 25); |
| 306 |
$sheet->write(0, 1, "$stats{1} length", $format_heading); |
| 307 |
$sheet->write(0, 2, "$stats{2} length", $format_heading); |
| 308 |
$sheet->write(0, 3, "$stats{1} covered N", $format_heading); |
| 309 |
$sheet->write(0, 4, "$stats{2} covered N", $format_heading); |
| 310 |
|
| 311 |
dumpHistogram($sheet, |
| 312 |
"$prefix-matches.AmatchLength.histogramdat", |
| 313 |
"$prefix-matches.BmatchLength.histogramdat", |
| 314 |
"$prefix-matches.AcoveredN.histogramdat", |
| 315 |
"$prefix-matches.BcoveredN.histogramdat"); |
| 316 |
|
| 317 |
|
| 318 |
my $sheet = $workbook->add_worksheet("Runs Histogram"); |
| 319 |
$sheet->set_column(0, 4, 25); |
| 320 |
$sheet->write(0, 1, "$stats{1} length", $format_heading); |
| 321 |
$sheet->write(0, 2, "$stats{2} length", $format_heading); |
| 322 |
$sheet->write(0, 3, "$stats{1} covered N", $format_heading); |
| 323 |
$sheet->write(0, 4, "$stats{2} covered N", $format_heading); |
| 324 |
|
| 325 |
dumpHistogram($sheet, |
| 326 |
"stats-runs.AmatchLength.histogramdat", |
| 327 |
"stats-runs.BmatchLength.histogramdat", |
| 328 |
"stats-runs.AcoveredN.histogramdat", |
| 329 |
"stats-runs.BcoveredN.histogramdat"); |
| 330 |
|
| 331 |
my $sheet = $workbook->add_worksheet("Run Missing Histogram"); |
| 332 |
$sheet->set_column(0, 4, 25); |
| 333 |
$sheet->write(0, 1, "$stats{1} full missing", $format_heading); |
| 334 |
$sheet->write(0, 3, "$stats{2} full missing", $format_heading); |
| 335 |
$sheet->write(0, 2, "$stats{1} ACGT missing", $format_heading); |
| 336 |
$sheet->write(0, 4, "$stats{2} ACGT missing", $format_heading); |
| 337 |
|
| 338 |
dumpHistogram($sheet, |
| 339 |
"stats.ARunMissingFull.histogramdat", |
| 340 |
"stats.BRunMissingFull.histogramdat", |
| 341 |
"stats.ARunMissingACGT.histogramdat", |
| 342 |
"stats.BRunMissingACGT.histogramdat"); |
| 343 |
|
| 344 |
|
| 345 |
|
| 346 |
sub dumpHistogram { |
| 347 |
my $sheet = shift @_; |
| 348 |
my @files = @_; |
| 349 |
my $col = 1; |
| 350 |
my $idx = 0; |
| 351 |
my @range; |
| 352 |
|
| 353 |
# I can't seem to find any way of deleting a cell once it's |
| 354 |
# written (opposed to simply clearing the cell). We want |
| 355 |
# to know what the maximum value in any histogram is, so |
| 356 |
# we can stop writing after that point. |
| 357 |
# |
| 358 |
my $maxIdx = 0; |
| 359 |
|
| 360 |
foreach my $f (@files) { |
| 361 |
$idx = 0; |
| 362 |
|
| 363 |
open(F, "< $f") or die "Failed to open dumpHistogram1 '$f'\n"; |
| 364 |
my @lines = <F>; |
| 365 |
close(F); |
| 366 |
|
| 367 |
# Don't use the last line in the file - this is the number |
| 368 |
# of things bigger than the max, we always report this. |
| 369 |
pop @lines; |
| 370 |
|
| 371 |
foreach my $l (@lines) { |
| 372 |
my ($r, $v) = split '\s+', $l; |
| 373 |
$maxIdx = $idx if ($v > 0) && ($maxIdx < $idx); |
| 374 |
$idx++; |
| 375 |
} |
| 376 |
} |
| 377 |
|
| 378 |
# Read the range from the first file -- we'll check that all the other files |
| 379 |
# use the same range. |
| 380 |
# |
| 381 |
$idx = 0; |
| 382 |
open(F, "< $files[0]") or die "Failed to open dumpHistogram2 '$files[0]'\n"; |
| 383 |
while (<F>) { |
| 384 |
my ($r, $v) = split '\s+', $_; |
| 385 |
$range[$idx] = $r; |
| 386 |
$sheet->write($idx+1, 0, "$r", $format); |
| 387 |
$idx++; |
| 388 |
last if ($idx > $maxIdx); |
| 389 |
} |
| 390 |
my $lastVal; |
| 391 |
while (<F>) { |
| 392 |
my ($r, $v) = split '\s+', $_; |
| 393 |
$lastVal = $r; |
| 394 |
} |
| 395 |
$sheet->write($idx+1, 0, "$lastVal", $format); |
| 396 |
close(F); |
| 397 |
|
| 398 |
|
| 399 |
|
| 400 |
foreach my $f (@files) { |
| 401 |
$idx = 0; |
| 402 |
|
| 403 |
open(F, "< $f") or die "Failed to open dumpHistogram3 '$f'\n"; |
| 404 |
while (<F>) { |
| 405 |
my ($r, $v) = split '\s+', $_; |
| 406 |
die "range error in file '$f' at idx $idx; $range[$idx] != $r\n" if ($range[$idx] != $r); |
| 407 |
$sheet->write($idx+1, $col, "$v", $format); |
| 408 |
$idx++; |
| 409 |
last if ($idx > $maxIdx); |
| 410 |
} |
| 411 |
my $lastVal; |
| 412 |
while (<F>) { |
| 413 |
my ($r, $v) = split '\s+', $_; |
| 414 |
$lastVal = $v; |
| 415 |
} |
| 416 |
$sheet->write($idx+1, $col, "$lastVal", $format); |
| 417 |
close(F); |
| 418 |
|
| 419 |
$col++; |
| 420 |
} |
| 421 |
} |
| 422 |
|
| 423 |
|
| 424 |
|
| 425 |
################################################################################ |
| 426 |
# |
| 427 |
# By chromosome histograms of lengths |
| 428 |
# |
| 429 |
|
| 430 |
my $sheet = $workbook->add_worksheet("Matches Chr Histogram"); |
| 431 |
$sheet->set_column(0, 32, 12); |
| 432 |
|
| 433 |
for (my $i=1; $i<23; $i++) { |
| 434 |
$sheet->write(0, $i, "Chr$i ACGT", $format_heading); |
| 435 |
} |
| 436 |
$sheet->write(0, 23, "ChrX ACGT", $format_heading); |
| 437 |
$sheet->write(0, 24, "ChrY ACGT", $format_heading); |
| 438 |
$sheet->write(0, 25, "ChrMT ACGT", $format_heading); |
| 439 |
$sheet->write(0, 26, "ChrUn ACGT", $format_heading); |
| 440 |
|
| 441 |
dumpHistogram($sheet, |
| 442 |
"stats-matches.chr00acgt.histogramdat", |
| 443 |
"stats-matches.chr01acgt.histogramdat", |
| 444 |
"stats-matches.chr02acgt.histogramdat", |
| 445 |
"stats-matches.chr03acgt.histogramdat", |
| 446 |
"stats-matches.chr04acgt.histogramdat", |
| 447 |
"stats-matches.chr05acgt.histogramdat", |
| 448 |
"stats-matches.chr06acgt.histogramdat", |
| 449 |
"stats-matches.chr07acgt.histogramdat", |
| 450 |
"stats-matches.chr08acgt.histogramdat", |
| 451 |
"stats-matches.chr09acgt.histogramdat", |
| 452 |
"stats-matches.chr10acgt.histogramdat", |
| 453 |
"stats-matches.chr11acgt.histogramdat", |
| 454 |
"stats-matches.chr12acgt.histogramdat", |
| 455 |
"stats-matches.chr13acgt.histogramdat", |
| 456 |
"stats-matches.chr14acgt.histogramdat", |
| 457 |
"stats-matches.chr15acgt.histogramdat", |
| 458 |
"stats-matches.chr16acgt.histogramdat", |
| 459 |
"stats-matches.chr17acgt.histogramdat", |
| 460 |
"stats-matches.chr18acgt.histogramdat", |
| 461 |
"stats-matches.chr19acgt.histogramdat", |
| 462 |
"stats-matches.chr20acgt.histogramdat", |
| 463 |
"stats-matches.chr21acgt.histogramdat", |
| 464 |
"stats-matches.chr22acgt.histogramdat", |
| 465 |
"stats-matches.chr23acgt.histogramdat", |
| 466 |
"stats-matches.chr24acgt.histogramdat", |
| 467 |
"stats-matches.chr25acgt.histogramdat"); |
| 468 |
|
| 469 |
|
| 470 |
my $sheet = $workbook->add_worksheet("Runs Chr ACGT Histogram"); |
| 471 |
$sheet->set_column(0, 32, 12); |
| 472 |
|
| 473 |
for (my $i=1; $i<23; $i++) { |
| 474 |
$sheet->write(0, $i, "Chr$i ACGT", $format_heading); |
| 475 |
} |
| 476 |
$sheet->write(0, 23, "ChrX ACGT", $format_heading); |
| 477 |
$sheet->write(0, 24, "ChrY ACGT", $format_heading); |
| 478 |
$sheet->write(0, 25, "ChrMT ACGT", $format_heading); |
| 479 |
$sheet->write(0, 26, "ChrUn ACGT", $format_heading); |
| 480 |
|
| 481 |
dumpHistogram($sheet, |
| 482 |
"stats-runs.chr00acgt.histogramdat", |
| 483 |
"stats-runs.chr01acgt.histogramdat", |
| 484 |
"stats-runs.chr02acgt.histogramdat", |
| 485 |
"stats-runs.chr03acgt.histogramdat", |
| 486 |
"stats-runs.chr04acgt.histogramdat", |
| 487 |
"stats-runs.chr05acgt.histogramdat", |
| 488 |
"stats-runs.chr06acgt.histogramdat", |
| 489 |
"stats-runs.chr07acgt.histogramdat", |
| 490 |
"stats-runs.chr08acgt.histogramdat", |
| 491 |
"stats-runs.chr09acgt.histogramdat", |
| 492 |
"stats-runs.chr10acgt.histogramdat", |
| 493 |
"stats-runs.chr11acgt.histogramdat", |
| 494 |
"stats-runs.chr12acgt.histogramdat", |
| 495 |
"stats-runs.chr13acgt.histogramdat", |
| 496 |
"stats-runs.chr14acgt.histogramdat", |
| 497 |
"stats-runs.chr15acgt.histogramdat", |
| 498 |
"stats-runs.chr16acgt.histogramdat", |
| 499 |
"stats-runs.chr17acgt.histogramdat", |
| 500 |
"stats-runs.chr18acgt.histogramdat", |
| 501 |
"stats-runs.chr19acgt.histogramdat", |
| 502 |
"stats-runs.chr20acgt.histogramdat", |
| 503 |
"stats-runs.chr21acgt.histogramdat", |
| 504 |
"stats-runs.chr22acgt.histogramdat", |
| 505 |
"stats-runs.chr23acgt.histogramdat", |
| 506 |
"stats-runs.chr24acgt.histogramdat", |
| 507 |
"stats-runs.chr25acgt.histogramdat"); |
| 508 |
|
| 509 |
|
| 510 |
|
| 511 |
|
| 512 |
my $sheet = $workbook->add_worksheet("Runs Chr Full Histogram"); |
| 513 |
$sheet->set_column(0, 32, 12); |
| 514 |
|
| 515 |
for (my $i=1; $i<23; $i++) { |
| 516 |
$sheet->write(0, $i, "Chr$i Full", $format_heading); |
| 517 |
} |
| 518 |
$sheet->write(0, 23, "ChrX FULL", $format_heading); |
| 519 |
$sheet->write(0, 24, "ChrY FULL", $format_heading); |
| 520 |
$sheet->write(0, 25, "ChrMT FULL", $format_heading); |
| 521 |
$sheet->write(0, 26, "ChrUn FULL", $format_heading); |
| 522 |
|
| 523 |
dumpHistogram($sheet, |
| 524 |
"stats-runs.chr00full.histogramdat", |
| 525 |
"stats-runs.chr01full.histogramdat", |
| 526 |
"stats-runs.chr02full.histogramdat", |
| 527 |
"stats-runs.chr03full.histogramdat", |
| 528 |
"stats-runs.chr04full.histogramdat", |
| 529 |
"stats-runs.chr05full.histogramdat", |
| 530 |
"stats-runs.chr06full.histogramdat", |
| 531 |
"stats-runs.chr07full.histogramdat", |
| 532 |
"stats-runs.chr08full.histogramdat", |
| 533 |
"stats-runs.chr09full.histogramdat", |
| 534 |
"stats-runs.chr10full.histogramdat", |
| 535 |
"stats-runs.chr11full.histogramdat", |
| 536 |
"stats-runs.chr12full.histogramdat", |
| 537 |
"stats-runs.chr13full.histogramdat", |
| 538 |
"stats-runs.chr14full.histogramdat", |
| 539 |
"stats-runs.chr15full.histogramdat", |
| 540 |
"stats-runs.chr16full.histogramdat", |
| 541 |
"stats-runs.chr17full.histogramdat", |
| 542 |
"stats-runs.chr18full.histogramdat", |
| 543 |
"stats-runs.chr19full.histogramdat", |
| 544 |
"stats-runs.chr20full.histogramdat", |
| 545 |
"stats-runs.chr21full.histogramdat", |
| 546 |
"stats-runs.chr22full.histogramdat", |
| 547 |
"stats-runs.chr23full.histogramdat", |
| 548 |
"stats-runs.chr24full.histogramdat", |
| 549 |
"stats-runs.chr25full.histogramdat"); |
| 550 |
|
| 551 |
|