biopython v1.71.0 Bio.SeqFeature.BeforePosition

Specify a position where the actual location occurs before it.

Arguments:

  • position - The upper 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 before position 10.

 >>> p = BeforePosition(5)
 >>> p
 BeforePosition(5)
 >>> print(p)
 <5
 >>> int(p)
 5
 >>> p + 10
 15

Note this potentially surprising behaviour:

 >>> p == ExactPosition(5)
 True
 >>> p == AfterPosition(5)
 True

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

Link to this section Summary

Functions

Create a new instance in BeforePosition object

Represent the location as a string for debugging

Return a representation of the BeforePosition 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 in BeforePosition object.

Represent the location as a string for debugging.

Return a representation of the BeforePosition 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).