Package picard.vcf.filter
Class FilterApplyingVariantIterator
- java.lang.Object
-
- picard.vcf.filter.FilterApplyingVariantIterator
-
- All Implemented Interfaces:
htsjdk.samtools.util.CloseableIterator<htsjdk.variant.variantcontext.VariantContext>,Closeable,AutoCloseable,Iterator<htsjdk.variant.variantcontext.VariantContext>
public class FilterApplyingVariantIterator extends Object implements htsjdk.samtools.util.CloseableIterator<htsjdk.variant.variantcontext.VariantContext>
Iterator that dynamically applies filter strings to VariantContext records supplied by an underlying iterator. Returns all records from the underlying stream and does not remove any.
-
-
Field Summary
Fields Modifier and Type Field Description static StringALL_GTS_FILTEREDFilter string that is used to filter a Variant when all variant genotypes are filtered out.static StringPASS_FILTERThe "PASS"ing filter String.
-
Constructor Summary
Constructors Constructor Description FilterApplyingVariantIterator(Iterator<htsjdk.variant.variantcontext.VariantContext> iterator, Collection<VariantFilter> filters, Collection<GenotypeFilter> gtFilters)Constructs an iterator from an underlying iterator and the provided (possibly empty) collections of variant and genotype filters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()booleanhasNext()htsjdk.variant.variantcontext.VariantContextnext()Provides the next record from the underlying iterator after applying filter strings generated by the set of filters in use by the iterator.voidremove()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Field Detail
-
ALL_GTS_FILTERED
public static final String ALL_GTS_FILTERED
Filter string that is used to filter a Variant when all variant genotypes are filtered out.- See Also:
- Constant Field Values
-
PASS_FILTER
public static final String PASS_FILTER
The "PASS"ing filter String.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
FilterApplyingVariantIterator
public FilterApplyingVariantIterator(Iterator<htsjdk.variant.variantcontext.VariantContext> iterator, Collection<VariantFilter> filters, Collection<GenotypeFilter> gtFilters)
Constructs an iterator from an underlying iterator and the provided (possibly empty) collections of variant and genotype filters.
-
-
Method Detail
-
next
public htsjdk.variant.variantcontext.VariantContext next()
Provides the next record from the underlying iterator after applying filter strings generated by the set of filters in use by the iterator.
-
hasNext
public boolean hasNext()
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfacehtsjdk.samtools.util.CloseableIterator<htsjdk.variant.variantcontext.VariantContext>
-
-