Entering edit mode
5.7 years ago
tim.ivanov.92
▴
40
I'm trying to get maximum from exonerate aligner tool: i would like to be able to extract alignments produced automatically and be able to parse it in any way. For example - i want to know whether start/end of query/subject sequence is aligned or not.
my code is like
from Bio import SearchIO
fname = 'my_output.out'
qresult = list(SearchIO.parse(fname, 'exonerate-text'))
first_query = qresult[0]
second_query = qresult[1]
#print qresult[0].fragments[0].query.seq
print qresult[0].fragments[0]
which prints smthing like
Query: my_query_name
Hit: XM_015159452.1 Drosophila erecta uncharacterized protein, transc...
Query range: [0:371] (1)
Hit range: [3116:3487] (1)
Fragments: 1 (371 columns)
Query - CTCCGTTACATCCGCTGATAGTTTAATGGGCGGAGGAGGAAGTCTTCGCCGGCGAACTA~~~CCAAG
|| |||||||| ||||||||||| |||||||||||||||||||| ||||||||||| |~~~|||||
Hit - TTCGGTTACATCTGCTGATAGTTTGATGGGCGGAGGAGGAAGTCTCCGCCGGCGAACAA~~~CCAAG
Is there a way to just output ALL the alignment? if i need to check some stats about it?
Exonerate has hundreds of settings, you have to tweak how you run it - you want to run it with global alignment option, like
--model affine:global
.