MultiSequence¶
- class MultiSequence(sequences, name=None, mode=None, metadata=None, aligned=False, **kwargs)[source]¶
Class responsible for handling multiple sequences.
Constructor for
MultiSequence- Parameters
sequences (Any) – Anything that can be parsed as multiple sequences.
name (Optional[str]) – Name of the multi-sequence instance
mode (Optional[str]) – Mode of the sequences. All sequences must have same mode/type. Otherwise error will be raised
metadata (Optional[dict]) – Metadata of the multi-sequence instance
aligned (bool) – True if sequences are aligned. Default is False
kwargs (Any) – Compatibility
Attributes
countTotal number of sequences.
indexIndices of the internals sequences.
is_alignmentIs mutli-sequence is aligned or not.
is_buckledIs mulit-sequence instance is buckled or not.
metadataInstance metadata.
modeMode/type of the sequences.
nameName of the instance.
sequencesList of individual sequence instances.
skbio_modeThe
skbiomode of the sequence.Methods
Buckle individual sequences for alignment.
copy()Copy current instance.
from_buckled(sequences, buckled_pack, **kwargs)Factory method to create
MultiSequenceusing packed metadata from buckling.get_consensus([indices])If sequence are aligned, estimate consensus sequence from the MSA
get_iter([method])Get generator for the idividual sequences.
get_string_as(**kwargs)Get string of all sequences.
get_subset([indices])Get subset of the mutli-sequence instance.
restore_buckle(buckled_pack)Restore the buckled
MultiSequenceinstance.to_skbio_msa([indices])Convert to
skbioTabularMSAinstance.write(file[, mode])Write the sequence data into the file.