NucleotideTools (BioJava-1.5-beta API)
Keywords: org.biojava.bio.seq.NucleotideTools class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.biojava.bio.seq
Class NucleotideTools

    java.lang.Object
      org.biojava.bio.seq.NucleotideTools

    public final class NucleotideTools

extends Object

Useful functionality for processing nucleotide sequences.

Author:
  Matthew Pocock, Keith James (docs)

Method Summary
`static AtomicSymbol` | `a()`
`static Symbol` | `b()`
`static AtomicSymbol` | `c()`
`static Symbol` | `complement(Symbol sym)` Complement the symbol.
`static SymbolList` | `complement(SymbolList list)` Retrieve a complement view of list.
`static ReversibleTranslationTable` | `complementTable()` Get a translation table for complementing Nucleotide symbols.
`static SymbolList` | `createNucleotide(String nucleotide)` Return a new Nucleotide SymbolList for nucleotide.
`static Sequence` | `createNucleotideSequence(String nucleotide, String name)` Return a new Nucleotide Sequence for nucleotide.
`static Symbol` | `d()`
`static Symbol` | `forIndex(int index)` Return the symbol for an index - compatible with `index`.
`static Symbol` | `forSymbol(char token)` Retrieve the symbol for a symbol.
`static AtomicSymbol` | `g()`
`static FiniteAlphabet` | `getNucleotide()` Return the Nucleotide alphabet.
`static Symbol` | `h()`
`static int` | `index(Symbol sym)` Return an integer index for a symbol - compatible with `forIndex`.
`static Symbol` | `k()`
`static Symbol` | `m()`
`static Symbol` | `n()`
`static char` | `nucleotideToken(Symbol sym)` Get a single-character token for a Nucleotide symbol
`static Symbol` | `r()`
`static SymbolList` | `reverseComplement(SymbolList list)` Retrieve a reverse-complement view of list.
`static Symbol` | `s()`
`static AtomicSymbol` | `t()`
`static AtomicSymbol` | `u()`
`static Symbol` | `v()`
`static Symbol` | `w()`
`static Symbol` | `y()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### a

    public static AtomicSymbol a()

### g

    public static AtomicSymbol g()

### c

    public static AtomicSymbol c()

### t

    public static AtomicSymbol t()

### u

    public static AtomicSymbol u()

### r

    public static Symbol r()

### y

    public static Symbol y()

### m

    public static Symbol m()

### k

    public static Symbol k()

### s

    public static Symbol s()

### w

    public static Symbol w()

### b

    public static Symbol b()

### d

    public static Symbol d()

### h

    public static Symbol h()

### v

    public static Symbol v()

### n

    public static Symbol n()

### getNucleotide

    public static FiniteAlphabet getNucleotide()

  Return the Nucleotide alphabet.

  Returns:
    a flyweight version of the Nucleotide alphabet

### createNucleotide

    public static SymbolList createNucleotide(String nucleotide)
                                       throws IllegalSymbolException

  Return a new Nucleotide SymbolList for nucleotide.

  Parameters:
    `nucleotide` - a String to parse into Nucleotide
  Returns:
    a SymbolList created form nucleotide
  Throws:
    `IllegalSymbolException` - if nucleotide contains any non-Nucleotide characters

### createNucleotideSequence

    public static Sequence createNucleotideSequence(String nucleotide,
                                                    String name)
                                             throws IllegalSymbolException

  Return a new Nucleotide Sequence for nucleotide.

  Parameters:
    `nucleotide` - a String to parse into Nucleotide
    `name` - a String to use as the name
  Returns:
    a Sequence created form nucleotide
  Throws:
    `IllegalSymbolException` - if nucleotide contains any non-Nucleotide characters

### index

    public static int index(Symbol sym)
                     throws IllegalSymbolException

  Return an integer index for a symbol - compatible with `forIndex`.

  The index for a symbol is stable accross virtual machines & invocations.

  Parameters:
    `sym` - the Symbol to index
  Returns:
    the index for that symbol
  Throws:
    `IllegalSymbolException` - if sym is not a member of the Nucleotide alphabet

### forIndex

    public static Symbol forIndex(int index)
                           throws IndexOutOfBoundsException

  Return the symbol for an index - compatible with `index`.

  The index for a symbol is stable accross virtual machines & invocations.

  Parameters:
    `index` - the index to look up
  Returns:
    the symbol at that index
  Throws:
    `IndexOutOfBoundsException` - if index is not between 0 and 3

### complement

    public static Symbol complement(Symbol sym)
                             throws IllegalSymbolException

  Complement the symbol.

  Parameters:
    `sym` - the symbol to complement
  Returns:
    a Symbol that is the complement of sym
  Throws:
    `IllegalSymbolException` - if sym is not a member of the Nucleotide alphabet

### forSymbol

    public static Symbol forSymbol(char token)
                            throws IllegalSymbolException

  Retrieve the symbol for a symbol.

  Parameters:
    `token` - the char to look up
  Returns:
    the symbol for that char
  Throws:
    `IllegalSymbolException` - if the char does not belong to {a, g, c, t, u}

### complement

    public static SymbolList complement(SymbolList list)
                                 throws IllegalAlphabetException

  Retrieve a complement view of list.

  Parameters:
    `list` - the SymbolList to complement
  Returns:
    a SymbolList that is the complement
  Throws:
    `IllegalAlphabetException` - if list is not a complementable alphabet

### reverseComplement

    public static SymbolList reverseComplement(SymbolList list)
                                        throws IllegalAlphabetException

  Retrieve a reverse-complement view of list.

  Parameters:
    `list` - the SymbolList to complement
  Returns:
    a SymbolList that is the complement
  Throws:
    `IllegalAlphabetException` - if list is not a complementable alphabet

### complementTable

    public static ReversibleTranslationTable complementTable()

  Get a translation table for complementing Nucleotide symbols.

  Since:
    1.1

### nucleotideToken

    public static char nucleotideToken(Symbol sym)
                                throws IllegalSymbolException

  Get a single-character token for a Nucleotide symbol

  Throws:
    `IllegalSymbolException` - if `sym` is not a member of the Nucleotide alphabet

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD