ur_rna.StructureEditor.models

## Class Motif.Loop

- java.lang.Object
- - ur_rna.StructureEditor.models.Motif.Segment
  - - ur_rna.StructureEditor.models.Motif.Loop

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

      public static class Motif.Loop
      extends Motif.Segment
      implements IMotif

  A Loop represents a series of adjacent unpaired nucleotides. Loops can be categorized as follows:
  Hairpin
    A single-stranded region that connects one side of a helix to the other without any intervening helices. e.g.: A:B-C-D-E-F-(A) (Notation: X:Y represents a base-pair; X-Y represents a 3'-to-5' covalent bond between nucleotides X and Y. (A) means the same "A" nucleotide that appeared earlier in the sequence.)
  Internal Loop
    A single-stranded region that connects one side of a helix to the same side of another helix. (Same side means without any intervening helices. e.g.: A:B-C-D-E-F-G:H-[I-J-...]-(A) --There can be no intervening helices between H and A
  Multibranch Loop
    A series of single-stranded regions that connect multiple helices together. e.g.: A:B-C-D-E-F-G:H-I-J-K:L-M-N-(A)
  Terminal Loop
    A single-stranded regions that is only connected to a helix on one side. e.g.: A-B-C-D-E-F-G:H

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `Motif.Loop.LoopType`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private Motif.Loop.LoopType` | `type`

    - ### Fields inherited from class ur_rna.StructureEditor.models.Motif.Segment

      `end, start`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Loop()`
    `Loop(Nuc start, Nuc end)`
    `Loop(Nuc start, Nuc end, Motif.Loop.LoopType type)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `private static Motif.Loop.LoopType` | `calcLoopType(Motif.Loop l)`
    `static java.util.List<Motif.Loop>` | `findAll(RnaScene scene)` Find all distinct single-stranded regions in specified list of strands.
    `static Motif.Loop` | `getLoop(Nuc nuc)` Return the single-stranded region (loop) that contains the given nuc or null if nuc is not in a loop (i.e.
    `static java.util.List<Bond>` | `getMultiBranchBasePairs(Nuc n)`
    `static java.util.List<Bond>` | `getMultiBranchBasePairs(Nuc n, boolean includeExteriorLoop)`
    `static java.util.List<Bond>` | `getMultiBranchBasePairs(Nuc n, boolean includeExteriorLoop, Bond.MultiLoopRole basePairRole)` Retrieve a list of all bonds that are part of a multi-branch loop.
    `Motif.Loop.LoopType` | `getType()`
    `java.lang.String` | `toString()`

    - ### Methods inherited from class ur_rna.StructureEditor.models.Motif.Segment

      `getBases, getNuc3, getNuc5, getNucAt, orderNucs, size, swapNucs`

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

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

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

      `getBases, iterator, transformAll`

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

      `forEach, spliterator`

- - ### Field Detail

    - #### type

          private Motif.Loop.LoopType type

  - ### Constructor Detail

    - #### Loop

          public Loop()

    - #### Loop

          public Loop(Nuc start,
                      Nuc end)

    - #### Loop

          public Loop(Nuc start,
                      Nuc end,
                      Motif.Loop.LoopType type)

  - ### Method Detail

    - #### calcLoopType

          private static Motif.Loop.LoopType calcLoopType(Motif.Loop l)

    - #### findAll

          public static java.util.List<Motif.Loop> findAll(RnaScene scene)

      Find all distinct single-stranded regions in specified list of strands.
      Returns:
        a list of single-stranded regions (aka loops).

    - #### getLoop

          public static Motif.Loop getLoop(Nuc nuc)

      Return the single-stranded region (loop) that contains the given nuc or null if nuc is not in a loop (i.e. it paired)

    - #### getMultiBranchBasePairs

          public static java.util.List<Bond> getMultiBranchBasePairs(Nuc n)

    - #### getMultiBranchBasePairs

          public static java.util.List<Bond> getMultiBranchBasePairs(Nuc n,
                                                                     boolean includeExteriorLoop)

    - #### getMultiBranchBasePairs

          public static java.util.List<Bond> getMultiBranchBasePairs(Nuc n,
                                                                     boolean includeExteriorLoop,
                                                                     Bond.MultiLoopRole basePairRole)

      Retrieve a list of all bonds that are part of a multi-branch loop. (i.e. the bases of all helices that extend from the multi-branch loop. The list is built by starting with n and traversing the strand in a forward direction, jumping across base-pairs until either n is reached again or the strand terminates. If the strand terminates before n is reached, the n nucleotide was NOT in a multi-branch loop, and NULL is returned.
      Parameters:
        `n` - Any nucleotide in the multi-branch loop. Note that if n is paired, it is technically possible for it to be simultaneously in two adjacent multi-branch loops (assuming it belongs to a "helix" containing only a single base-pair). For this reason, it is better to pass an unpaired nucleotide in for n, to avoid any ambiguity.
        `includeExteriorLoop` - if false, null is returned if the given nucleotide is part of an exterior loop. Otherwise all the branches starting at or after n will be included in the returned list (but those BEFORE n will not be.)
        `basePairRole` - Only applies when n is paired and the bases in either direction are unpaired (or paired to bases in different helices than n). (i.e. n is in a helix comprised of a single pair). This parameter imfluences how the basepair is interpreted -- as an exit or entrance pair.
      Returns:
        a list of bonds (if nStart was in fact in a multi-branch loop) or null otherwise.

    - #### getType

          public Motif.Loop.LoopType getType()

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`