Library for multiple asymmetric alignments on different alphabets
Project description
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[0][0]), align[1])
>> print(" ".join(align[0][1]), "\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
Changelog
Version 0.1: - First release for internal announcement, testing, and community outreach
Roadmap
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.
Community guidelines
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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.