Class AbstractPairwiseSequenceAligner<S extends org.biojava.nbio.core.sequence.template.Sequence<C>,​C extends org.biojava.nbio.core.sequence.template.Compound>

    • Field Detail

      • pair

        protected org.biojava.nbio.core.alignment.template.SequencePair<S extends org.biojava.nbio.core.sequence.template.Sequence<C>,​C extends org.biojava.nbio.core.sequence.template.Compound> pair
    • Constructor Detail

      • AbstractPairwiseSequenceAligner

        protected AbstractPairwiseSequenceAligner​(S query,
                                                  S target,
                                                  GapPenalty gapPenalty,
                                                  org.biojava.nbio.core.alignment.template.SubstitutionMatrix<C> subMatrix)
        Prepares for a pairwise global sequence alignment.
        Parameters:
        query - the first Sequence of the pair to align
        target - the second Sequence of the pair to align
        gapPenalty - the gap penalties used during alignment
        subMatrix - the set of substitution scores used during alignment
      • AbstractPairwiseSequenceAligner

        protected AbstractPairwiseSequenceAligner​(S query,
                                                  S target,
                                                  GapPenalty gapPenalty,
                                                  org.biojava.nbio.core.alignment.template.SubstitutionMatrix<C> subMatrix,
                                                  boolean local)
        Prepares for a pairwise sequence alignment.
        Parameters:
        query - the first Sequence of the pair to align
        target - the second Sequence of the pair to align
        gapPenalty - the gap penalties used during alignment
        subMatrix - the set of substitution scores used during alignment
        local - if true, find a region of similarity rather than aligning every compound
    • Method Detail

      • setQuery

        public void setQuery​(S query)
        Sets the query Sequence.
        Parameters:
        query - the first Sequence of the pair to align
      • setTarget

        public void setTarget​(S target)
        Sets the target Sequence.
        Parameters:
        target - the second Sequence of the pair to align
      • getPair

        public org.biojava.nbio.core.alignment.template.SequencePair<S,​C> getPair()
        Description copied from interface: PairwiseSequenceAligner
        Returns sequence alignment pair.
        Specified by:
        getPair in interface PairwiseSequenceAligner<S extends org.biojava.nbio.core.sequence.template.Sequence<C>,​C extends org.biojava.nbio.core.sequence.template.Compound>
        Returns:
        sequence alignment pair
      • getQuery

        public S getQuery()
        Description copied from interface: PairwiseSequenceScorer
        Returns the first sequence of the pair.
        Specified by:
        getQuery in interface PairwiseSequenceScorer<S extends org.biojava.nbio.core.sequence.template.Sequence<C>,​C extends org.biojava.nbio.core.sequence.template.Compound>
        Returns:
        the first sequence of the pair
      • getTarget

        public S getTarget()
        Description copied from interface: PairwiseSequenceScorer
        Returns the second sequence of the pair.
        Specified by:
        getTarget in interface PairwiseSequenceScorer<S extends org.biojava.nbio.core.sequence.template.Sequence<C>,​C extends org.biojava.nbio.core.sequence.template.Compound>
        Returns:
        the second sequence of the pair
      • getCompoundSet

        protected org.biojava.nbio.core.sequence.template.CompoundSet<C> getCompoundSet()
        Specified by:
        getCompoundSet in class AbstractMatrixAligner<S extends org.biojava.nbio.core.sequence.template.Sequence<C>,​C extends org.biojava.nbio.core.sequence.template.Compound>
      • getCompoundsOfQuery

        protected List<C> getCompoundsOfQuery()
        Specified by:
        getCompoundsOfQuery in class AbstractMatrixAligner<S extends org.biojava.nbio.core.sequence.template.Sequence<C>,​C extends org.biojava.nbio.core.sequence.template.Compound>
      • getCompoundsOfTarget

        protected List<C> getCompoundsOfTarget()
        Specified by:
        getCompoundsOfTarget in class AbstractMatrixAligner<S extends org.biojava.nbio.core.sequence.template.Sequence<C>,​C extends org.biojava.nbio.core.sequence.template.Compound>
      • getScoreMatrixDimensions

        protected int[] getScoreMatrixDimensions()
        Specified by:
        getScoreMatrixDimensions in class AbstractMatrixAligner<S extends org.biojava.nbio.core.sequence.template.Sequence<C>,​C extends org.biojava.nbio.core.sequence.template.Compound>
      • getSubstitutionScore

        protected int getSubstitutionScore​(int queryColumn,
                                           int targetColumn)
        Specified by:
        getSubstitutionScore in class AbstractMatrixAligner<S extends org.biojava.nbio.core.sequence.template.Sequence<C>,​C extends org.biojava.nbio.core.sequence.template.Compound>
      • isReady

        protected boolean isReady()
        Specified by:
        isReady in class AbstractMatrixAligner<S extends org.biojava.nbio.core.sequence.template.Sequence<C>,​C extends org.biojava.nbio.core.sequence.template.Compound>
      • reset

        protected void reset()
        Description copied from class: AbstractMatrixAligner
        Resets output fields; should be overridden to set max and min
        Overrides:
        reset in class AbstractMatrixAligner<S extends org.biojava.nbio.core.sequence.template.Sequence<C>,​C extends org.biojava.nbio.core.sequence.template.Compound>