ur_rna.StructureEditor.models

## Class Motif.Branch

- java.lang.Object
- - ur_rna.StructureEditor.models.Motif.Branch

- All Implemented Interfaces:
    java.lang.Iterable<Nuc>, IMotif, INucGroup
  Enclosing class:
    Motif

      public static class Motif.Branch
      extends java.lang.Object
      implements IMotif

  Represents a complete helix (the "base" of the Branch) along with all helix and loop regions on one side of it. A more precise definition depends on whether or not the base helix is uni-molecular or bi-molecular (i.e. composed of one or two strands). For a uni-molecular base helix, the corresponding Branch is the same as the Domain defined by the 5'-most nucleotide in the base helix. (This differs from a Domain in general because a Domain need not include all nucleotides in a helix, while a Branch by definition does.) Specifically, a uni-molecular Branch with base helix 'H' is the union of `getDomain(nuc)` with `getHelix(nuc)` for any nucleotide 'nuc' in 'H'. For a bimolecular base helix the definition becomes more complicated, and the choice of which side of the helix to include becomes arbitrary, leading to two possible branches, both with the same base: `'N5' 'N3' |'H'| S1 5'.....GCAUG.....3' S2 (left).....CGUAC.....(right) Note: S2 can be aligned parallel or anti-parallel to S1 | | so "left" can be 5' for parallel or 3' for anti-parallel. 'N5P' 'N3P' B1 ---------> B2 <---------` Let 'H' be the base helix, 'S1' the strand with the lower index, and 'S2' the other strand. Let 'N5' be the 5'-most nucleotide on S1 that is in H and 'N3' the 3'-most nucleotide on 'S1' that is in 'H'. Let 'N5P' be the nucleotide paired with N5 and N3P the one paired with N3. Note that N5P and N3P are both on S2, but the alignment of S1 with respect to S1 could be anti-parallel (which places N3P closer to the 5' end of S2 than N5P) or parallel (in which case N5P is on 5' side of N3P). The two possible branches based at H are: B1: All nucleotides in H and all nucleotides on the 3' side of N3 on S1 and to the right* of N3P on S2. B2: All nucleotides in H and all nucleotides on the 5' side of N5 on S1 and to the left* of N5P on S2. * The terms "right" and "left" depend on the alignment of S2 with respect to S1: For S2-parallel: "right" means the 3' side whereas "left" means the 5' side. For S2-anti-parallel: the above definitions are reversed -- "right" means 5' and "left" means 3'.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private Motif.Helix` | `base`
    `private boolean` | `isLowerBranch`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Branch()`
    `Branch(Motif.Helix base, boolean isLowerBranch)`
    `Branch(Nuc n)` Creates a unimolecular branch that extends from the specified nucleotide to its pair.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Motif.Helix` | `getBaseHelix()`
    `java.util.Collection<Nuc>` | `getBases()` Get a set of all nucleotides included in the group.
    `static Motif.Branch` | `getBranch(Nuc nuc)` Return the smallest branch that contains nuc or null if nuc is not contained in any branch (e.g.
    `boolean` | `isHybrid()`
    `boolean` | `isParallel()`
    `void` | `validate()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface ur_rna.StructureEditor.models.INucGroup

      `iterator, transformAll`

    - ### Methods inherited from interface java.lang.Iterable

      `forEach, spliterator`

- - ### Field Detail

    - #### base

          private Motif.Helix base

    - #### isLowerBranch

          private boolean isLowerBranch

  - ### Constructor Detail

    - #### Branch

          public Branch()

    - #### Branch

          public Branch(Motif.Helix base,
                        boolean isLowerBranch)

    - #### Branch

          public Branch(Nuc n)

      Creates a unimolecular branch that extends from the specified nucleotide to its pair.
      Parameters:
        `n` - A nucleotide in the base helix of a unimolecular branch.

  - ### Method Detail

    - #### getBaseHelix

          public Motif.Helix getBaseHelix()

    - #### getBases

          public java.util.Collection<Nuc> getBases()

      Get a set of all nucleotides included in the group.
      Specified by:
        `getBases` in interface `INucGroup`
      Returns:
        a Collection of nucleotides.

    - #### getBranch

          public static Motif.Branch getBranch(Nuc nuc)

      Return the smallest branch that contains nuc or null if nuc is not contained in any branch (e.g. if it is in a terminal loop or part of a multibranch loop segment.)
      Parameters:
        `nuc` -

    - #### isHybrid

          public boolean isHybrid()

    - #### isParallel

          public boolean isParallel()

    - #### validate

          public void validate()