biotite.sequence.Location

class biotite.sequence.Location(first, last, strand=<Strand.FORWARD: 1>, defect=<Defect.NONE: 0>)[source]

Bases: object

A Location defines at which base(s)/residue(s) a feature is located.

A feature can have multiple Location instances if multiple locations are joined.

Objects of this class are immutable.

Attributes:
first : int

Starting base or residue position of the feature.

last : int

Inclusive ending base or residue position of the feature.

strand : Strand

The strand direction. Always Strand.FORWARD for peptide features.

defect : Defect

A possible defect of the location.

class Defect[source]

Bases: enum.Flag

This enum type describes location defects.

A location has a defect, when the feature itself is not directly located in the range of the first to the last base.

  • NONE - No location defect
  • MISS_LEFT - A part of the feature has been truncated before the first base/residue of the Location (probably by indexing an Annotation object)
  • MISS_RIGHT - A part of the feature has been truncated after the last base/residue of the Location (probably by indexing an Annotation object)
  • BEYOND_LEFT - The feature starts at an unknown position before the first base/residue of the Location
  • BEYOND_RIGHT - The feature ends at an unknown position after the last base/residue of the Location
  • UNK_LOC - The exact position is unknown, but it is at a single base/residue between the first and last residue of the Location, inclusive
  • BETWEEN - The position is between to consecutive bases/residues.
NONE = 0
MISS_LEFT = 1
MISS_RIGHT = 2
BEYOND_LEFT = 4
BEYOND_RIGHT = 8
UNK_LOC = 16
BETWEEN = 32
class Strand[source]

Bases: enum.Enum

This enum type describes the strand of the feature location. This is not relevant for residue peptide features.

FORWARD = 1
REVERSE = 2