2009-03-16 06:42:24 +08:00
|
|
|
package org.broadinstitute.sting.gatk.walkers;
|
|
|
|
|
|
|
|
|
|
import org.broadinstitute.sting.gatk.refdata.ReferenceOrderedDatum;
|
|
|
|
|
import org.broadinstitute.sting.gatk.LocusContext;
|
|
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Created by IntelliJ IDEA.
|
|
|
|
|
* User: mdepristo
|
|
|
|
|
* Date: Feb 22, 2009
|
|
|
|
|
* Time: 2:52:28 PM
|
|
|
|
|
* To change this template use File | Settings | File Templates.
|
|
|
|
|
*/
|
2009-03-27 23:40:45 +08:00
|
|
|
public abstract class LocusWalker<MapType, ReduceType> extends Walker<MapType, ReduceType> {
|
2009-03-16 06:42:24 +08:00
|
|
|
// Do we actually want to operate on the context?
|
2009-03-27 00:22:35 +08:00
|
|
|
public boolean filter(List<ReferenceOrderedDatum> rodData, char ref, LocusContext context) {
|
|
|
|
|
return true; // We are keeping all the reads
|
|
|
|
|
}
|
2009-03-16 06:42:24 +08:00
|
|
|
|
|
|
|
|
// Map over the org.broadinstitute.sting.gatk.LocusContext
|
2009-03-27 00:22:35 +08:00
|
|
|
public abstract MapType map(List<ReferenceOrderedDatum> rodData, char ref, LocusContext context);
|
2009-03-16 06:42:24 +08:00
|
|
|
|
|
|
|
|
// Given result of map function
|
2009-03-27 00:22:35 +08:00
|
|
|
public abstract ReduceType reduceInit();
|
|
|
|
|
public abstract ReduceType reduce(MapType value, ReduceType sum);
|
2009-03-16 06:42:24 +08:00
|
|
|
}
|