biotite.application.blast.BlastAlignment

class biotite.application.blast.BlastAlignment(sequences, trace, score, e_value, query_interval, hit_interval, hit_id, hit_definition)[source]

Bases: biotite.sequence.align.alignment.Alignment

A specialized Alignment class for alignments using the BLAST application. It stores additional data, like the E-value, the HSP position and a description of the hit sequence.

Like its superclass, all attributes of a BlastAlignment are public. The attributes are the same as the constructor parameters.

Parameters:
sequences : list

A list of aligned sequences. Does actually not contain the complete original sequences, but the HSP sequences.

trace : ndarray, dtype=int, shape=(n,m)

The alignment trace.

score : int

Alignment score.

e_value : float

Expectation value for the number of random sequences of a similar sized database getting an equal or higher score by change when aligned with the query sequence.

query_interval : tuple of int

Describes the position of the HSP part of the query sequence in the original query sequence. The first element is the start position, the second element is the inclusive stop position. Indexing starts at 1.

hit_interval : tuple of int

Analogous to query_interval, this describes the position of the HSP part of the hit sequence in the complete hit sequence.

hit_id : str

The NCBI unique identifier (UID) of the hit sequence.

hit_definition : str

The name of the hit sequence.

get_gapped_sequences()

Get a the string representation of the gapped sequences.

Returns:
sequences : list of str

The list of gapped sequence strings. The order is the same as in Alignment.sequences.

static trace_from_strings(seq_str_list)

Create a trace from strings that represent aligned sequences.

Parameters:
seq_str_list : list of str

The strings, where each each one represents a sequence in an alignment.

Returns:
trace : ndarray, dtype=int, shape=(n,2)

The created trace.