LingPy

This documentation is for version 2.0.dev, which is not released yet.

lingpy.align.sca.PSA

class lingpy.align.sca.PSA(infile, **keywords)

Basic class for dealing with the pairwise alignment of sequences.

Parameters :

infile : file

A file in psq-format.

merge_vowels : bool (default=True)

Indicate, whether neighboring vowels should be merged into diphtongs, or whether they should be kept separated during the analysis.

comment : char (default=’#’)

The comment character which, inserted in the beginning of a line, prevents that line from being read.

Notes

In order to read in data from text files, two different file formats can be used along with this class: the PSQ-format, and the PSA-format.

This class inherits the methods of the Pairwise class.

Attributes

taxa list A list of tuples containing the taxa of all sequence pairs.
seqs list A list of tuples containing all sequence pairs.
tokens list A list of tuples containing all sequence pairs in a tokenized form.

Methods

align([gop, scale, mode, factor, ...]) Align a pair of sequences or multiple sequence pairs.
output([fileformat, filename]) Write the results of the analyses to a text file.

This Page