sbol3.location

Module Contents

Classes

Cut

The Cut class has been introduced to enable the specification of a

EntireSequence

The EntireSequence class does not have any additional

Location

The Location class is used to represent the location of Features

Range

A Range object specifies a region via discrete, inclusive start and

Functions

build_cut(identity[, type_uri])

Used by Document to construct a Cut when reading an SBOL file.

build_entire_sequence(identity[, type_uri])

Used by Document to construct an EntireSequence when reading an SBOL file.

build_range(identity[, type_uri])

Used by Document to construct a Range when reading an SBOL file.

Attributes

int_property

class Cut(sequence: Union[Sequence, str], at: int, *, orientation: str = None, order: int = None, identity: str = None, type_uri: str = SBOL_CUT)

Bases: Location

The Cut class has been introduced to enable the specification of a region between two discrete positions. This specification is accomplished using the at property, which specifies a discrete position that corresponds to the index of a character in the elements String of a Sequence (except in the case when at is equal to zero).

accept(visitor: Any) Any

Invokes visit_cut on visitor with self as the only argument.

Parameters

visitor (Any) – The visitor instance

Raises

AttributeError – If visitor lacks a visit_cut method

Returns

Whatever visitor.visit_cut returns

Return type

Any

validate(report: ValidationReport = None) ValidationReport
class EntireSequence(sequence: Union[Sequence, str], *, orientation: str = None, order: int = None, identity: str = None, type_uri: str = SBOL_ENTIRE_SEQUENCE)

Bases: Location

The EntireSequence class does not have any additional properties. Use of this class indicates that the linked Sequence describes the entirety of the Component or Feature parent of this Location object.

accept(visitor: Any) Any

Invokes visit_entire_sequence on visitor with self as the only argument.

Parameters

visitor (Any) – The visitor instance

Raises

AttributeError – If visitor lacks a visit_entire_sequence method

Returns

Whatever visitor.visit_entire_sequence returns

Return type

Any

class Location(sequence: Union[Sequence, str], identity: str, type_uri: str, *, orientation: Optional[str] = None, order: int = None)

Bases: Identified, abc.ABC

The Location class is used to represent the location of Features within Sequences. This class is extended by the Range, Cut, and EntireSequence classes

validate(report: ValidationReport = None) ValidationReport
class Range(sequence: Union[Sequence, str], start: int, end: int, *, orientation: str = None, order: int = None, identity: str = None, type_uri: str = SBOL_RANGE)

Bases: Location

A Range object specifies a region via discrete, inclusive start and end positions that correspond to indices for characters in the elements String of a Sequence.

Note that the index of the first location is 1, as is typical practice in biology, rather than 0, as is typical practice in computer science.

accept(visitor: Any) Any

Invokes visit_range on visitor with self as the only argument.

Parameters

visitor (Any) – The visitor instance

Raises

AttributeError – If visitor lacks a visit_range method

Returns

Whatever visitor.visit_range returns

Return type

Any

validate(report: ValidationReport = None) ValidationReport
build_cut(identity: str, type_uri: str = SBOL_CUT)

Used by Document to construct a Cut when reading an SBOL file.

build_entire_sequence(identity: str, type_uri: str = SBOL_ENTIRE_SEQUENCE)

Used by Document to construct an EntireSequence when reading an SBOL file.

build_range(identity: str, type_uri: str = SBOL_RANGE)

Used by Document to construct a Range when reading an SBOL file.

int_property