Class Comparison


  • public class Comparison
    extends java.lang.Object
    This class provides static methods for the calculation of the percentage of identity between two aligned sequences.

    Since 4.1.1 the methods for distance inference in forester are also used in BioJava, so this implementation of percentage of identity is not needed anymore. However, the code is maintained as the own BioJava implementation.

    Author:
    Scooter Willis
    • Constructor Summary

      Constructors 
      Constructor Description
      Comparison()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean isGap​(char c)
      Method that determines if a character means a gap in the alignment.
      static float PID​(java.lang.String seq1, java.lang.String seq2)
      this is a gapped PID calculation
      static float PID​(java.lang.String seq1, java.lang.String seq2, int start, int end)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Comparison

        public Comparison()
    • Method Detail

      • PID

        public static final float PID​(java.lang.String seq1,
                                      java.lang.String seq2)
        this is a gapped PID calculation
        Parameters:
        s1 - SequenceI
        s2 - SequenceI
        Returns:
        float
      • PID

        public static final float PID​(java.lang.String seq1,
                                      java.lang.String seq2,
                                      int start,
                                      int end)
      • isGap

        public static final boolean isGap​(char c)
        Method that determines if a character means a gap in the alignment.
        Parameters:
        c - gap character is one of the symbols in {' ','-','.'}
        Returns:
        true if it is a gap, false otherwise