procope.methods.interologs.blast
Class BlastBBHAlignmentLengthConstraint

java.lang.Object
  extended by procope.methods.interologs.blast.BlastBBHAlignmentLengthConstraint
All Implemented Interfaces:
BlastBBHConstraints

public class BlastBBHAlignmentLengthConstraint
extends Object
implements BlastBBHConstraints

Ensures that BBHs are only accepted if their BLAST alignment covers a minimum fraction of both aligned protein sequences. Requires access to the sequence data of all involved proteins to determine their length.

Author:
Jan Krumsiek

Constructor Summary
BlastBBHAlignmentLengthConstraint(Sequences sequencePool, float minAlign)
          Create new alignment length object.
 
Method Summary
 boolean acceptBBH(int protein1, int protein2, BlastHit forwardHit, BlastHit backwardHit)
          Accepts a BBH if the give minimum fraction of both protein sequences is covered by the BLAST alignment.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BlastBBHAlignmentLengthConstraint

public BlastBBHAlignmentLengthConstraint(Sequences sequencePool,
                                         float minAlign)
Create new alignment length object.

Parameters:
sequencePool - The sequence pool which contains all involved sequences. Needed for sequence length determination.
minAlign - fraction of both aligned protein sequences which have to be covered by the alignment in order for the BBH to be accepted
Method Detail

acceptBBH

public boolean acceptBBH(int protein1,
                         int protein2,
                         BlastHit forwardHit,
                         BlastHit backwardHit)
Accepts a BBH if the give minimum fraction of both protein sequences is covered by the BLAST alignment.

Specified by:
acceptBBH in interface BlastBBHConstraints
Parameters:
protein1 - first protein of the BBH
protein2 - second protein of the BBH
forwardHit - first BLAST hit leading to that BBH
backwardHit - second BLAST hit leading to that BBH
Returns:
whether the BBH is accepted or not