LingPy

lingpy.output.plot.msa2html

lingpy.output.plot.msa2html(infile, shorttitle=None, filename=None)

Convert files in msa-format into colored html-format.

Parameters :

shorttitle : str

Define the shorttitle of the html-page. If no title is provided, the default title LexStat will be used.

filename : str

Define the name of the output file. If no name is defined, the name of the input file will be taken as a default.

Notes

The coloring of sound segments with respect to the sound class they belong to is based on the definitions given in the color Model. It can easily be changed and adapted.

Examples

Load the libary.

>>> from lingpy import *

Load an msq-file from the test-sets.

>>> msa = Multiple(get_file('test.msq'))

Align the data progressively and carry out a check for swapped sites.

>>> msa.prog_align()
>>> msa.swap_check()
>>> print(msa)
w    o    l    -    d    e    m    o    r    t
w    a    l    -    d    e    m    a    r    -
v    -    l    a    d    i    m    i    r    -

Save the data to the file test.msa.

>>> msa.output('msa')

Convert the msa-file to html.

>>> msa2html('test.msa')