Contains¶
-
AQPython.Query.
Contains
(left, right, limit=0, negate=False)¶ Provide the ability to find annotations that contain another annotation.
The input is 2 Dataframes of AQAnnotations. We will call them A and B. The purpose is to find those annotations in A that contain B. What that means is the start/end offset for an annotation from A must contain the start/end offset from an annotation in B. The start/end offsets are inclusive. We ultimately return the container annotations (A) that meet this criteria. We also deduplicate the A annotations as there could be many annotations from B that could be contained by an annotation in A but it only makes sense to return the unique container annotations. There is also the option of negating the query (think Not Contains) so that we return only A where it does not contain B.
- Parameters
left – Dataframe of AQAnnotations, the ones we will return if they contain AQAnnotations from ‘right’.
right – Dataframe of AQAnnotations, the ones we are looking to see if they occur in the AQAnnotations from ‘left’.
limit – Number of AQAnnotations to return.
negate – Whether to negate the entire query (think NOT contains). Default is false.
- Returns
Dataframe of AQAnnotations