Package pl.poznan.put.structure.formats
Class DefaultDotBracket
java.lang.Object
pl.poznan.put.structure.formats.DefaultDotBracket
- All Implemented Interfaces:
Serializable
,DotBracket
- Direct Known Subclasses:
ImmutableDefaultDotBracket
A default implementation of a dot-bracket.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal List<DotBracket>
Combines strands which share a base pair into a new dot-bracket instance and returns a list of those.static DotBracket
Creates a copy of existing instance, but removes isolated base pairs from it.static DotBracket
copyWithStrands
(DotBracket input, Ct ct) Creates a copy of existing instance and applies the information in CT format to divide strands accordingly.static DefaultDotBracket
fromString
(String data) Parses a string into an instance of this class.pairs()
abstract String
sequence()
strands()
abstract String
symbols()
final String
toString()
protected void
validate()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface pl.poznan.put.structure.formats.DotBracket
containsMissing, findStrand, isIsolated, isolatedSymbols, length, missingInternal, missingTerminal, originalIndex, pseudoknotOrder, sequence, structure, toStringWithStrands
-
Constructor Details
-
DefaultDotBracket
public DefaultDotBracket()
-
-
Method Details
-
copyWithStrands
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
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
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
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 interfaceDotBracket
- Returns:
- The list of dot-bracket instances, each containing strands which only pair with each other.
-
strands
- Specified by:
strands
in interfaceDotBracket
- Returns:
- The list of strands.
-
sequence
- Specified by:
sequence
in interfaceDotBracket
- Returns:
- The sequence of nucleotides.
-
structure
- Specified by:
structure
in interfaceDotBracket
- Returns:
- The sequence of dots and brackets representing paired and unpaired residues.
-
pairs
- Specified by:
pairs
in interfaceDotBracket
-
toString
-
validate
@Check protected void validate() -
symbols
- Specified by:
symbols
in interfaceDotBracket
- Returns:
- The list of dot-bracket symbols.
-
candidatesToCombine
-