Class BasePairParameters

  • All Implemented Interfaces:
    Serializable
    Direct Known Subclasses:
    MismatchedBasePairParameters, TertiaryBasePairParameters

    public class BasePairParameters
    extends Object
    implements Serializable
    This module calculates the el Hassan-Calladine Base Pairing and Base-pair Step Parameters for any nucleic acid containing structure that has the information about the core base-pair rings. Citation: https://www.ncbi.nlm.nih.gov/pubmed/11601858 The method that is usually overridden is findPairs(), this base implementation is used for a large-scale analysis of the most proper helical regions in almost 4000 protein-DNA structures, almost 2000 structures containing only DNA, or almost 1300 structures containing only RNA. (as of 7/2017). Those who study tertiary structures for RNA folding should use the TertiaryBasePairParameters, because this base class is only looking for base pairs between separate strands that exactly line up. To relax the lining up policy and allow for non-canonical base pairs, use the MismatchedBasePairParameters class, which will not consider intra-strand base pairing.
    Since:
    5.0.0
    Author:
    Luke Czapla
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      BasePairParameters​(Structure structure)
      This constructor takes a Structure object, finds base pair and base-pair step parameters for double-helical regions within the structure for only canonical DNA pairs.
      BasePairParameters​(Structure structure, boolean useRNA)
      This constructor takes a Structure object, and whether to use the RNA standard bases.
      BasePairParameters​(Structure structure, boolean useRNA, boolean removeDups)
      This constructor takes a Structure object, whether to use RNA, and whether to remove duplicate sequences.
      BasePairParameters​(Structure structure, boolean useRNA, boolean removeDups, boolean canonical)
      This constructor takes a Structure object, finds base pair and base-pair step parameters for double-helical regions within the structure.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      BasePairParameters analyze()
      This method is the main function call to extract all step parameters, pairing parameters, and sequence information from the Structure object provided to the constructor.
      javax.vecmath.Matrix4d basePairReferenceFrame​(Pair<Group> pair)
      This method calculates the central frame (4x4 transformation matrix) of a single base pair.
      static double[] calculateTp​(javax.vecmath.Matrix4d input)
      This method calculates pairing and step parameters from 4x4 transformation matrices (used internally) that comes out as a Matrix4d.
      protected static char complementBase​(char base, boolean RNA)
      This method returns the complement of a base.
      List<Pair<Group>> findPairs​(List<Chain> chains)
      This method performs a search for base pairs in the structure.
      Double getBuckle​(int bp)
      This method returns the buckle in degrees for the given base pair
      int getLength()
      This method returns the total number of base pairs that were found, used after the call to analyze().
      List<Chain> getNucleicChains​(boolean removeDups)
      This method reports all the nucleic acid chains and has an option to remove duplicates if you are considering an analysis of only unique DNA or RNA helices in the Structure.
      Double getOpening​(int bp)
      This method returns the opening in degrees for the given base pair
      List<String> getPairingNames()
      This method returns the names of the pairs in terms of A, G, T/U, and C for each base pair group in the list.
      double[][] getPairingParameters()
      This method reports all the pair parameters, in the order of: buckle, propeller, opening (in degrees), shear, stagger, stretch (in Å).
      String getPairSequence()
      This method returns the primary strand's sequence where parameters were found.
      Double getPropeller​(int bp)
      This method returns the propeller ("propeller-twist") in degrees for the given base pair
      List<javax.vecmath.Matrix4d> getReferenceFrames()  
      Double getRise​(int bp)
      This method returns the rise for the given base pair, relative to the one before it.
      Double getRoll​(int bp)
      This method returns the roll for the given base pair, relative to the one before it.
      Double getShear​(int bp)
      This method returns the shear in Å for the given base pair
      Double getShift​(int bp)
      Return the shift for the given base pair, relative to the one before it.
      Double getSlide​(int bp)
      This method returns the slide for the given base pair, relative to the one before it.
      Double getStagger​(int bp)
      This method returns the stagger in Å for the given base pair
      double[][] getStepParameters()
      This method reports all the base-pair step parameters, in the order of: tilt, roll, twist (in degrees), shift, slide, rise (in Å).
      Double getStretch​(int bp)
      This method returns the stretch in Å for the given base pair
      Double getTilt​(int bp)
      This method returns the tilt for the given base pair, relative to the one before it.
      Double getTwist​(int bp)
      This method returns the twist for the given base pair, relative to the one before it.
      protected static boolean match​(char a, char b, boolean RNA)
      This returns true if a is the complement of b, false otherwise.
      String toString()  
    • Constructor Detail

      • BasePairParameters

        public BasePairParameters​(Structure structure,
                                  boolean useRNA,
                                  boolean removeDups,
                                  boolean canonical)
        This constructor takes a Structure object, finds base pair and base-pair step parameters for double-helical regions within the structure.
        Parameters:
        structure - The already-loaded structure to analyze.
        useRNA - whether to look for canonical RNA pairs. By default (false) it analyzes DNA.
        removeDups - whether to only look for base-pair parameters for each unique sequence in the structure (if set to true)
        canonical - Whether to consider only Watson-Crick base pairs
      • BasePairParameters

        public BasePairParameters​(Structure structure,
                                  boolean useRNA,
                                  boolean removeDups)
        This constructor takes a Structure object, whether to use RNA, and whether to remove duplicate sequences.
        Parameters:
        structure - The already-loaded structure to analyze.
        useRNA - if true, the RNA standard bases will be used. Otherwise, if false, it will work on standard DNA bases.
        removeDups - if true, duplicate sequences will not be considered. This is for the analysis of X-ray structures from RCSB, where there may be identical or similar units.
      • BasePairParameters

        public BasePairParameters​(Structure structure,
                                  boolean useRNA)
        This constructor takes a Structure object, and whether to use the RNA standard bases.
        Parameters:
        structure - The already-loaded structure to analyze.
        useRNA - if true, the RNA standard bases will be used. Otherwise, if false, it will work on standard DNA bases.
      • BasePairParameters

        public BasePairParameters​(Structure structure)
        This constructor takes a Structure object, finds base pair and base-pair step parameters for double-helical regions within the structure for only canonical DNA pairs.
        Parameters:
        structure - The already-loaded structure to analyze.
    • Method Detail

      • analyze

        public BasePairParameters analyze()
        This method is the main function call to extract all step parameters, pairing parameters, and sequence information from the Structure object provided to the constructor.
        Returns:
        This same object with the populated data, convenient for output (e.g. log.info(new BasePairParameters(structure).analyze());)
      • getLength

        public int getLength()
        This method returns the total number of base pairs that were found, used after the call to analyze().
        Returns:
        An integer value, number of base pairs
      • getPairingParameters

        public double[][] getPairingParameters()
        This method reports all the pair parameters, in the order of: buckle, propeller, opening (in degrees), shear, stagger, stretch (in Å).
        Returns:
        A double[][] with length equal to number of base pairs for rows, and 6 columns
      • getStepParameters

        public double[][] getStepParameters()
        This method reports all the base-pair step parameters, in the order of: tilt, roll, twist (in degrees), shift, slide, rise (in Å).
        Returns:
        A double[][] with length equal to number of base pairs (the first row 0 has no step and therefore is six zeroes), and 6 columns.
      • getPairSequence

        public String getPairSequence()
        This method returns the primary strand's sequence where parameters were found. There are spaces in the string anywhere there was a break in the helix or when it goes from one helix to another helix in the structure. (the "step" is still returned)
        Returns:
        String of primary sequence with spaces between gaps and new helices.
      • getPairingNames

        public List<StringgetPairingNames()
        This method returns the names of the pairs in terms of A, G, T/U, and C for each base pair group in the list. The first character is the leading strand base and the second character is the complementary base
        Returns:
      • getBuckle

        public Double getBuckle​(int bp)
        This method returns the buckle in degrees for the given base pair
        Parameters:
        bp - the number of the base pair (starting with 0)
        Returns:
        the value as a double (in degrees)
      • getPropeller

        public Double getPropeller​(int bp)
        This method returns the propeller ("propeller-twist") in degrees for the given base pair
        Parameters:
        bp - the number of the base pair (starting with 0)
        Returns:
        the value as a double (in degrees)
      • getOpening

        public Double getOpening​(int bp)
        This method returns the opening in degrees for the given base pair
        Parameters:
        bp - the number of the base pair (starting with 0)
        Returns:
        the value as a double (in degrees)
      • getShear

        public Double getShear​(int bp)
        This method returns the shear in Å for the given base pair
        Parameters:
        bp - the number of the base pair (starting with 0)
        Returns:
        the value as a double (in Å)
      • getStretch

        public Double getStretch​(int bp)
        This method returns the stretch in Å for the given base pair
        Parameters:
        bp - the number of the base pair (starting with 0)
        Returns:
        the value as a double (in Å)
      • getStagger

        public Double getStagger​(int bp)
        This method returns the stagger in Å for the given base pair
        Parameters:
        bp - the number of the base pair (starting with 0)
        Returns:
        the value as a double (in Å)
      • getTilt

        public Double getTilt​(int bp)
        This method returns the tilt for the given base pair, relative to the one before it.
        Parameters:
        bp - the number of the base pair (starting with 0)
        Returns:
        the value as a double (in degrees)
      • getRoll

        public Double getRoll​(int bp)
        This method returns the roll for the given base pair, relative to the one before it.
        Parameters:
        bp - the number of the base pair (starting with 0)
        Returns:
        the value as a double (in degrees)
      • getTwist

        public Double getTwist​(int bp)
        This method returns the twist for the given base pair, relative to the one before it.
        Parameters:
        bp - the number of the base pair (starting with 0)
        Returns:
        the value as a double (in degrees)
      • getShift

        public Double getShift​(int bp)
        Return the shift for the given base pair, relative to the one before it.
        Parameters:
        bp - the number of the base pair (starting with 0)
        Returns:
        the value as a double (in Å)
      • getSlide

        public Double getSlide​(int bp)
        This method returns the slide for the given base pair, relative to the one before it.
        Parameters:
        bp - the number of the base pair (starting with 0)
        Returns:
        the value as a double (in Å)
      • getRise

        public Double getRise​(int bp)
        This method returns the rise for the given base pair, relative to the one before it.
        Parameters:
        bp - the number of the base pair (starting with 0)
        Returns:
        the value as a double (in Å)
      • getNucleicChains

        public List<ChaingetNucleicChains​(boolean removeDups)
        This method reports all the nucleic acid chains and has an option to remove duplicates if you are considering an analysis of only unique DNA or RNA helices in the Structure.
        Parameters:
        removeDups - If true, it will ignore duplicate chains
        Returns:
        A list of all the nucleic acid chains in order of the Structure
      • findPairs

        public List<Pair<Group>> findPairs​(List<Chain> chains)
        This method performs a search for base pairs in the structure. The criteria is alignment of sequences and the canonical base pairs of DNA or RNA. Use MismatchedBasePairParameters or TertiaryBasePairParameters for finding higher-order associations.
        Parameters:
        chains - The list of chains already found to be nucleic acids
        Returns:
        The list of corresponding Watson-Crick groups as pairs, as a Pair of nucleic acid Groups
      • basePairReferenceFrame

        public javax.vecmath.Matrix4d basePairReferenceFrame​(Pair<Group> pair)
        This method calculates the central frame (4x4 transformation matrix) of a single base pair.
        Parameters:
        pair - An array of the two groups that make a hypothetical pair
        Returns:
        The middle frame of the center of the base-pair formed
      • calculateTp

        public static double[] calculateTp​(javax.vecmath.Matrix4d input)
        This method calculates pairing and step parameters from 4x4 transformation matrices (used internally) that comes out as a Matrix4d.
        Parameters:
        input - the 4x4 matrix representing the transformation from strand II -> strand I or pair i to pair i+1
        Returns:
        Six parameters as double[6]
      • complementBase

        protected static char complementBase​(char base,
                                             boolean RNA)
        This method returns the complement of a base. (used internally)
        Parameters:
        base - The letter of the base
        RNA - Whether it is RNA (if false, it is DNA)
        Returns:
        The character representing the complement of the base
      • match

        protected static boolean match​(char a,
                                       char b,
                                       boolean RNA)
        This returns true if a is the complement of b, false otherwise. (used internally)
        Parameters:
        a - First letter
        b - Potential matching letter
        RNA - Whether it is RNA (if false, DNA rules are used)
        Returns:
        True if the bases are complementary.