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:
ABITracerCompoundSet
,DNACompoundSet
,RNACompoundSet
public abstract class AbstractNucleotideCompoundSet<C extends NucleotideCompound> extends AbstractCompoundSet<C>
- Author:
- Andy Yates
-
-
Constructor Summary
Constructors Constructor Description AbstractNucleotideCompoundSet()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
addNucleotideCompound(String base, String complement, String... equivalents)
protected void
calculateIndirectAmbiguities()
Loops through all known nucleotides and attempts to find which are equivalent to each other.NucleotideCompound
getAmbiguity(NucleotideCompound... compounds)
Calculates the best symbol for a collection of compounds.boolean
isComplementable()
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 Detail
-
AbstractNucleotideCompoundSet
public AbstractNucleotideCompoundSet()
-
-
Method Detail
-
addNucleotideCompound
protected void addNucleotideCompound(String base, String complement, String... equivalents)
-
newNucleotideCompound
protected abstract C newNucleotideCompound(String base, String complement, String... equivalents)
-
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
public NucleotideCompound getAmbiguity(NucleotideCompound... compounds)
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>
-
-