public List<VariantCandidate> emitWindow(String contig, int start, int end) throws Exception {
        if (! refReader.containsContig(contig)) {
            //throw new IllegalArgumentException("Reference does not have contig : " + contig);
            System.err.println("Warning, reference does not contain contig: " + contig + ".  Skipping it.");
            return null;
        }

        if (! alnCol.containContig(contig)) {
            System.err.println("Warning, alignment does not contain contig: " + contig + ".  Skipping it.");
            return null;
        }

        try {
            refReader.resetTo(contig, Math.max(1, start-refReader.windowSize/2));
            alnCol.advanceTo(contig, start);

            int curPos = start;
            while(curPos < end && alnCol.hasMoreReadsInCurrentContig()) {
                VariantCandidate var = emitLine(contig);
                if (var != null)
                    this.variants.add(var);

                if (refReader.indexOfLeftEdge()<(alnCol.getCurrentPosition()-refReader.windowSize/2)) {
                    try {
                        refReader.shift();
                    }
                    catch(EndOfContigException ex) {
                        //don't worry about it
                    }
                }
                alnCol.advance(1);
                curPos++;

                //Sanity check
                if (alnCol.getCurrentPosition() != (curPos)) {
                    System.err.println("Yikes, bam reader position is not equal to current position");
                }
            }

            System.out.println("[" + contig + ":" + start + "-" + end + "] yields " + variants.size() + " variant candidates");

            return this.variants;

        } catch (EndOfContigException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }

        return null;
    }