public class ABITrace extends Object
File, URL, and byte[]
.Constructor and Description |
---|
ABITrace(byte[] ABIFileData)
The
byte[] constructor parses an ABI file represented as a byte array. |
ABITrace(File ABIFile)
The File constructor opens a local ABI file and parses the content.
|
ABITrace(URL ABIFile)
The URL constructor opens an ABI file from any URL.
|
Modifier and Type | Method and Description |
---|---|
int[] |
getBasecalls()
Returns an
int[] array that represents the basecalls - each int in the
array corresponds to an x-coordinate point in the graph that is a peak (a base location). |
BufferedImage |
getImage(int imageHeight,
int widthScale)
Returns a BufferedImage that represents the entire trace.
|
SymbolList |
getSequence()
Returns the original programatically determined (unedited) sequence as a
SymbolList . |
int |
getSequenceLength()
Returns the length of the sequence (number of bases) in this trace.
|
int[] |
getTrace(AtomicSymbol base)
Returns one of the four traces - all of the y-coordinate values,
each of which correspond to a single x-coordinate relative to the
position in the array, so that if element 4 in the array is 972, then
x is 4 and y is 972 for that point.
|
int |
getTraceLength()
Returns the length of the trace (number of x-coordinate points in the graph).
|
public ABITrace(File ABIFile) throws IOException
ABIFile
- is a java.io.File
on the local file system.IOException
- if there is a problem reading the file.IllegalArgumentException
- if the file is not a valid ABI file.public ABITrace(URL ABIFile) throws IOException
ABIFile
- is a java.net.URL
for an ABI trace file.IOException
- if there is a problem reading from the URL.IllegalArgumentException
- if the URL does not contain a valid ABI file.public ABITrace(byte[] ABIFileData)
byte[]
constructor parses an ABI file represented as a byte array.IllegalArgumentException
- if the data does not represent a valid ABI file.public int getSequenceLength()
public int getTraceLength()
public int[] getBasecalls()
int[]
array that represents the basecalls - each int in the
array corresponds to an x-coordinate point in the graph that is a peak (a base location).public SymbolList getSequence() throws BioError
SymbolList
.BioError
public int[] getTrace(AtomicSymbol base) throws IllegalSymbolException
base
- the DNA AttomicSymbol to retrieve the trace values forIllegalSymbolException
- if the base is not validpublic BufferedImage getImage(int imageHeight, int widthScale)
getTraceLength()
). The entire trace is represented
in the returned image.imageHeight
- is the desired height of the image in pixels.widthScale
- indiates how many horizontal pixels to use to represent a single x-coordinate (try 2).Copyright © 2014 BioJava. All rights reserved.