From 28c1330b4b1f3cbc5f6858624f4c6b12c1858a2e Mon Sep 17 00:00:00 2001 From: kiran Date: Tue, 24 Mar 2009 21:59:25 +0000 Subject: [PATCH] Fixed a bug wherein the loop variable for the second end of the pair was actually looping over the entire raw read (first and second ends combined). git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@178 348d0f76-0448-11de-a6fe-93d51630548a --- .../playground/fourbasecaller/FourBaseRecaller.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/java/src/org/broadinstitute/sting/playground/fourbasecaller/FourBaseRecaller.java b/java/src/org/broadinstitute/sting/playground/fourbasecaller/FourBaseRecaller.java index b554da162..897eb5728 100644 --- a/java/src/org/broadinstitute/sting/playground/fourbasecaller/FourBaseRecaller.java +++ b/java/src/org/broadinstitute/sting/playground/fourbasecaller/FourBaseRecaller.java @@ -51,7 +51,7 @@ public class FourBaseRecaller { FourIntensity[] intensities = ffp1.next().getIntensities(); String rsq = (CYCLE_START == 0) ? bfp1.next().getFirstReadSequence() : bfp1.next().getSecondReadSequence(); - for (int cycle = 0; cycle < intensities.length; cycle++) { + for (int cycle = 0; cycle < readLength; cycle++) { FourIntensity sig = intensities[cycle]; if (rsq.charAt(cycle) == 'A') { cmeans[cycle].add(Nucleotide.A, sig); } @@ -73,7 +73,7 @@ public class FourBaseRecaller { FourIntensity[] intensities = ffp2.next().getIntensities(); String rsq = (CYCLE_START == 0) ? bfp2.next().getFirstReadSequence() : bfp2.next().getSecondReadSequence(); - for (int cycle = 0; cycle < intensities.length; cycle++) { + for (int cycle = 0; cycle < readLength; cycle++) { FourIntensity sig = intensities[cycle]; NucleotideChannelMeans mus = cmeans[cycle]; @@ -103,11 +103,11 @@ public class FourBaseRecaller { FourIntensity[] intensities = ffp3.next().getIntensities(); - byte[] asciiseq = new byte[intensities.length]; - byte[] bestqual = new byte[intensities.length]; - byte[] nextbestqual = new byte[intensities.length]; + byte[] asciiseq = new byte[readLength]; + byte[] bestqual = new byte[readLength]; + byte[] nextbestqual = new byte[readLength]; - for (int cycle = 0; cycle < intensities.length; cycle++) { + for (int cycle = 0; cycle < readLength; cycle++) { FourIntensity fi = intensities[cycle]; double[] likes = new double[4];