-
Notifications
You must be signed in to change notification settings - Fork 7
/
test_from_Python.py
44 lines (36 loc) · 948 Bytes
/
test_from_Python.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# vim: fdm=marker
'''
author: Fabio Zanini
date: 30/01/14
content: Test of the seqanpy module from Python.
'''
# Modules
# Script
if __name__ == '__main__':
# Try import
import seqanpy as sap
# Global pairwise alignment
seq1 = 'AAAGGTCTA'
seq2 = 'AAATCGA'
output = sap.align_global(seq1, seq2, band=5)
print output
# Overlap pairwise alignment
seq1 = 'AAAGGTCTA'
seq2 = 'ATCT'
output = sap.align_overlap(seq1, seq2)
print output
# Overlap pairwise alignment cutting flanks
seq1 = 'AAAGGTCTA'
seq2 = 'ATCT'
output = sap.align_overlap(seq1, seq2, cut_flanks=True)
print output
# Ladder pairwise alignment
seq1 = 'AAAGGTCTA'
seq2 = 'TCTAGGGAAACCC'
output = sap.align_ladder(seq1, seq2)
print output
# Local pairwise alignment
seq1 = 'AAAGGTCTACCGTAGCCT'
seq2 = 'AAGTCTAC'
output = sap.align_local(seq1, seq2)
print output