Add a RemoveProgramRecords annotation
* Add the RemoveProgramRecords annotation to LocusWalker
This commit is contained in:
parent
524d7ea306
commit
addbfd6437
|
|
@ -800,8 +800,7 @@ public class GenomeAnalysisEngine {
|
||||||
if (argCollection.removeProgramRecords && argCollection.keepProgramRecords)
|
if (argCollection.removeProgramRecords && argCollection.keepProgramRecords)
|
||||||
throw new UserException.BadArgumentValue("rpr / kpr", "Cannot enable both options");
|
throw new UserException.BadArgumentValue("rpr / kpr", "Cannot enable both options");
|
||||||
|
|
||||||
// LocusWalkers don't use program records, so remove them by default to save memory
|
boolean removeProgramRecords = argCollection.removeProgramRecords || walker.getClass().isAnnotationPresent(RemoveProgramRecords.class);
|
||||||
boolean removeProgramRecords = (this.walker instanceof LocusWalker) || argCollection.removeProgramRecords;
|
|
||||||
|
|
||||||
if (argCollection.keepProgramRecords)
|
if (argCollection.keepProgramRecords)
|
||||||
removeProgramRecords = false;
|
removeProgramRecords = false;
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ import org.broadinstitute.sting.gatk.refdata.RefMetaDataTracker;
|
||||||
@Requires({DataSource.READS,DataSource.REFERENCE, DataSource.REFERENCE_BASES})
|
@Requires({DataSource.READS,DataSource.REFERENCE, DataSource.REFERENCE_BASES})
|
||||||
@PartitionBy(PartitionType.LOCUS)
|
@PartitionBy(PartitionType.LOCUS)
|
||||||
@ReadFilters({UnmappedReadFilter.class,NotPrimaryAlignmentFilter.class,DuplicateReadFilter.class,FailsVendorQualityCheckFilter.class})
|
@ReadFilters({UnmappedReadFilter.class,NotPrimaryAlignmentFilter.class,DuplicateReadFilter.class,FailsVendorQualityCheckFilter.class})
|
||||||
|
@RemoveProgramRecords
|
||||||
public abstract class LocusWalker<MapType, ReduceType> extends Walker<MapType, ReduceType> {
|
public abstract class LocusWalker<MapType, ReduceType> extends Walker<MapType, ReduceType> {
|
||||||
// Do we actually want to operate on the context?
|
// Do we actually want to operate on the context?
|
||||||
public boolean filter(RefMetaDataTracker tracker, ReferenceContext ref, AlignmentContext context) {
|
public boolean filter(RefMetaDataTracker tracker, ReferenceContext ref, AlignmentContext context) {
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
package org.broadinstitute.sting.gatk.walkers;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created with IntelliJ IDEA.
|
||||||
|
* User: thibault
|
||||||
|
* Date: 8/2/12
|
||||||
|
* Time: 1:58 PM
|
||||||
|
* To change this template use File | Settings | File Templates.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import java.lang.annotation.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Indicates that program records should be removed from SAM headers by default for this walker
|
||||||
|
*/
|
||||||
|
@Documented
|
||||||
|
@Inherited
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@Target(ElementType.TYPE)
|
||||||
|
public @interface RemoveProgramRecords {
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue