MultipleSeqAlignment

Immutable multiple sequence alignment object, consisting of two or more SeqRecords with equal lengths. The data can then be regarded as a matrix of letters, with well defined columns.

The MultipleSeqAlignment object provides a number of string like methods (such as count, find, split and strip), which are alphabet aware where appropriate. Please note while the Kotlin "x..y" range operator is supported, and works very similarly to Python's slice "x:y", y is inclusive here in Kotlin, and exclusive in Python.

Creating a MultipleSeqAlignment object: You will typically use Bio.AlignIO to read in alignments from files as MultipleSeqAlignment objects. You can also use Bio.Align to align sequences of uneven length and generate a MultipleSeqAlignment object.

You can also create a MultipleSeqAlignment object directly, with argument:

  • seqs - List of sequence records, required (type: List)

@throws IllegalStateException if seqs has less than two elements, or if the sequence records in seqs are not all of the same length.

from Bio.Seq import Seq from Bio.Seq import NucSeqRecord from Bio.Seq import MultipleSeqAlignment val record_1 = NucSeqRecord(Seq("ATCG"), "1") val record_2 = NucSeqRecord(Seq("ATCC"), "2") val alignment = MultipleSeqAlignment(listOf(record_1, record_2))

Inheritors

Functions

Link copied to clipboard

Returns the number of sequences in the alignment.

Link copied to clipboard
fun numSites(): Int

Returns the number of sites in the MSA. Because each SeqRecord has the same length, this can be used to further filter down the Seq objects.