Improved output. Can optionally limit the number reads actually called.

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@720 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
kiran 2009-05-15 00:07:57 +00:00
parent 7834b969b4
commit 36db44620b
1 changed files with 6 additions and 3 deletions

View File

@ -56,9 +56,9 @@ public class AnnotateSecondaryBase extends CommandLineProgram {
IlluminaParser iparser = new IlluminaParser(BUSTARD_DIR, LANE, CYCLE_BEGIN, CYCLE_END);
RawRead rr;
int basesConsistent = 0, basesTotal = 0;
int basesConsistent = 0, basesTotal = 0, readsTotal = 0;
while ((rr = iparser.next()) != null) {
while (readsTotal < CALLING_LIMIT && (rr = iparser.next()) != null) {
FourProbRead fpr = model.call(rr);
SAMRecord sr = constructSAMRecord(rr, fpr, sfh, RUN_BARCODE);
@ -80,12 +80,15 @@ public class AnnotateSecondaryBase extends CommandLineProgram {
if (basesTotal % 10000 == 0 && basesTotal > 0) {
System.out.printf("%% bases consistent: %d/%d (%4.4f)\r", basesConsistent, basesTotal, ((double) basesConsistent)/((double) basesTotal));
}
readsTotal++;
}
iparser.close();
sfw.close();
System.out.println("\nDone.");
System.out.printf("%% bases consistent: %d/%d (%4.4f)\n", basesConsistent, basesTotal, ((double) basesConsistent)/((double) basesTotal));
System.out.println("Done.");
return 0;
}