Commit d95bf1dc authored by Muhammad S Shamim's avatar Muhammad S Shamim
Browse files

update add stats file

parent 70388c1c
Loading
Loading
Loading
Loading
+28 −18
Changes for CPU/common/makemega_addstats.awk: 28 added lines, 18 removed lines.
Original line number Diff line number Diff line
@@ -26,39 +26,49 @@
# Juicer version 2.0
$1=="Sequenced"{
gsub(/,/,"",$4);
  tot=tot+$4;
 total=total+$4;
}
$1=="Unmapped:"{
gsub(/,/,"",$2);
 unm=unm+$2
 unmapped=unmapped+$2
}
$1=="Normal"{
gsub(/,/,"",$3);
  norm=norm+$3}
 regular=regular+$3}
$1=="Chimeric" && $2=="Paired:"{
gsub(/,/,"",$3);
  chim=chim+$3}
$1=="MAPQ" && $2=="0:"{
 normal=normal+$3}
$2=="Ambiguous:"{
gsub(/,/,"",$3);
  mapq0=mapq0+$3}
$1=="Collisions:"{
  gsub(/,/,"",$2);
  coll=coll+$2}
$3=="Collisions:"{
  gsub(/,/,"",$4);
  lowc=lowc+$4}
$1=="Ligation" {
 abnorm=abnorm+$3}
$1=="Alignable"{
gsub(/,/,"",$4);
  lig=lig+$4}
 alignable=alignable+$4}
$1=="Unique" {
gsub(/,/,"",$3);
 dedup=dedup+$3}
$1=="PCR"{
$1=="Duplicates:"{
gsub(/,/,"",$3);
 dups=dups+$3}
$1=="Optical"{
$1=="Ligation"{
gsub(/,/,"",$4);
 ligs=ligs+$4}
$1=="Single"{
gsub(/,/,"",$3);
  optdups=optdups+$3}
 single=single+$3}
$1=="Average"{
 avg_insert=avg_insert+$4;
}
END{
  printf("Sequenced Read Pairs:  %'d\n Normal Paired: %'d (%0.2f%)\n Chimeric Paired: %'d (%0.2f%)\n Collisions: %'d (%0.2f%)\n Low MAPQ Collisions: %'d (%0.2f%)\n Unmapped: %'d (%0.2f%)\n MAPQ 0: %'d (%0.2f%)\n Ligation Motif Present: %'d (%0.2f%)\nAlignable (Normal+Chimeric Paired): %'d (%0.2f%)\n Unique Reads: %'d\n PCR Duplicates: %'d\n Optical Duplicates: %'d\n", tot, norm, norm*100/tot, chim, chim*100/tot, coll, coll*100/tot, lowc, lowc*100/tot, unm, unm*100/tot, mapq0, mapq0*100/tot, lig, lig*100/tot, norm+chim, (norm+chim)*100/tot, dedup, dups, optdups );
 printf("%s %'d\n", "Sequenced Read Pairs:", total);
 printf(" %s %'d (%0.2f%)\n", "Normal Paired:", regular, regular*100/total);
 printf(" %s %'d (%0.2f%)\n", "Chimeric Paired:", normal, normal*100/total);
 printf(" %s %'d (%0.2f%)\n", "Chimeric Ambiguous:", abnorm, abnorm*100/total);
 printf(" %s %'d (%0.2f%)\n", "Unmapped:", unmapped, unmapped*100/total);
 printf(" %s %'d (%0.2f%)\n", "Ligation Motif Present:", ligs, ligs*100/total);
 printf(" %s %'d (%0.2f%)\n", "Single Alignment:", single, single*100/total);
 printf(" %s %0.2f\n", "Average insert size:", avg_insert/NR);
 printf(" %s %'d (%0.2f%)\n", "Alignable (Normal+Chimeric Paired):", alignable, alignable*100/total);
 printf("%s %'d\n", "Unique Reads:", dedup);
 printf("%s %'d\n", "Duplicates:", dups);
}