ChromatogramTools (BioJava-1.5-beta API)
Keywords: org.biojava.bio.chromatogram.ChromatogramTools 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.chromatogram
Class ChromatogramTools

    java.lang.Object
      org.biojava.bio.chromatogram.ChromatogramTools

    public class ChromatogramTools

extends Object

Utility class for dealing with `Chromatogram`s.

Since:
  1.3
Author:
  Rhett Sutphin (UI CBCB), Matthew Pocock

Method Summary
`static SymbolList` | `getDNASequence(Chromatogram chromat)` Get the called DNA sequence from a chromatogram.
`static int` | `getIntFromSymbolList(SymbolList list, int which)` Retrieves, unwraps, and returns an `int` from a SymbolList containing `IntegerAlphabet.IntegerSymbol`s.
`static int` | `getTraceOffset(Chromatogram chromat, int which)` Get a specific value from the trace offset sequence in the given chromatogram and extract its `int` value.
`static int[]` | `getTraceOffsetArray(Chromatogram chromat)` Converts the peak offsets list of the given chromatogram into a new `int` array.
`static SymbolList` | `getTraceOffsets(Chromatogram chromat)` Get the peak offsets for the called bases of a chromatogram.

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

Method Detail

### getDNASequence

    public static final SymbolList getDNASequence(Chromatogram chromat)

  Get the called DNA sequence from a chromatogram. A synonym for `chromat.getBaseCalls().symbolListForLabel(Chromatogram.DNA)`.

  Parameters:
    `chromat` - the Chromatogram to process
  Returns:
    a SymbolList containing the DNA

### getTraceOffsets

    public static final SymbolList getTraceOffsets(Chromatogram chromat)

  Get the peak offsets for the called bases of a chromatogram. A synonym for `chromat.getBaseCalls().symbolListForLabel(Chromatogram.OFFSETS)`.

  Parameters:
    `chromat` - the Chromatogram to process
  Returns:
    a SymbolList of offsets

### getTraceOffsetArray

    public static final int[] getTraceOffsetArray(Chromatogram chromat)

  Converts the peak offsets list of the given chromatogram into a new `int` array.

  The array is, of course, allocated and initialized at each call, so using this method like this:

       for (int i = m ; i < n ; i++)
          doSomething(getTraceOffsetArray(c)[i]);

  is not recommended.

  Parameters:
    `chromat` - the Chromatogram to process
  Returns:
    an array of integers representing peak offsets

### getTraceOffset

    public static final int getTraceOffset(Chromatogram chromat,
                                           int which)

  Get a specific value from the trace offset sequence in the given chromatogram and extract its `int` value.

  Parameters:
    `chromat` - the chromatogram to examine
    `which` - which symbol in the trace offset sequence to get. 1-based index.
  Returns:
    the offset for that peak

### getIntFromSymbolList

    public static final int getIntFromSymbolList(SymbolList list,
                                                 int which)

  Retrieves, unwraps, and returns an `int` from a SymbolList containing `IntegerAlphabet.IntegerSymbol`s.

  Parameters:
    `list` - the target list
    `which` - which symbol to unwrap and return. 1-based index.
  Returns:
    the integer represented by the symbol at that position

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