Class AbstractNucleotideCompoundSet<C extends NucleotideCompound>
java.lang.Object
org.biojava.nbio.core.sequence.template.AbstractCompoundSet<C>
org.biojava.nbio.core.sequence.template.AbstractNucleotideCompoundSet<C>
- Type Parameters:
C
- Type of compound this set will contain but must extend NucleotideCompound
- All Implemented Interfaces:
CompoundSet<C>
- Direct Known Subclasses:
DNACompoundSet
,RNACompoundSet
public abstract class AbstractNucleotideCompoundSet<C extends NucleotideCompound>
extends AbstractCompoundSet<C>
- Author:
- Andy Yates
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addNucleotideCompound
(String base, String complement, String... equivalents) protected void
Loops through all known nucleotides and attempts to find which are equivalent to each other.getAmbiguity
(NucleotideCompound... compounds) Calculates the best symbol for a collection of compounds.boolean
NucleotideCompounds can always complementprotected abstract C
newNucleotideCompound
(String base, String complement, String... equivalents) Methods inherited from class org.biojava.nbio.core.sequence.template.AbstractCompoundSet
addCompound, addCompound, addCompound, addEquivalent, compoundsEqual, compoundsEquivalent, equals, getAllCompounds, getCompoundForString, getEquivalentCompounds, getMaxSingleCompoundStringLength, getStringForCompound, hasCompound, hashCode, isCompoundStringLengthEqual, isValidSequence
-
Constructor Details
-
AbstractNucleotideCompoundSet
public AbstractNucleotideCompoundSet()
-
-
Method Details
-
addNucleotideCompound
-
newNucleotideCompound
-
calculateIndirectAmbiguities
protected void calculateIndirectAmbiguities()Loops through all known nucleotides and attempts to find which are equivalent to each other. Also takes into account lower casing nucleotides as well as upper-cased ones. -
getAmbiguity
Calculates the best symbol for a collection of compounds. For example if you gave this method a AC it will return a M which is the ambiguity symbol for these compounds.- Parameters:
compounds
- Compounds to calculate ambiguity for- Returns:
- The ambiguity symbol which represents this set of nucleotides best
-
isComplementable
public boolean isComplementable()NucleotideCompounds can always complement- Specified by:
isComplementable
in interfaceCompoundSet<C extends NucleotideCompound>
- Overrides:
isComplementable
in classAbstractCompoundSet<C extends NucleotideCompound>
-