Commit 4f6480ac authored by nchernia's avatar nchernia
Browse files

updated makemega addstats to go with latest stats;

parent d3039d46
Loading
Loading
Loading
Loading
+15 −17
Changes for CPU/common/makemega_addstats.awk: 15 added lines, 17 removed lines.
Original line number Diff line number Diff line
@@ -26,24 +26,30 @@
# Juicer version 1.5
$1=="Sequenced"{
gsub(/,/,"",$4);
 total=total+$4;
 tot=tot+$4;
}
$1=="Unmapped:"{
gsub(/,/,"",$2);
 unmapped=unmapped+$2
 unm=unm+$2
}
$1=="Normal"{
gsub(/,/,"",$3);
 regular=regular+$3}
 norm=norm+$3}
$1=="Chimeric" && $2=="Paired:"{
gsub(/,/,"",$3);
 normal=normal+$3}
$2=="Ambiguous:"{
 chim=chim+$3}
$1=="MAPQ" && $2=="0:"{
gsub(/,/,"",$3);
 abnorm=abnorm+$3}
$1=="Alignable"{
 mapq0=mapq0+$3}
$1=="Collisions:"{
gsub(/,/,"",$2);
 coll=coll+$2}
$3=="Collisions:"{
gsub(/,/,"",$4);
 lowc=lowc+$4}
$1=="Ligation" {
gsub(/,/,"",$4);
 alignable=alignable+$4}
 lig=lig+$4}
$1=="Unique" {
gsub(/,/,"",$3);
 dedup=dedup+$3}
@@ -54,13 +60,5 @@ $1=="Optical"{
gsub(/,/,"",$3);
 optdups=optdups+$3}
END{
 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", "Alignable (Normal+Chimeric Paired):", alignable, alignable*100/total);
 printf("%s %'d\n", "Unique Reads:", dedup);
 printf("%s %'d\n", "PCR Duplicates:", dups);
  printf("%s %'d\n", "Optical Duplicates:", optdups);
  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 );
}