MSA#
- class pycomsa.MSA#
A multiple sequence alignment.
- __init__(id='', accession='', names=(), sequences=())#
Create a new MSA object.
- Parameters:
Example
>>> msa = pycomsa.MSA( ... id="example_01", ... names=["Sp8", "Sp10", "Sp26", "Sp6", "Sp17", "Sp33"], ... sequences=[ ... "-----GLGKVIV-YGIVLGTKSDQFSNWVVWLFPWNGLQIHMMGII", ... "-------DPAVL-FVIMLGTIT-KFS--SEWFFAWLGLEINMMVII", ... "AAAAAAAAALLTYLGLFLGTDYENFA--AAAANAWLGLEINMMAQI", ... "-----ASGAILT-LGIYLFTLCAVIS--VSWYLAWLGLEINMMAII", ... "--FAYTAPDLL-LIGFLLKTVA-TFG--DTWFQLWQGLDLNKMPVF", ... "-------PTILNIAGLHMETDI-NFS--LAWFQAWGGLEINKQAIL", ... ] ... )
- Raises:
ValueError – When
namesandsequencesdo not contain the same number of elements, or whensequencescontain elements that do not all have the same length.
Note
For better compatibility, all values can be given as Python strings (
str), in which case they will be UTF-8 encoded, or any object supporting the buffer-protocol (bytes,bytearray,memoryview,array.array,pyhmmer.easel.TextSequence, etc.).