Package htsjdk.beta.plugin.interval
Interface HtsQuery<RECORD>
- Type Parameters:
RECORD
- the type of records/iterators returned by queries
- All Superinterfaces:
Iterable<RECORD>
- All Known Subinterfaces:
HaploidReferenceDecoder
,HtsDecoder<H,
,R> ReadsDecoder
,VariantsDecoder
- All Known Implementing Classes:
BAMDecoder
,BAMDecoderV1_0
,CRAMDecoder
,CRAMDecoderV2_1
,CRAMDecoderV3_0
,FASTADecoderV1_0
,HtsgetBAMDecoder
,HtsgetBAMDecoderV1_2
,SAMDecoder
,SAMDecoderV1_0
,VCFDecoder
,VCFDecoderV3_2
,VCFDecoderV3_3
,VCFDecoderV4_0
,VCFDecoderV4_1
,VCFDecoderV4_2
,VCFDecoderV4_3
Common query interface for
HtsDecoder
s-
Method Summary
Modifier and TypeMethodDescriptionboolean
hasIndex()
Return true if the underlying resource has an index.boolean
Gte true if the underlying resource is queryable.iterator()
Get an iterator of all records in the underlying resource.default CloseableIterator
<RECORD> query
(HtsInterval interval, HtsQueryRule queryRule) Get an iterator over all records from the underlying resource that match the query argumentsdefault CloseableIterator
<RECORD> Get an iterator over all records from the underlying resource that match the query stringdefault CloseableIterator
<RECORD> query
(String queryName, long start, long end, HtsQueryRule queryRule) Get an iterator over all records from the underlying resource that match the query argumentsdefault CloseableIterator
<RECORD> query
(List<HtsInterval> intervals, HtsQueryRule queryRule) Get an iterator over all records from the underlying resource that match the query arguments.default CloseableIterator
<RECORD> queryContained
(HtsInterval interval) Get an iterator over all records from the underlying resource that are contained within the query intervaldefault CloseableIterator
<RECORD> queryContained
(String queryName, long start, long end) Gte an iterator over all records from the underlying resource that match the query argumentsdefault CloseableIterator
<RECORD> queryContained
(List<HtsInterval> intervals) Get an iterator over all records from the underlying resource that are contained within the query intervalsdefault CloseableIterator
<RECORD> queryOverlapping
(HtsInterval interval) Get an iterator over all records from the underlying resource that overlap the query intervaldefault CloseableIterator
<RECORD> queryOverlapping
(String queryName, long start, long end) Get an iterator over all records from the underlying resource that match the query argumentsdefault CloseableIterator
<RECORD> queryOverlapping
(List<HtsInterval> intervals) Get an iterator over all records from the underlying resource that overlap the query intervalsdefault CloseableIterator
<RECORD> queryStart
(String queryName, long start) Get an iterator over all records from the underlying resource that overlap the start positionMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
iterator
CloseableIterator<RECORD> iterator()Get an iterator of all records in the underlying resource. -
isQueryable
boolean isQueryable()Gte true if the underlying resource is queryable.- Returns:
- true if the underlying resource is queryable. this may be true even if the underlying
resource returns false for
hasIndex()
-
hasIndex
boolean hasIndex()Return true if the underlying resource has an index.- Returns:
- true if the underlying resource has an index
-
query
Get an iterator over all records from the underlying resource that match the query string- Parameters:
queryString
- decoder specific query string- Returns:
- an iterator over all records from the underlying resource that match the query string
-
query
default CloseableIterator<RECORD> query(String queryName, long start, long end, HtsQueryRule queryRule) Get an iterator over all records from the underlying resource that match the query arguments- Parameters:
queryName
- name to matchstart
- start of query intervalend
- end of query intervalqueryRule
- query rule value to use (fromHtsQueryRule
- Returns:
- an iterator over all records from the underlying resource that match the query arguments
-
queryOverlapping
Get an iterator over all records from the underlying resource that match the query arguments- Parameters:
queryName
- name to matchstart
- start of query intervalend
- end of query interval- Returns:
- an iterator over all records from the underlying resource that match the query arguments
-
queryContained
Gte an iterator over all records from the underlying resource that match the query arguments- Parameters:
queryName
- name to matchstart
- start of query intervalend
- end of query interval- Returns:
- an iterator over all records from the underlying resource that match the query arguments
-
query
Get an iterator over all records from the underlying resource that match the query arguments- Parameters:
interval
- interval to matchqueryRule
- query rule to use, fromHtsQueryRule
- Returns:
- an iterator over all records from the underlying resource that match the query arguments
-
queryOverlapping
Get an iterator over all records from the underlying resource that overlap the query interval- Parameters:
interval
- interval to match- Returns:
- an iterator over all records from the underlying resource that overlap the query interval
-
queryContained
Get an iterator over all records from the underlying resource that are contained within the query interval- Parameters:
interval
- interval to match- Returns:
- an iterator over all records from the underlying resource that are contained within the query interval
-
query
Get an iterator over all records from the underlying resource that match the query arguments. Callers much ensure that the intervals are in increasing order and do not overlap or abut.- Parameters:
intervals
- list of intervals to matchqueryRule
- query rule to use, fromHtsQueryRule
- Returns:
- an iterator over all records from the underlying resource that match the query arguments
-
queryOverlapping
Get an iterator over all records from the underlying resource that overlap the query intervals- Parameters:
intervals
- list of intervals to use- Returns:
- an iterator over all records from the underlying resource that overlap the query intervals
-
queryContained
Get an iterator over all records from the underlying resource that are contained within the query intervals- Parameters:
intervals
- list of intervals to use- Returns:
- an iterator over all records from the underlying resource that are contained within the query intervals
-
queryStart
Get an iterator over all records from the underlying resource that overlap the start position- Parameters:
queryName
- name to matchstart
- start position to overlap- Returns:
- an iterator over all records from the underlying resource that overlap the start position
-