17 lines
435 B
Java
17 lines
435 B
Java
|
|
package org.broadinstitute.sting.gatk.walkers;
|
||
|
|
|
||
|
|
import net.sf.samtools.SAMRecord;
|
||
|
|
import org.broadinstitute.sting.gatk.LocusContext;
|
||
|
|
|
||
|
|
public class CountReadsWalker extends BasicReadWalker<Integer, Integer> {
|
||
|
|
public Integer map(LocusContext context, SAMRecord read) {
|
||
|
|
return 1;
|
||
|
|
}
|
||
|
|
|
||
|
|
public Integer reduceInit() { return 0; }
|
||
|
|
|
||
|
|
public Integer reduce(Integer value, Integer sum) {
|
||
|
|
return value + sum;
|
||
|
|
}
|
||
|
|
}
|