Class DefaultDotBracket

java.lang.Object
pl.poznan.put.structure.formats.DefaultDotBracket
All Implemented Interfaces:
Serializable, DotBracket
Direct Known Subclasses:
ImmutableDefaultDotBracket

@Immutable public abstract class DefaultDotBracket extends Object implements Serializable
A default implementation of a dot-bracket.
See Also:
  • Constructor Details

    • DefaultDotBracket

      public DefaultDotBracket()
  • Method Details

    • copyWithStrands

      public static DotBracket copyWithStrands(DotBracket input, Ct ct)
      Creates a copy of existing instance and applies the information in CT format to divide strands accordingly.
      Parameters:
      input - The input dot-bracket structure.
      ct - The CT data to take strand information from.
      Returns:
      An instance of this class.
    • copyWithoutIsolatedBasePairs

      public static DotBracket copyWithoutIsolatedBasePairs(DotBracket input)
      Creates a copy of existing instance, but removes isolated base pairs from it.
      Parameters:
      input - The input dot-bracket structure.
      Returns:
      An instance of this class.
    • fromString

      public static DefaultDotBracket fromString(String data)
      Parses a string into an instance of this class. The string must be in format:
           >strand_name
           ACGU
           .().
       

      The first line (strand name) is optional. The three lines might appear multiple times.

      Parameters:
      data - The string to parse.
      Returns:
      An instance of this class.
    • combineStrands

      public final List<DotBracket> combineStrands()
      Description copied from interface: DotBracket
      Combines strands which share a base pair into a new dot-bracket instance and returns a list of those.
      Specified by:
      combineStrands in interface DotBracket
      Returns:
      The list of dot-bracket instances, each containing strands which only pair with each other.
    • strands

      @Auxiliary @Default public List<Strand> strands()
      Specified by:
      strands in interface DotBracket
      Returns:
      The list of strands.
    • sequence

      @Parameter(order=1) public abstract String sequence()
      Specified by:
      sequence in interface DotBracket
      Returns:
      The sequence of nucleotides.
    • structure

      @Parameter(order=2) public abstract String structure()
      Specified by:
      structure in interface DotBracket
      Returns:
      The sequence of dots and brackets representing paired and unpaired residues.
    • pairs

      @Lazy @Auxiliary public Map<DotBracketSymbol,DotBracketSymbol> pairs()
      Specified by:
      pairs in interface DotBracket
    • toString

      public final String toString()
      Overrides:
      toString in class Object
    • validate

      @Check protected void validate()
    • symbols

      public List<DotBracketSymbol> symbols()
      Specified by:
      symbols in interface DotBracket
      Returns:
      The list of dot-bracket symbols.
    • candidatesToCombine

      protected final List<List<Strand>> candidatesToCombine()