From 36db44620b7787c5f17274633db2018340f707bf Mon Sep 17 00:00:00 2001 From: kiran Date: Fri, 15 May 2009 00:07:57 +0000 Subject: [PATCH] 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 --- .../sting/secondarybase/AnnotateSecondaryBase.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/java/src/org/broadinstitute/sting/secondarybase/AnnotateSecondaryBase.java b/java/src/org/broadinstitute/sting/secondarybase/AnnotateSecondaryBase.java index a0fe74454..537dd105f 100755 --- a/java/src/org/broadinstitute/sting/secondarybase/AnnotateSecondaryBase.java +++ b/java/src/org/broadinstitute/sting/secondarybase/AnnotateSecondaryBase.java @@ -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; }