skbio.metadata.IntervalMetadata.query#
- IntervalMetadata.query(bounds=None, metadata=None)[source]#
Yield
Intervalobject with the bounds and attributes.The
Intervalobjects must meet both requirements: 1) overlap with any of the spans specified bybounds; 2) satisfymetadataspecification. For instance, you can identify all the recA genes that overlap with (10, 100) or (900, 1000) with this codeinterval_metadata.query([(10, 100), (900, 1000)], {'gene': 'recA'}).- Parameters:
- boundsiterable of tuples of int pair, optional
Specifies bounds to look for the
Intervalobjects. An satisfying interval feature only need to overlap with one bound. Default (None) means allIntervalsmeet this requirement.- metadatadict, optional
A dictionary of key word attributes associated with the
Intervalobject. It specifies what metadata keywords and values to look for. Default (None) means allIntervalsmeet this requirement.
- Yields:
- Interval
Intervalobject satisfying the search criteria.