biotite.sequence.Feature

class biotite.sequence.Feature(key, locs, qual={})[source]

Bases: biotite.copyable.Copyable

This class represents a single sequence feature, for example from a GenBank feature table. A feature describes a functional part of a sequence. It consists of a feature key, describing the general class of the feature, at least one location, describing its position on the reference, and qualifiers, describing the feature in detail.

Objects of this class are immutable.

Parameters:
key : str

The name of the feature class, e.g. gene, CDS or regulatory.

locs : iterable object of Location

A list of feature locations. In most cases this list will only contain one location, but multiple ones are also possible for example in eukaryotic CDS (due to splicing).

qual : dict, optional

Maps GenBank feature qualifiers to their corresponding values. The keys and values are always strings.

Attributes:
key : str

The name of the feature class, e.g. gene, CDS or regulatory.

locs : iterable object of Location

A list of feature locations. In most cases this list will only contain one location, but multiple ones are also possible for example in eukaryotic CDS (due to splicing).

qual : dict

Maps GenBank feature qualifiers to their corresponding values. The keys and values are always strings.

get_location_range()[source]

Get the minimum first base/residue and maximum last base/residue of all feature locations.

This can be used to create a location, that spans all of the feature’s locations.

Returns:
first : int

The minimum first base/residue of all locations.

last : int

The maximum last base/residue of all locations.

copy()

Create a deep copy of this object.

Returns:
copy

A copy of this object.