Sequence

AQPython.Query.Sequence(left, right, dist=9223372036854775807, limit=0)

Provide the ability to find annotations that are before 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 are before B. What that means is the end offset for an annotation from A must be before (or equal to) the start offset from an annotation in B. We ultimately return the annotations that meet this criteria. Unlike the Before function, we adjust the returned annotation a bit. For example, we set the annotType to “seq” and we use the A startOffset and the B endOffset. A distance operator can also be optionally specified. This would require an A annotation (endOffset) to occur n characters (or less) before the B annotation (startOffset).

Parameters
  • left – Dataframe of AQAnnotations, the ones we will return if they are before AQAnnotations from ‘right’.

  • right – Dataframe of AQAnnotations, the ones we are looking to see if are after AQAnnotations from ‘left’.

  • dist – Number of characters where endOffset from ‘left’ must occur before startOffset from ‘right’. Default is sys.maxsize.

  • limit – Number of AQAnnotations to return.

Returns

Dataframe of AQAnnotations