From aedb9f67346a87dd391bf2c15429005f50c3b038 Mon Sep 17 00:00:00 2001 From: hanna Date: Wed, 19 May 2010 01:23:29 +0000 Subject: [PATCH] Bring SAMPileupCodec into compliance with new interface. git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@3383 348d0f76-0448-11de-a6fe-93d51630548a --- .../refdata/features/sampileup/SAMPileupCodec.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/java/src/org/broadinstitute/sting/gatk/refdata/features/sampileup/SAMPileupCodec.java b/java/src/org/broadinstitute/sting/gatk/refdata/features/sampileup/SAMPileupCodec.java index b9278ad30..5782a43dd 100644 --- a/java/src/org/broadinstitute/sting/gatk/refdata/features/sampileup/SAMPileupCodec.java +++ b/java/src/org/broadinstitute/sting/gatk/refdata/features/sampileup/SAMPileupCodec.java @@ -29,9 +29,8 @@ import org.broad.tribble.FeatureCodec; import org.broad.tribble.Feature; import org.broad.tribble.exception.CodecLineParsingException; import org.broad.tribble.util.ParsingUtils; -import org.broadinstitute.sting.utils.GenomeLoc; +import org.broad.tribble.util.LineReader; -import java.io.File; import java.util.ArrayList; import java.util.regex.Pattern; import java.util.regex.Matcher; @@ -44,7 +43,7 @@ import static org.broadinstitute.sting.gatk.refdata.features.sampileup.SAMPileup * @author mhanna * @version 0.1 */ -public class SAMPileupCodec implements FeatureCodec { +public class SAMPileupCodec implements FeatureCodec { // the number of tokens we expect to parse from a dbSNP line private static final int expectedTokenCount = 10; private static final char fldDelim = '\t'; @@ -59,16 +58,16 @@ public class SAMPileupCodec implements FeatureCodec { /** * Return the # of header lines for this file. * - * @param f the file + * @param reader the line reader * @return 0 in this case, we assume no header lines. The DbSNP file may have a * header line beginning with '#', but we can ignore that in the decode function. */ - public int headerLineCount(File f) { + public int readHeader(LineReader reader) { // we don't require a header line, but it may exist. We'll deal with that above. return 0; } - public Feature decode(String line) { + public SAMPileupFeature decode(String line) { // 0 1 2 3 4 5 6 7 //* chrX 466 T Y 170 170 88 32 ... (piles of read bases and quals follow) //* chrX 141444 * +CA/+CA 32 468 255 25 +CA * 5 2 12 6