Library for multiple asymmetric alignments on different alphabets
MALIGN is a library for multiple asymmetric alignments on different alphabets. It is currently under initial research and development, but can already be used to obtain multiple alignments for DNA sequences.
Installation and usage
The library can be installed as any standard Python library with pip, and used as demonstrated in the following snippet:
In any standard Python environment, malign can be installed with:
$ pip install malign
For most purposes, it is enough to pass the two sequences to be aligned, along with a scorer, to the get_aligns() function:
>> import malign >> seq1 = ["A", "T", "T", "C", "G", "G", "A", "T"] >> seq2 = ["T", "A", "C", "G", "G", "A", "T", "T", "T"] >> graph = malign.compute_graph(seq1, seq2, malign.DNA_SCORER) >> dest = "%i:%i" % (len(seq1), len(seq2)) >> aligns = malign.get_aligns(graph, ("0:0", dest), seq1, seq2, 4) >> for idx, align in enumerate(aligns): >> print(" ".join(align), align) >> print(" ".join(align), "\n") A T T C G G A - - T 84.0 T A - C G G A T T T A T T C G G A - - T 84.0 T - A C G G A T T T A T T C G G A T - - 84.0 T A - C G G A T T T A T T C G G A T - - 84.0 T - A C G G A T T T
The library can also be used by means of the command-line malign tool:
$ malign --dna ATTCGGAT TACGGATTT Alignment #0 (score: 84.00) A T T C G G A - - T T A - C G G A T T T Alignment #1 (score: 84.00) A T T C G G A - - T T - A C G G A T T T Alignment #2 (score: 84.00) A T T C G G A T - - T A - C G G A T T T Alignment #3 (score: 84.00) A T T C G G A T - - T - A C G G A T T T
Version 0.1: - First release for internal announcement, testing, and community outreach
Version 0.2: - Setup readthedocs - Sort in consistent and reproducible way all alignments, even when the score is the same - Deal with conflicting package versions due to lingpy, or write new NW implementation - Implement single-pass function with defaults, with scorer, graph, destnation, etc.
While the author can be contacted directly for support, it is recommended that third parties use GitHub standard features, such as issues and pull requests, to contribute, report problems, or seek support.
Contributing guidelines, including a code of conduct, can be found in the CONTRIBUTING.md file.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size malign-0.1.1-py3-none-any.whl (915.7 kB)||File type Wheel||Python version py3||Upload date||Hashes View|
|Filename, size malign-0.1.1.tar.gz (915.7 kB)||File type Source||Python version None||Upload date||Hashes View|