get_a3m_alignments#

biotite.sequence.io.fasta.get_a3m_alignments(a3m_file, seq_type=None)[source]#

Get pairwise sequence alignments from an A3M-formatted FASTA file.

The i-th alignment is an alignment of the first sequence in the file (the query) to the i+1-th sequence in the file (the target).

Parameters:
a3m_fileFastaFile

The A3M file to parse. The first sequence (the query) must not contain any deletions or insertions. All subsequent sequences indicate insertions and deletions by - or lower case characters, respectively.

seq_typetype[Sequence], optional

The Sequence subclass contained in the file. If not set, the type is automatically inferred as ProteinSequence or NucleotideSequence from the query sequence. For large sequence data it is recommended to set this parameter.

Returns:
alignmentslist of Alignment

Alignments of all sequences (excluding the query itself) to the query sequence. Each alignment is between the query (first element) and each target sequence (second element).