2009-04-24 12:33:35 +08:00
|
|
|
package org.broadinstitute.sting.gatk.walkers;
|
|
|
|
|
|
|
|
|
|
import org.broadinstitute.sting.gatk.refdata.RefMetaDataTracker;
|
2009-08-05 05:01:37 +08:00
|
|
|
import org.broadinstitute.sting.gatk.contexts.AlignmentContext;
|
2009-05-09 01:28:16 +08:00
|
|
|
|
2009-04-24 12:33:35 +08:00
|
|
|
/**
|
|
|
|
|
* Created by IntelliJ IDEA.
|
|
|
|
|
* User: ebanks
|
|
|
|
|
* Date: Apr 23, 2009
|
|
|
|
|
* Time: 2:52:28 PM
|
|
|
|
|
* To change this template use File | Settings | File Templates.
|
|
|
|
|
*/
|
2009-06-19 05:03:57 +08:00
|
|
|
@Requires({DataSource.READS,DataSource.REFERENCE, DataSource.REFERENCE_BASES})
|
2009-04-26 10:26:08 +08:00
|
|
|
public abstract class LocusWindowWalker<MapType, ReduceType> extends Walker<MapType, ReduceType> {
|
2009-04-24 12:33:35 +08:00
|
|
|
// Do we actually want to operate on the context?
|
2009-08-05 05:01:37 +08:00
|
|
|
public boolean filter(RefMetaDataTracker tracker, String ref, AlignmentContext context) {
|
2009-05-09 01:28:16 +08:00
|
|
|
return true; // We are keeping all the intervals
|
|
|
|
|
}
|
|
|
|
|
|
2009-08-05 05:01:37 +08:00
|
|
|
// Map over the org.broadinstitute.sting.gatk.contexts.AlignmentContext
|
|
|
|
|
public abstract MapType map(RefMetaDataTracker tracker, String ref, AlignmentContext context);
|
2009-04-24 12:33:35 +08:00
|
|
|
|
|
|
|
|
// Given result of map function
|
|
|
|
|
public abstract ReduceType reduceInit();
|
|
|
|
|
public abstract ReduceType reduce(MapType value, ReduceType sum);
|
2009-06-25 22:32:05 +08:00
|
|
|
}
|