Interface SequencePair<S extends Sequence<C>,​C extends Compound>

    • Method Detail

      • getCompoundInQueryAt

        C getCompoundInQueryAt​(int alignmentIndex)
        Returns the Compound in query sequence at given column index in alignment.
        Parameters:
        alignmentIndex - column index in alignment
        Returns:
        the query sequence element
        Throws:
        java.lang.IndexOutOfBoundsException - if alignmentIndex < 1 or alignmentIndex > Profile.getLength()
      • getCompoundInTargetAt

        C getCompoundInTargetAt​(int alignmentIndex)
        Returns the Compound in target sequence at given column index in alignment.
        Parameters:
        alignmentIndex - column index in alignment
        Returns:
        the target sequence element
        Throws:
        java.lang.IndexOutOfBoundsException - if alignmentIndex < 1 or alignmentIndex > Profile.getLength()
      • getIndexInQueryAt

        int getIndexInQueryAt​(int alignmentIndex)
        Returns the query index corresponding to a given alignment column.
        Parameters:
        alignmentIndex - column index in alignment
        Returns:
        index in query Sequence
        Throws:
        java.lang.IndexOutOfBoundsException - if alignmentIndex < 1 or alignmentIndex > Profile.getLength()
      • getIndexInQueryForTargetAt

        int getIndexInQueryForTargetAt​(int targetIndex)
        Returns the query index corresponding to a given target index.
        Parameters:
        targetIndex - index in target Sequence
        Returns:
        index in query Sequence
        Throws:
        java.lang.IndexOutOfBoundsException - if targetIndex < 1 or targetIndex > getTarget().getLength()
      • getIndexInTargetAt

        int getIndexInTargetAt​(int alignmentIndex)
        Returns the target index corresponding to a given alignment column.
        Parameters:
        alignmentIndex - column index in alignment
        Returns:
        index in target Sequence
        Throws:
        java.lang.IndexOutOfBoundsException - if alignmentIndex < 1 or alignmentIndex > Profile.getLength()
      • getIndexInTargetForQueryAt

        int getIndexInTargetForQueryAt​(int queryIndex)
        Returns the target index corresponding to a given query index.
        Parameters:
        queryIndex - index in query Sequence
        Returns:
        index in target Sequence
        Throws:
        java.lang.IndexOutOfBoundsException - if queryIndex < 1 or queryIndex > getQuery().getLength()
      • getNumIdenticals

        int getNumIdenticals()
        Returns the number of indices for which both the query and target sequences have an identical Compound.
        Returns:
        the number of identical indices
      • getPercentageOfIdentity

        double getPercentageOfIdentity​(boolean countGaps)
        Returns the percentage of identity between the two sequences in the alignment as a fraction between 0 and 1.
        Parameters:
        countGaps - If true, gap positions are counted as mismatches, i.e., the percentage is normalized by the alignment length. If false, gap positions are not counted, i.e. the percentage is normalized by the number of aligned residue pairs. See May (2004). "Percent sequence identity: the need to be explicit."
        Returns:
        the percentage of sequence identity as a fraction in [0,1]
      • getNumSimilars

        int getNumSimilars()
        Returns the number of indices for which both the query and target sequences have a similar Compound.
        Returns:
        the number of similar indices