Repository 'sum_fastqc'
hg clone https://toolshed.g2.bx.psu.edu/repos/estrain/sum_fastqc

Changeset 9:b3d943bc70ae (2022-02-23)
Previous changeset 8:5a9a44e23dad (2018-10-19)
Commit message:
Uploaded
modified:
sum_fastqc.pl
b
diff -r 5a9a44e23dad -r b3d943bc70ae sum_fastqc.pl
--- a/sum_fastqc.pl Fri Oct 19 14:23:35 2018 -0400
+++ b/sum_fastqc.pl Wed Feb 23 14:35:40 2022 +0000
[
@@ -123,8 +123,12 @@
 
    foreach $item (@larray) {
      my($lenrange,$count)=split(/\t/,$item);
-     my($l1,$l2)=split(/\-/,$lenrange);
-     $sum+=(($l1+$l2)/2)*$count; 
+     my(@lvals)=split(/\-/,$lenrange);
+     if(@lvals==2) {
+       $sum+=(($lvals[0]+$lvals[1])/2)*$count; 
+     } else {
+       $sum+=($lvals[0])*$count; 
+     }
    }
    $sum = sprintf("%.1f",$sum/$nreads);
    return $sum;