biopython v1.71.0 Bio.SeqFeature.AfterPosition

Specify a position where the actual location is found after it.

Arguments:

  • position - The lower boundary of where the location can occur.
  • extension - An optional argument which must be zero since we don’t have an extension. The argument is provided so that the same number of arguments can be passed to all position types.

This is used to specify positions like (>10..100) where the location occurs somewhere after position 10.

 >>> p = AfterPosition(7)
 >>> p
 AfterPosition(7)
 >>> print(p)
 >7
 >>> int(p)
 7
 >>> p + 10
 17

 >>> isinstance(p, AfterPosition)
 True
 >>> isinstance(p, AbstractPosition)
 True
 >>> isinstance(p, int)
 True

Note this potentially surprising behaviour:

 >>> p == ExactPosition(7)
 True
 >>> p == BeforePosition(7)
 True

Just remember that for equality and sorting the position objects act like integers.

Link to this section Summary

Functions

Create a new instance of the AfterPosition object

Represent the location as a string for debugging

Return a representation of the AfterPosition object (with python counting)

Return a copy of the location after the parent is reversed (PRIVATE)

Return a copy of the position object with its location shifted (PRIVATE)

Legacy attribute to get extension (zero) as integer (OBSOLETE)

Legacy attribute to get position as integer (OBSOLETE)

Link to this section Functions

Create a new instance of the AfterPosition object.

Represent the location as a string for debugging.

Return a representation of the AfterPosition object (with python counting).

Return a copy of the location after the parent is reversed (PRIVATE).

Return a copy of the position object with its location shifted (PRIVATE).

Legacy attribute to get extension (zero) as integer (OBSOLETE).

Legacy attribute to get position as integer (OBSOLETE).