SEQanswers (
-   Bioinformatics (
-   -   How to compare two hsps with each other? (

Petrichor 08-19-2013 06:40 AM

How to compare two hsps with each other?
Hi there! I have small problem.

Within BioPerl I use SearchIO to parse my BLAST-output. Within this, the output is a result, which contain Hits, which contain HSPs.

How can I compare two HSPs with each other?
The two HSPs i want to compare are the current one and the ones before. If the current one is longer than the one before and is on the same place on the Query as the HSP before, i want to keep the current HSP and replace the old one (e.g. in an array).
I want to do that for all hits for one query entry, so that i have a maximum of one hit on one range of the query.

Thanks for any help in advance!

For reference:

mbayer 08-26-2013 01:12 AM

Hi Petrichor,

by default BLAST hits with multiple HSPs to the same subject are sorted by bit score in descending order, i.e. the best (and usually longest) HSP is topmost.

Here is what I have done in the past to extract these:

1. Generate tabular BLAST output (use "-outfmt 6" option in BLAST+ executables)
2. Load this into Excel or whatever you use to view spreadsheets
3. Remove duplicates based on the subject column. This should get rid of any secondary HSPs for each subject, and leave only topmost ones, as the output is already sorted. If there are more than two HSPs per subject you may need to repeat this until you are left with just one each.



All times are GMT -8. The time now is 09:08 PM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2021, vBulletin Solutions, Inc.