[Biojava-dev] Displaying Blast Alignments

Schreiber, Mark mark.schreiber at agresearch.co.nz
Mon Jul 28 10:43:34 EDT 2003


In the case of DNA you could symply test that seq1.symbolAt(i) ==
seq2.symbolAt(i), unfortunately this will not work so well for protein.

- Mark


> -----Original Message-----
> From: Tim Troup [mailto:troup at dcs.gla.ac.uk] 
> Sent: Monday, 28 July 2003 7:53 a.m.
> To: biojava-dev at biojava.org
> Subject: [Biojava-dev] Displaying Blast Alignments
> 
> 
> 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
> *********************************
> 
> _______________________________________________
> biojava-dev mailing list
> biojava-dev at biojava.org 
> http://biojava.org/mailman/listinfo/biojava-dev
> 
=======================================================================
Attention: The information contained in this message and/or attachments
from AgResearch Limited is intended only for the persons or entities
to which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipients is prohibited by AgResearch
Limited. If you have received this message in error, please notify the
sender immediately.
=======================================================================



More information about the biojava-dev mailing list