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 Details

    • AbstractNucleotideCompoundSet

      public AbstractNucleotideCompoundSet()
  • Method Details

    • 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 interface CompoundSet<C extends NucleotideCompound>
      Overrides:
      isComplementable in class AbstractCompoundSet<C extends NucleotideCompound>