Documentation of 'edu.rit.compbio.seq.ProteinLocalAlignmentSmp' Java class
ProteinLocalAlignmentSmp
edu.rit.compbio.seq

Class ProteinLocalAlignmentSmp



  • public class ProteinLocalAlignmentSmp
    extends ProteinLocalAlignment
    Class ProteinLocalAlignmentSmp provides an object that does local alignments of ProteinSequences. For further information, see the base class ProteinLocalAlignment.

    The align() method is designed to be executed by a ParallelTeam of threads. Thus, this class is suitable for use in an SMP parallel program or a hybrid parallel program.

    As an example of how the computation is performed in parallel while obeying the sequential dependencies in the Smith-Waterman algorithm, suppose the query sequence has 100 elements, the subject sequence has 500 elements, and the parallel team has 4 threads. The 500 columns of the scoring matrix S are partitioned equally among the threads: thread 0 gets columns 1..125, thread 1 gets columns 126..250, thread 2 gets columns 251..375, thread 3 gets columns 376..500. Then S is computed in parallel in a series of rounds:

    Round:   Thread 0 computes:   Thread 1 computes:   Thread 2 computes:   Thread 3 computes:  
    1 S[1][1..125]
    2 S[2][1..125] S[1][126..250]
    3 S[3][1..125] S[2][126..250] S[1][251..375]
    4 S[4][1..125] S[3][126..250] S[2][251..375] S[1][376..500]
    5 S[5][1..125] S[4][126..250] S[3][251..375] S[2][376..500]
    99 S[99][1..125] S[98][126..250] S[97][251..375] S[96][376..500]
    100 S[100][1..125] S[99][126..250] S[98][251..375] S[97][376..500]
    101 S[100][126..250] S[99][251..375] S[98][376..500]
    102 S[100][251..375] S[99][376..500]
    103 S[100][376..500]

    After a short startup period, all columns of S are being computed in parallel, with different threads working on different rows so as to obey the sequential dependencies. For example, S[4][126] is computed (by thread 1 in round 5) after S[3][125] (by thread 0 in round 3), S[3][126] (by thread 1 in round 4), and S[4][125] (by thread 0 in round 4).

    • Constructor Detail

      • ProteinLocalAlignmentSmp

        public ProteinLocalAlignmentSmp(ParallelTeam team)
        Construct a new protein sequence local alignment object.
        Parameters:
        team - Parallel thread team that will compute the alignment.
        Throws:
        java.lang.NullPointerException - (unchecked exception) Thrown if team is null.
    • Method Detail

      • align

        public Alignment align()
                        throws java.lang.Exception
        Align the query sequence and the subject sequence. The parallel thread team specified to the constructor computes the alignment in parallel.
        Specified by:
        align in class ProteinLocalAlignment
        Returns:
        Alignment.
        Throws:
        java.lang.Exception - Thrown if an error occurred.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.