[Bioperl-l] Start and end of query sequence in HSPs

Michael Thon mrthon@unity.ncsu.edu
Wed, 16 Oct 2002 11:43:49 -0400


You can do this to iterate through all of the hsps in the blast report.  You
may have to pay attention to which strand of the subject sequence the hit
was on.  I think if the hit was on the -1 strand then $hsp->start('hit')
will return a lower number than $hsp->end('hit').

while (my $blastReport = $searchio->next_result()) {
    while (my $hit = $blastReport->next_hit()) {
        while (my $hsp = $hit->next_hsp()) {
            $qstart = $hsp->start('query');
            $hstart = $hsp->start('hit');
            $qend = $hsp->end('query');
            $hend = $hsp->end('hit');
        }
    }
}

Cheers,
Mike Thon

-----Original Message-----
From: bioperl-l-admin@bioperl.org [mailto:bioperl-l-admin@bioperl.org]On
Behalf Of Kasper Munch Terkelsen
Sent: Wednesday, October 16, 2002 11:11 AM
To: bioperl-l@bioperl.org
Subject: [Bioperl-l] Start and end of query sequence in HSPs


Dear all

Does anyone know how to get hold of the start and end positions of a
sbjct sequence in a HSP? I am using the StandAloneBlast module, so I
think I am confined to using the Search and SearchIO modules to parse
the BLAST reports because the blastall method returns a blast
object. So what I am after is simply the two numbers at the ends of
each HSP as they appear in the blast report. Please help me, I am
desperate!

Regards Kasper

--
Kasper Munch Terkelsen
Bioinformatics Centre
University of Copenhagen
15, Universitetsparken
2100 Copenhagen Ø
Denmark

Office  tlf. +45 3532 1348 (Direct)
	tlf. +45 3532 1313 (Secretary)
Home:	tlf. +45 3296 1516
Email   kmt@daimi.au.dk
Homepage http://www.daimi.au.dk/~kmt
----------------------------------------
_______________________________________________
Bioperl-l mailing list
Bioperl-l@bioperl.org
http://bioperl.org/mailman/listinfo/bioperl-l