Location#

Location#

class gb_io.Location#

A base location for a Feature.

This class cannot be instantiated directly, and should not be derived to avoid breakage in the Rust code. It can however be used for type annotations where any concrete Location subclass can be given.

Between#

class gb_io.Between(start, end)#

A location for a Feature located between two consecutive positions.

end#

The end of the position interval.

Type:

int

start#

The start of the position interval.

Type:

int

Bond#

class gb_io.Bond(locations)#

A location for a Feature corresponding to a bond between locations.

Complement#

class gb_io.Complement(location)#

A location for a Feature on the opposite strand of a given Location.

location#

The location on the complement strand.

Type:

Location

External#

class gb_io.External(accession, location=None)#

A location for a Feature located in an external record.

accession#

The accession of the external record where the feature is located.

Type:

str

location#

The location of the feature in the external record.

Type:

Location or None

Join#

class gb_io.Join(locations)#

A location for a Feature consisting in joined sequence spans.

locations#

The locations part of the joint location.

Type:

list of Location

OneOf#

class gb_io.OneOf(locations)#

A location for a Feature located at one of the given locations.

locations#

The locations at one of which this feature is located.

Type:

list of Location

Order#

class gb_io.Order(locations)#

A location for a Feature over disjoint locations in the given order.

locations#

The locations part of the ordered location.

Type:

list of Location

Range#

class gb_io.Range(start, end, before=False, after=False)#

A location for a Feature spanning over a range of consecutive positions.

The additional before and after flags can be set to indicate the feature spans before its starting index and/or after its ending index. For instance, a feature location of <1..206 can be created with Range(1, 206, before=True).

after#

Whether the range extends after the given end index.

Type:

bool

before#

Whether the range start before the given start index.

Type:

bool

end#

The end of the range of positions.

Type:

int

start#

The start of the range of positions.

Type:

int