[Biojava-dev] Displaying Blast Alignments

Tim Troup troup at dcs.gla.ac.uk
Sun Jul 27 21:53:14 EDT 2003


Hi,

I have been using the Blast parser code from the "BioJava In Anger" 
cookbook:

http://www.biojava.org/docs/bj_in_anger/BlastParser.htm

I tried to extend this code such that it would also print out the 
alignments. I thought this could be achieved by iterating through all the 
sub-hits, obtaining the Alignment object and printing out the SymbolLists. 
However by doing this you do not get the | symbols indicating an exact 
match between the two sequences as you would in the original blast file
e.g.


Instead of this:

Query: 2352 cttgtctataaagcatttaacccccctgtacacaactcactccttttaaagnnnnnnntt 2411
            |||||||||||||||||||||||||||||||||||||||||||||||||||       ||
Sbjct: 2202 cttgtctataaagcatttaacccccctgtacacaactcactccttttaaagaaaaaaatt 2261



you end up with this:

Query: 2352 cttgtctataaagcatttaacccccctgtacacaactcactccttttaaagnnnnnnntt 2411

Sbjct: 2202 cttgtctataaagcatttaacccccctgtacacaactcactccttttaaagaaaaaaatt 2261




Is there any way i can easily display the alignment as it is displayed in
the original blast file? 


Thanks, Tim Troup

-- 


*********************************
Tim Troup
Room F151
17 Lilybank Gardens
Department of Computing Science
University of Glasgow
Glasgow
G12 8RZ

Tel: +44 (0)141 339 8855 ext 0989
E-mail: troup at dcs.gla.ac.uk
*********************************



More information about the biojava-dev mailing list