A helper class to create the masks for the sequenom design maker.
This project is now officially done. git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@1834 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
3553fc9ec0
commit
311ab8da5a
|
|
@ -0,0 +1,43 @@
|
||||||
|
package org.broadinstitute.sting.gatk.walkers.fasta;
|
||||||
|
|
||||||
|
import org.broadinstitute.sting.gatk.contexts.AlignmentContext;
|
||||||
|
import org.broadinstitute.sting.gatk.contexts.ReferenceContext;
|
||||||
|
import org.broadinstitute.sting.gatk.refdata.RefMetaDataTracker;
|
||||||
|
import org.broadinstitute.sting.gatk.refdata.ReferenceOrderedDatum;
|
||||||
|
import org.broadinstitute.sting.gatk.walkers.RodWalker;
|
||||||
|
import org.broadinstitute.sting.utils.genotype.Variation;
|
||||||
|
|
||||||
|
import java.util.Iterator;
|
||||||
|
|
||||||
|
public class CreateSequenomMask extends RodWalker<Integer, Integer> {
|
||||||
|
|
||||||
|
public void initialize() {}
|
||||||
|
|
||||||
|
public Integer map(RefMetaDataTracker rodData, ReferenceContext ref, AlignmentContext context) {
|
||||||
|
int result = 0;
|
||||||
|
|
||||||
|
Iterator<ReferenceOrderedDatum> rods = rodData.getAllRods().iterator();
|
||||||
|
while (rods.hasNext()) {
|
||||||
|
ReferenceOrderedDatum rod = rods.next();
|
||||||
|
if ( rod instanceof Variation && ((Variation)rod).isSNP() ) {
|
||||||
|
out.println(context.getLocation());
|
||||||
|
result = 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer reduceInit() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer reduce(Integer value, Integer sum) {
|
||||||
|
return value + sum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onTraversalDone(Integer sum) {
|
||||||
|
logger.info("Found " + sum + " masking sites.");
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue