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
@Immutable public abstract class DefaultDotBracket extends Object implements Serializable
A default implementation of a dot-bracket.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DefaultDotBracket()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected List<List<Strand>>candidatesToCombine()List<DotBracket>combineStrands()Combines strands which share a base pair into a new dot-bracket instance and returns a list of those.static DotBracketcopyWithStrands(DotBracket input, Ct ct)Creates a copy of existing instance and applies the information in CT format to divide strands accordingly.static DefaultDotBracketfromString(String data)Parses a string into an instance of this class.Map<DotBracketSymbol,DotBracketSymbol>pairs()abstract Stringsequence()List<Strand>strands()abstract Stringstructure()List<DotBracketSymbol>symbols()StringtoString()protected voidvalidate()-
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, length, missingInternal, missingTerminal, originalIndex, pseudoknotOrder, sequence, structure, toStringWithStrands
-
-
-
-
Method Detail
-
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.
-
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:DotBracketCombines strands which share a base pair into a new dot-bracket instance and returns a list of those.- Specified by:
combineStrandsin interfaceDotBracket- 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:
strandsin interfaceDotBracket- Returns:
- The list of strands.
-
sequence
@Parameter(order=1) public abstract String sequence()
- Specified by:
sequencein interfaceDotBracket- Returns:
- The sequence of nucleotides.
-
structure
@Parameter(order=2) public abstract String structure()
- Specified by:
structurein interfaceDotBracket- Returns:
- The sequence of dots and brackets representing paired and unpaired residues.
-
pairs
@Lazy @Auxiliary public Map<DotBracketSymbol,DotBracketSymbol> pairs()
- Specified by:
pairsin interfaceDotBracket
-
validate
@Check protected void validate()
-
symbols
public List<DotBracketSymbol> symbols()
- Specified by:
symbolsin interfaceDotBracket- Returns:
- The list of dot-bracket symbols.
-
-