Sequence Alignments (pyncbitk.objects.seqalign)#

Alignments#

class pyncbitk.objects.seqalign.SeqAlign(Serial)#

A sequence alignment, mapping the coordinates of a BioSeq to others.

Sequence alignments are composed of segments, i.e aligned regions which contain one or more sequences.

classmethod __new__(*args, **kwargs)#
__getitem__(key, /)#

Return self[key].

__len__()#

Return len(self).

__reduce__()#

Helper for pickle.

alignment_length#

The gapped alignment length.

Type:

int

bitscore#

The BLAST-specific bit score.

Type:

float or None

evalue#

The BLAST-specific expectation value.

Type:

float or None

percent_coverage#

The percent query coverage, if any.

BLAST ignores the polyA tail when computing coverage for nucleotide sequences:

\[cov = 100 \times \frac{\text{matches} + \text{mismatches}} {\text{alignment length} - \text{polyA tail}}\]
Type:

float or None

percent_identity#

The percent identity of the alignment.

This refers to the BLAST-style identity, which is computed including gaps over the whole alignment:

\[id = 100 \times \frac{\text{matches}}{\text{alignment length}}\]
Type:

float or None

class pyncbitk.objects.seqalign.GlobalSeqAlign(SeqAlign)#

A global alignment over the complete lengths of several BioSeq.

classmethod __new__(*args, **kwargs)#
__reduce__()#

Helper for pickle.

class pyncbitk.objects.seqalign.DiagonalSeqAlign(SeqAlign)#
classmethod __new__(*args, **kwargs)#
__reduce__()#

Helper for pickle.

class pyncbitk.objects.seqalign.PartialSeqAlign(SeqAlign)#
classmethod __new__(*args, **kwargs)#
__reduce__()#

Helper for pickle.

class pyncbitk.objects.seqalign.DiscontinuousSeqAlign(SeqAlign)#
classmethod __new__(*args, **kwargs)#
__reduce__()#

Helper for pickle.

Segments#

class pyncbitk.objects.seqalign.AlignSegments(Serial)#
classmethod __new__(*args, **kwargs)#
__reduce__()#

Helper for pickle.

class pyncbitk.objects.seqalign.DenseSegments(AlignSegments)#
classmethod __new__(*args, **kwargs)#
__reduce__()#

Helper for pickle.

class pyncbitk.objects.seqalign.DenseSegmentsData(Serial)#
classmethod __new__(*args, **kwargs)#
__reduce__()#

Helper for pickle.

ids#

The identifiers of the sequences in the segment.

Type:

list of SeqId

lengths#

The lengths of each segment.

Type:

list of int

starts#

The start offsets for the sequences in each segment.

Type:

list of int

strands#

The strand for each sequence, if any.

Type:

list of str, or None

Set#

class pyncbitk.objects.seqalign.SeqAlignSet(Serial)#

A set of sequence alignments.

classmethod __new__(*args, **kwargs)#
__iter__()#

Implement iter(self).

__len__()#

Return len(self).

__reduce__()#

Helper for pickle.

master_coverage()#

Compute the master coverage of the alignment set.

Miscellaneous#

class pyncbitk.objects.seqalign.AlignRow#
classmethod __new__(*args, **kwargs)#
__reduce__()#

Helper for pickle.

class pyncbitk.objects.seqalign.SeqAlignScore#
classmethod __new__(*args, **kwargs)#
__iter__()#

Implement iter(self).

__reduce__()#

Helper for pickle.

__repr__()#

Return repr(self).