Skip to main content
`Ctrl`+`K`

# skbio.metadata.IntervalMetadata.query

IntervalMetadata.query(bounds=None, metadata=None)

  Yield `Interval` object with the bounds and attributes.

  The `Interval` objects must meet both requirements: 1) overlap with any of the spans specified by `bounds`; 2) satisfy `metadata` specification. For instance, you can identify all the recA genes that overlap with (10, 100) or (900, 1000) with this code `interval_metadata.query([(10, 100), (900, 1000)], {'gene': 'recA'})`.

  Parameters:
    bounds iterable of tuples of int pair, optional

      Specifies bounds to look for the `Interval` objects. An satisfying interval feature only need to overlap with one bound. Default (`None`) means all `Intervals` meet this requirement.

    metadata dict, optional

      A dictionary of key word attributes associated with the `Interval` object. It specifies what metadata keywords and values to look for. Default (`None`) means all `Intervals` meet this requirement.

  Yields:
    Interval

      `Interval` object satisfying the search criteria.