protected void noteCurrentRecord(VariantContext vc) { super.noteCurrentRecord(vc); // first, check for errors // then, update mostUpstreamWritableLoc: int mostUpstreamWritableIndex = vc.getStart() - maxCachingStartDistance; this.mostUpstreamWritableLoc = Math.max(BEFORE_MOST_UPSTREAM_LOC, mostUpstreamWritableIndex); } }
@Override protected void noteCurrentRecord(VariantContext vc) { super.noteCurrentRecord(vc); // first, check for errors // then, update mostUpstreamWritableLoc: int mostUpstreamWritableIndex = vc.getStart() - maxCachingStartDistance; this.mostUpstreamWritableLoc = Math.max(BEFORE_MOST_UPSTREAM_LOC, mostUpstreamWritableIndex); }
@Override protected void noteCurrentRecord(VariantContext vc) { super.noteCurrentRecord(vc); // first, check for errors // then, update mostUpstreamWritableLoc: int mostUpstreamWritableIndex = vc.getStart() - maxCachingStartDistance; this.mostUpstreamWritableLoc = Math.max(BEFORE_MOST_UPSTREAM_LOC, mostUpstreamWritableIndex); }
/** * add a record to the file * * @param vc the Variant Context object */ @Override public synchronized void add(VariantContext vc) { /* Note that the code below does not prevent the successive add()-ing of: (chr1, 10), (chr20, 200), (chr15, 100) since there is no implicit ordering of chromosomes: */ VCFRecord firstRec = queue.peek(); if (firstRec != null && !vc.getContig().equals(firstRec.vc.getContig())) { // if we hit a new contig, flush the queue if (finishedChromosomes.contains(vc.getContig())) throw new IllegalArgumentException("Added a record at " + vc.getContig() + ":" + vc.getStart() + ", but already finished with chromosome" + vc.getContig()); finishedChromosomes.add(firstRec.vc.getContig()); stopWaitingToSort(); } noteCurrentRecord(vc); // possibly overwritten queue.add(new VCFRecord(vc)); emitSafeRecords(); }
/** * add a record to the file * * @param vc the Variant Context object */ @Override public synchronized void add(VariantContext vc) { /* Note that the code below does not prevent the successive add()-ing of: (chr1, 10), (chr20, 200), (chr15, 100) since there is no implicit ordering of chromosomes: */ VCFRecord firstRec = queue.peek(); if (firstRec != null && !vc.getChr().equals(firstRec.vc.getChr())) { // if we hit a new contig, flush the queue if (finishedChromosomes.contains(vc.getChr())) throw new IllegalArgumentException("Added a record at " + vc.getChr() + ":" + vc.getStart() + ", but already finished with chromosome" + vc.getChr()); finishedChromosomes.add(firstRec.vc.getChr()); stopWaitingToSort(); } noteCurrentRecord(vc); // possibly overwritten queue.add(new VCFRecord(vc)); emitSafeRecords(); }
/** * add a record to the file * * @param vc the Variant Context object */ @Override public synchronized void add(VariantContext vc) { /* Note that the code below does not prevent the successive add()-ing of: (chr1, 10), (chr20, 200), (chr15, 100) since there is no implicit ordering of chromosomes: */ VCFRecord firstRec = queue.peek(); if (firstRec != null && !vc.getContig().equals(firstRec.vc.getContig())) { // if we hit a new contig, flush the queue if (finishedChromosomes.contains(vc.getContig())) throw new IllegalArgumentException("Added a record at " + vc.getContig() + ":" + vc.getStart() + ", but already finished with chromosome" + vc.getContig()); finishedChromosomes.add(firstRec.vc.getContig()); stopWaitingToSort(); } noteCurrentRecord(vc); // possibly overwritten queue.add(new VCFRecord(vc)); emitSafeRecords(); }