Class SimpleSubstitutionMatrix<C extends Compound>

  • Type Parameters:
    C - each element of the matrix corresponds to a pair of Compounds of type C
    All Implemented Interfaces:
    java.io.Serializable, SubstitutionMatrix<C>

    public class SimpleSubstitutionMatrix<C extends Compound>
    extends java.lang.Object
    implements SubstitutionMatrix<C>, java.io.Serializable
    Implements a data structure which holds the score (penalty or bonus) given during alignment for the exchange of one Compound in a sequence for another.
    Author:
    Mark Chapman, Daniel Cameron, Paolo Pavan
    See Also:
    Serialized Form
    • Constructor Detail

      • SimpleSubstitutionMatrix

        public SimpleSubstitutionMatrix​(CompoundSet<C> compoundSet,
                                        java.io.File fileInput)
                                 throws java.io.FileNotFoundException
        Creates a substitution matrix by reading in a file.
        Parameters:
        compoundSet - the CompoundSet on which the matrix is defined
        fileInput - file parsed for a substitution matrix
        Throws:
        java.io.FileNotFoundException - if fileInput parameter cannot be read
      • SimpleSubstitutionMatrix

        public SimpleSubstitutionMatrix​(CompoundSet<C> compoundSet,
                                        java.io.Reader input,
                                        java.lang.String name)
        Creates a substitution matrix by parsing some input.
        Parameters:
        compoundSet - the CompoundSet on which the matrix is defined
        input - input parsed for a substitution matrix
        name - the name (short description) of this matrix
      • SimpleSubstitutionMatrix

        public SimpleSubstitutionMatrix​(CompoundSet<C> compoundSet,
                                        java.lang.String matrixInput,
                                        java.lang.String name)
        Creates a substitution matrix by parsing a String.
        Parameters:
        compoundSet - the CompoundSet on which the matrix is defined
        matrixInput - String parsed for a substitution matrix
        name - the name (short description) of this matrix
      • SimpleSubstitutionMatrix

        public SimpleSubstitutionMatrix​(CompoundSet<C> compoundSet,
                                        short match,
                                        short replace)
        Creates an identity substitution matrix from match and replace values.
        Parameters:
        compoundSet - the CompoundSet on which the matrix is defined
        match - matrix value used for equivalent Compounds
        replace - matrix value used for differing Compounds