Bugfix for printProgress in TraverseReadsNano
-- Must provide a single bp position (1:10) not the range of the read (1:1-50). ProgressMeter now checks at runtime for this problem as well.
This commit is contained in:
parent
6af1e21758
commit
a5901cdd20
|
|
@ -65,7 +65,8 @@ public class TraverseReadsNano<M,T> extends TraversalEngine<M,T,ReadWalker<M,T>,
|
|||
@Override
|
||||
public void progress(MapData lastProcessedMap) {
|
||||
if ( lastProcessedMap.refContext != null )
|
||||
printProgress(lastProcessedMap.refContext.getLocus());
|
||||
// note, need to use getStopLocation so we don't give an interval to ProgressMeterDaemon
|
||||
printProgress(lastProcessedMap.refContext.getLocus().getStopLocation());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -234,11 +234,13 @@ public class ProgressMeter {
|
|||
* the progress itself. A separate printing daemon periodically polls the meter to print out
|
||||
* progress
|
||||
*
|
||||
* @param loc Current location, can be null if you are at the end of the processing unit
|
||||
* @param loc Current location, can be null if you are at the end of the processing unit. Must
|
||||
* have size == 1 (cannot be multiple bases in size).
|
||||
* @param nTotalRecordsProcessed the total number of records we've processed
|
||||
*/
|
||||
public synchronized void notifyOfProgress(final GenomeLoc loc, final long nTotalRecordsProcessed) {
|
||||
if ( nTotalRecordsProcessed < 0 ) throw new IllegalArgumentException("nTotalRecordsProcessed must be >= 0");
|
||||
if ( loc.size() != 1 ) throw new IllegalArgumentException("GenomeLoc must have size == 1 but got " + loc);
|
||||
|
||||
// weird comparison to ensure that loc == null (in unmapped reads) is keep before maxGenomeLoc == null (on startup)
|
||||
this.maxGenomeLoc = loc == null ? loc : (maxGenomeLoc == null ? loc : loc.max(maxGenomeLoc));
|
||||
|
|
|
|||
Loading…
Reference in New Issue