Class AlignerHelper


  • public class AlignerHelper
    extends Object
    Static utility to construct alignment routines from a common library of methods.
    Author:
    Mark Chapman, Daniel Cameron
    • Method Detail

      • setScorePoint

        public static AlignerHelper.Last[] setScorePoint​(int x,
                                                         int y,
                                                         int gop,
                                                         int gep,
                                                         int sub,
                                                         int[][][] scores)
        Calculate the optimal alignment score for the given sequence positions with an affine or constant gap penalty
        Parameters:
        x - position in query
        y - position in target
        gop - gap opening penalty
        gep - gap extension penalty
        sub - compound match score
        scores - dynamic programming score matrix to fill at the given position
        Returns:
        traceback direction for substitution, deletion and insertion
      • setScorePoint

        public static AlignerHelper.Last setScorePoint​(int x,
                                                       int y,
                                                       int gep,
                                                       int sub,
                                                       int[][][] scores)
        Calculates the optimal alignment score for the given sequence positions and a linear gap penalty
        Parameters:
        x - position in query
        y - position in target
        gep - gap extension penalty
        sub - compound match score
        scores - dynamic programming score matrix to fill at the given position
        Returns:
        traceback directions for substitution, deletion and insertion respectively
      • setScoreVector

        public static AlignerHelper.Last[][] setScoreVector​(int x,
                                                            AlignerHelper.Subproblem subproblem,
                                                            int gop,
                                                            int gep,
                                                            int[] subs,
                                                            boolean storing,
                                                            int[][][] scores)
        Score global alignment for a given position in the query sequence
        Parameters:
        x -
        subproblem -
        gop -
        gep -
        subs -
        storing -
        scores -
        Returns:
      • setScoreVector

        public static AlignerHelper.Last[][] setScoreVector​(int x,
                                                            int xb,
                                                            int yb,
                                                            int ye,
                                                            int gop,
                                                            int gep,
                                                            int[] subs,
                                                            boolean storing,
                                                            int[][][] scores,
                                                            boolean startAnchored)
        Score global alignment for a given position in the query sequence
        Parameters:
        x -
        xb -
        yb -
        ye -
        gop -
        gep -
        subs -
        storing -
        scores -
        startAnchored -
        Returns:
      • setScoreVector

        public static AlignerHelper.Last[][] setScoreVector​(int x,
                                                            AlignerHelper.Subproblem subproblem,
                                                            int gep,
                                                            int[] subs,
                                                            boolean storing,
                                                            int[][][] scores)
        Score global alignment for a given position in the query sequence for a linear gap penalty
        Parameters:
        x -
        subproblem -
        gep -
        subs -
        storing -
        scores -
        Returns:
      • setScoreVector

        public static AlignerHelper.Last[][] setScoreVector​(int x,
                                                            int xb,
                                                            int yb,
                                                            int ye,
                                                            int gep,
                                                            int[] subs,
                                                            boolean storing,
                                                            int[][][] scores,
                                                            boolean startAnchored)
        Score global alignment for a given position in the query sequence for a linear gap penalty
        Parameters:
        x -
        xb -
        yb -
        ye -
        gep -
        subs -
        storing -
        scores -
        startAnchored -
        Returns:
      • setScoreVector

        public static AlignerHelper.Last[][] setScoreVector​(int x,
                                                            int gop,
                                                            int gep,
                                                            int[] subs,
                                                            boolean storing,
                                                            int[][][] scores,
                                                            int[] xyMax,
                                                            int score)
        Score local alignment for a given position in the query sequence
        Parameters:
        x -
        gop -
        gep -
        subs -
        storing -
        scores -
        xyMax -
        score -
        Returns:
      • setScoreVector

        public static AlignerHelper.Last[][] setScoreVector​(int x,
                                                            int xb,
                                                            int yb,
                                                            int ye,
                                                            int gop,
                                                            int gep,
                                                            int[] subs,
                                                            boolean storing,
                                                            int[][][] scores,
                                                            int[] xyMax,
                                                            int score)
        Score local alignment for a given position in the query sequence
        Parameters:
        x -
        xb -
        yb -
        ye -
        gop -
        gep -
        subs -
        storing -
        scores -
        xyMax -
        score -
        Returns:
      • setScoreVector

        public static AlignerHelper.Last[][] setScoreVector​(int x,
                                                            int gep,
                                                            int[] subs,
                                                            boolean storing,
                                                            int[][][] scores,
                                                            int[] xyMax,
                                                            int score)
        Score local alignment for a given position in the query sequence for a linear gap penalty
        Parameters:
        x -
        gep -
        subs -
        storing -
        scores -
        xyMax -
        score -
        Returns:
      • setScoreVector

        public static AlignerHelper.Last[][] setScoreVector​(int x,
                                                            int xb,
                                                            int yb,
                                                            int ye,
                                                            int gep,
                                                            int[] subs,
                                                            boolean storing,
                                                            int[][][] scores,
                                                            int[] xyMax,
                                                            int score)
        Score local alignment for a given position in the query sequence for a linear gap penalty
        Parameters:
        x -
        xb -
        yb -
        ye -
        gep -
        subs -
        storing -
        scores -
        xyMax -
        score -
        Returns: