Package org.biojava.bio.program.ssaha
Class HitMerger
- java.lang.Object
-
- org.biojava.bio.program.ssaha.HitMerger
-
- All Implemented Interfaces:
SearchListener
public class HitMerger extends Object implements SearchListener
A listener that merges overlapping hits and culls all hits under a given length.- Author:
- Matthew Pocock
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.biojava.bio.program.ssaha.SearchListener
SearchListener.Echo, SearchListener.FilterByLength, SearchListener.Tee, SearchListener.Wrapper
-
-
Constructor Summary
Constructors Constructor Description HitMerger(SearchListener delegate, int minLength)
Build a new HitMerger that will pass events on to a delegate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
endSearch(String seqID)
Indicates that a sequence has been searched against a DataStore.void
hit(int hitID, int queryOffset, int hitOffset, int hitLength)
There has been a hit between the query sequence and a database sequence.void
startSearch(String seqID)
Indicates that a sequence is about to be searched against a DataStore.
-
-
-
Constructor Detail
-
HitMerger
public HitMerger(SearchListener delegate, int minLength)
Build a new HitMerger that will pass events on to a delegate.- Parameters:
delegate
- the SearchListener to inform of all merged and filtered hitsminLength
- the minimum length a hit must reach to be passed on
-
-
Method Detail
-
startSearch
public void startSearch(String seqID)
Description copied from interface:SearchListener
Indicates that a sequence is about to be searched against a DataStore.- Specified by:
startSearch
in interfaceSearchListener
- Parameters:
seqID
- the id of the sequence to be searched
-
hit
public void hit(int hitID, int queryOffset, int hitOffset, int hitLength)
Description copied from interface:SearchListener
There has been a hit between the query sequence and a database sequence.- Specified by:
hit
in interfaceSearchListener
- Parameters:
hitID
- the number of the sequence hit; resolvable by String id = DataStore.seqNameForID(hitID)queryOffset
- the offset into the query sequencehitOffset
- the offset into the sequence hit in the databasehitLength
- the number of symbols hit
-
endSearch
public void endSearch(String seqID)
Description copied from interface:SearchListener
Indicates that a sequence has been searched against a DataStore.- Specified by:
endSearch
in interfaceSearchListener
- Parameters:
seqID
- the id of the sequence to be searched
-
-