Package org.biojava.bio.seq
Interface FeatureFilter
-
- All Superinterfaces:
Serializable
- All Known Subinterfaces:
BioSQLFeatureFilter,OptimizableFilter
- All Known Implementing Classes:
BioSQLAcceptAllFilter,BioSQLAcceptNoneFilter,BioSQLFeatureFilter.And,BioSQLFeatureFilter.ByName,BioSQLFeatureFilter.ByNote,BioSQLFeatureFilter.ByNoteTermOnly,BioSQLFeatureFilter.ByRank,BioSQLFeatureFilter.BySequenceName,BioSQLFeatureFilter.BySourceTerm,BioSQLFeatureFilter.BySourceTermName,BioSQLFeatureFilter.ByStrand,BioSQLFeatureFilter.ByTypeTerm,BioSQLFeatureFilter.ByTypeTermName,BioSQLFeatureFilter.ContainedByRichLocation,BioSQLFeatureFilter.HibernateFeatureFilter,BioSQLFeatureFilter.Not,BioSQLFeatureFilter.Or,BioSQLFeatureFilter.OverlapsRichLocation,FeatureFilter.And,FeatureFilter.AnnotationContains,FeatureFilter.ByAncestor,FeatureFilter.ByAnnotation,FeatureFilter.ByAnnotationType,FeatureFilter.ByChild,FeatureFilter.ByClass,FeatureFilter.ByComponentName,FeatureFilter.ByDescendant,FeatureFilter.ByFeature,FeatureFilter.ByPairwiseScore,FeatureFilter.ByParent,FeatureFilter.BySequenceName,FeatureFilter.BySource,FeatureFilter.ByType,FeatureFilter.ContainedByLocation,FeatureFilter.FrameFilter,FeatureFilter.HasAnnotation,FeatureFilter.Not,FeatureFilter.OnlyChildren,FeatureFilter.OnlyDescendants,FeatureFilter.Or,FeatureFilter.OverlapsLocation,FeatureFilter.ShadowContainedByLocation,FeatureFilter.ShadowOverlapsLocation,FeatureFilter.StrandFilter
public interface FeatureFilter extends Serializable
A filter for accepting or rejecting a feature.It is possible to write custom
FeatureFilters by implementing this interface. There are also a wide range of built-in features, and it is possible to build complex queries usingFeatureFilter.And,FeatureFilter.Or, andFeatureFilter.Not. Where possible, use of the built-in filters is preferable to writing new filters, since the methods in theFilterUtilsclass have access to special knowledge about the built-in filter types and how they relate to one another.If the filter is to be used in a remote process, it is recognized that it may be serialized and sent over to run remotely, rather than each feature being retrieved locally.
- Since:
- 1.0
- Author:
- Matthew Pocock, Thomas Down
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classFeatureFilter.AndA filter that returns all features accepted by both child filter.static classFeatureFilter.AnnotationContainsRetrieve features that contain a given annotation, and that the set of values contains the value given.static classFeatureFilter.ByAncestorFilter by applying a nestedFeatureFilterto all ancestor features.static classFeatureFilter.ByAnnotationRetrieve features that contain a given annotation with a given value.static classFeatureFilter.ByAnnotationTypeA filter that returns all features that have an annotation bundle that is of a given annotation type.static classFeatureFilter.ByChildFilter by applying a nestedFeatureFilterto the child features.static classFeatureFilter.ByClassFilter which accepts only those filters which are an instance of a specific Java classstatic classFeatureFilter.ByComponentNameAccepts features which are ComponentFeatures and have acomponentSequenceNameproperty of the specified value.static classFeatureFilter.ByDescendantFilter by applying a nestedFeatureFilterto all descendant features.static classFeatureFilter.ByFeatureAccept only features which are equal to the specified featurestatic classFeatureFilter.ByPairwiseScoreByPairwiseScoreis used to filterSimilarityPairFeatures by their score.static classFeatureFilter.ByParentFilter by applying a nestedFeatureFilterto the parent feature.static classFeatureFilter.BySequenceNameAccept features that reside on a sequence with a particular name.static classFeatureFilter.BySourceConstruct one of these to filter features by source.static classFeatureFilter.ByTypeConstruct one of these to filter features by type.static classFeatureFilter.ContainedByLocationA filter that returns all features contained within a location.static classFeatureFilter.FrameFilterAccept features with a given reading frame.static classFeatureFilter.HasAnnotationRetrieve features that contain a given annotation with any value.static classFeatureFilter.NotA filter that returns all features not accepted by a child filter.static classFeatureFilter.OnlyChildrenAccepts features where all immediate children meet the supplied filter.static classFeatureFilter.OnlyDescendantsAccepts features where all descendants meet the supplied filter.static classFeatureFilter.OrA filter that returns all features accepted by at least one child filter.static classFeatureFilter.OverlapsLocationA filter that returns all features overlapping a location.static classFeatureFilter.ShadowContainedByLocationA filter that accepts all features whose shadow is contained by a specifiedLocation.static classFeatureFilter.ShadowOverlapsLocationA filter that accepts all features whose shadow overlaps a specifiedLocation.static classFeatureFilter.StrandFilterAccept features with a given strandedness.
-
Field Summary
Fields Modifier and Type Field Description static FeatureFilterallAll features are selected by this filter.static FeatureFilterleafA filter which accepts features with no childrenstatic FeatureFilternoneNo features are selected by this filter.static FeatureFiltertop_levelA filter which accepts only top-level Features.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanaccept(Feature f)This method determines whether a feature is to be accepted.
-
-
-
Field Detail
-
all
static final FeatureFilter all
All features are selected by this filter.
-
none
static final FeatureFilter none
No features are selected by this filter.
-
top_level
static final FeatureFilter top_level
A filter which accepts only top-level Features. This is true isgetParent()returns aSequenceinstance.- Since:
- 1.3
-
leaf
static final FeatureFilter leaf
A filter which accepts features with no children- Since:
- 1.3
-
-