skbio.alignment.TabularMSA.from_path_seqs#
- classmethod TabularMSA.from_path_seqs(path, seqs)[source]#
Create a tabular MSA from an alignment path and the original sequences.
- Parameters:
- pathAlignPath
Alignment path.
- seqsiterable of GrammaredSequence
Original sequences.
- Returns:
- TabularMSA
The created tabular MSA object.
Examples
>>> from skbio import DNA, TabularMSA >>> from skbio.alignment import AlignPath >>> seqs = [ ... DNA('CGTCGTGC'), ... DNA('CAGTC'), ... DNA('CGTCGTT'), ... ] >>> path = AlignPath( ... lengths=[2, 2, 2, 1, 1], ... states=[0, 2, 0, 6, 0], ... starts=[0, 0, 0], ... ) >>> msa = TabularMSA.from_path_seqs(path, seqs) >>> msa TabularMSA[DNA] --------------------- Stats: sequence count: 3 position count: 8 --------------------- CGTCGTGC CA--GT-C CGTCGT-T