Mercurial > repos > stef > falco
changeset 72:b8751995b54e draft
Uploaded
author | stef |
---|---|
date | Fri, 27 Feb 2015 09:25:01 -0500 |
parents | e913d39d9a2e |
children | 78f10251a484 |
files | falco/bin/falco-filter-report falco/lib/perl/mkHtmlReportGalaxy.pl |
diffstat | 2 files changed, 5 insertions(+), 31 deletions(-) [+] |
line wrap: on
line diff
--- a/falco/bin/falco-filter-report Fri Feb 27 09:13:55 2015 -0500 +++ b/falco/bin/falco-filter-report Fri Feb 27 09:25:01 2015 -0500 @@ -91,4 +91,4 @@ ## REPORTING print STDOUT localtime() . " [$$] Creating HTML report\n"; -system( "perl $mkReport $base" ); +system( "perl $mkReport $base $qc_targets_txt" );
--- a/falco/lib/perl/mkHtmlReportGalaxy.pl Fri Feb 27 09:13:55 2015 -0500 +++ b/falco/lib/perl/mkHtmlReportGalaxy.pl Fri Feb 27 09:25:01 2015 -0500 @@ -5,7 +5,8 @@ use Spreadsheet::WriteExcel; $| = 1; -my $sample = shift || die "No input\n"; +my $sample = shift || die "Missing input\n"; +my $qc_targets_txt = shift || die "Missing input\n"; my $dir = shift || "./"; my $outdir = shift || "./"; my $pat = shift || ""; @@ -15,7 +16,6 @@ # QC # Results my @samples = (); -#open INDEX, ">$outdir/index.html"; my $htmlHead = qq( <!DOCTYPE html> <html> @@ -29,25 +29,7 @@ </head> <body> ); -#print INDEX $htmlHead; -# opendir DIR, "$dir"; -# while (my $cd = readdir DIR) { -# if ($cd =~ /(.*$pat)\.qc\.targets\.txt$/) { -# my $sam = $1; -# # next if ($sam =~ /R[12]/); -# print STDERR $1 . "\n"; -# push @samples, $1; -# } -# } -# close DIR; - -#print INDEX "<table>"; -#print INDEX "<tr><th>Download:</th><th><a href=\"runQC.xls\">runQC.xls</a></th>"; -#print INDEX "<tr><th>Sample</th><th>BAM</th><th>snp</th><th>indel</th><th>readCnt</th><th>Amp > 100</th>\n"; -#foreach my $sam (sort @samples) { -# print INDEX "<tr><td><a href=$sam.html>$sam</a></td><td><a href=$sam.bam>BAM</a></td><td><a href=$sam.bam.bai>BAI</a></td></tr>\n"; -#} my %link = (); my $excelBook0 = Spreadsheet::WriteExcel->new("$outdir/runQC.xls"); my $excel0 = $excelBook0->add_worksheet("table1"); @@ -67,9 +49,9 @@ my $excel2 = $excelBook->add_worksheet("table2"); print OUT $htmlHead; my %QC = (); -open QC, "<$dir/$sample.qc.targets.txt"; +open QC, "<$qc_targets_txt" or die "Unable to open qc_targets_txt\n"; readline QC; -print STDERR "Reading in $sample.qc.targets.txt\n"; +print STDERR "Reading in $qc_targets_txt\n"; while (<QC>) { chomp; my @row = split(/\t/, $_); @@ -215,18 +197,10 @@ $excelBook->close(); my @resCnt = map { $rescnt{$_} || 0 } qw/Falcosnp Falcoindel/; my $pctGood = sprintf("%.2f", $amp100 / scalar(keys(%QC)) * 100); -#print INDEX "<tr><td><a href=$sample.html>$sample</a></td><td><a href=$sample.bam>BAM</a></td><td>$resCnt[0]</td><td>$resCnt[1]</td><td>$readCnt</td><td>$pctGood</td></tr>\n"; my $ntbsAmps = join(",", map { s/^(.*?)\.chr.*$/$1/; $_; } keys(%ntbGenes)); push @{$excel0Ref}, [$sample, $runName, $readCnt, $pctGood, $ntbsAmps]; $excel0->write_col(0,0, $excel0Ref); $excelBook0->close(); -#print INDEX "</table>"; -#print INDEX "<img src=\"alnStats.png\">"; -#print INDEX "<img src=\"errStats.png\">"; -#print INDEX "<img src=\"qualStats.png\">"; -#print INDEX "</html>"; -#close INDEX; -