changeset 9:b3d943bc70ae draft default tip

Uploaded
author estrain
date Wed, 23 Feb 2022 14:35:40 +0000
parents 5a9a44e23dad
children
files sum_fastqc.pl
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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;