|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--AFLPcore.Data | +--AFLPcore.Lane
This class represents a lane. A lane contains a trace, as well as a sample name, a gel name (for the original gel), a lane number, a lane index (which is unique to a lane), cutoffs, and peaks.
The trace consists of a bunch of points indicating the height at.
The first point will contain the height at time=0, the next point
will be at time=timeInc, and so on. These different time increments
are called scan numbers throughout the program. (The ABI 377 scans
a point in the gel every 1.6 seconds.) The lane must also have
a SizeFunction
, which is used to convert between scan
numbers and sizes in bp. The lane can actually contain two traces.
One is the raw data trace, which should not be modified, and the other
is the normalized trace. Normalization is not provided in the lane file,
but can be added as either a GelOperation
or a
LaneOperation
. This allows easy implementation of different
normilization algorithms.
The lane also contains a list of Cutoff
s. These are used
to help locate peaks and to score bins. Each cutoff is defined by a
starting position. A cutoff will apply to the region between its start
position and either the start of the next cutoff in the lane or until
the end of the lane. The list of cutoffs is sorted by start location.
The lane also contains a list of defined peaks. This list can be
obtained and then manipulated by calling getPeaks()
. Again
the lane itself does not find the peaks, but relies on other parts of
the program to find them. This allows the peak locating algorithm to
be changed easily.
SizeFunction
,
Cutoff
,
Operation
Field Summary | |
static int |
BLUE
Constant for lane color |
static int |
GREEN
Constant for lane color |
static int |
NORMALIZED
Constant to tell which type of trace the lane is using. |
static int |
ORIGINAL
Constant to tell which type of trace the lane is using. |
static int |
RED
Constant for lane color |
static int |
YELLOW
Constant for lane color |
Constructor Summary | |
Lane(double[] trace)
Create a new lane with the specified trace. |
Method Summary | |
void |
addCutoff(Cutoff ct)
Adds the specified cutoff to the list of known cutoffs for this lane. |
java.lang.Object |
clone()
Clones this lane Not implemented |
Cutoff |
cutoffUnder(double size)
Gives the first cutoff in the lane that is less than or equal to the specified size. |
int |
getColor()
Gives the color of the data in this lane. |
DataList |
getCutoffs()
Returns the list of cutoffs associated with this lane. |
java.lang.String |
getGelName()
Gives the name of the Gel that this lane was extracted from. |
double |
getHeightAt(double size)
Gives the intensity of the light for the color at the specified size. |
int |
getLaneIndex()
Gives an integer that is unique to this lane. |
int |
getLaneNumber()
Gives the number of the lane on the gel that contianed this information. |
double |
getMaxGlobalHeight()
Gives the maximum height in the lane |
double |
getMaxHeight(double minSize,
double maxSize)
Gives the maximum height in the specified range. |
TracePoint |
getMaxPoint(double minSize,
double maxSize)
Gives the maximum point, (size, height) ,in the specified range. |
double |
getMaxSize()
Gives the largest size, in bp, represented by this lane. |
double |
getMinSize()
Gives the smallest size, in bp, represented by this lane. |
java.lang.String |
getName()
Gives the name of the sample run on this lane. |
int |
getNumPoints()
This returns the number of points in the trace. |
DataList |
getPeaks()
Gives the list of peaks in the lane. |
DataList |
getPeaksInRange(double min,
double max)
Produces a list of peaks that are in the given range. |
SizeFunction |
getSizeFunction()
Gives the object that represents the conversion between size in bp and scan number (trace index). |
double |
getTotalSignal()
Gives the strength of the signal for this lane. |
double[] |
getTrace()
Gives the current trace for this lane, which is either the normalized trace or the raw trace. |
int |
hashCode()
Gives an integer that is equivalent to the lane index, which is a unique number for this lane. |
void |
read(java.io.DataInputStream in)
Reads in the properties of this class from the specified input stream. |
void |
setColor(int color)
Set the color channel used with this lane to the specified value. |
void |
setGelName(java.lang.String newName)
Set the name of the gel that the lane was on to the specified value. |
void |
setLaneNumber(int newLaneNum)
Set the lane number of this lane to the specified value. |
void |
setName(java.lang.String newName)
Set the name of the sample run on this lane to the specified string. |
void |
setNormTrace(double[] trace)
Set the normalized trace to the specified trace. |
void |
setSizeFunction(SizeFunction sizeFunction)
Set the size curve/function to be used by this lane. |
void |
useTrace(int trace_num)
Sets the trace to be used when retrieving height, finding peaks, etc. |
void |
write(java.io.DataOutputStream out)
Writes all of the information this class needs to store in order to be recreated. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int YELLOW
public static final int RED
public static final int BLUE
public static final int GREEN
public static final int ORIGINAL
public static final int NORMALIZED
Constructor Detail |
public Lane(double[] trace)
setParamName
methods.trace
- each value represent the intensity of the light read at
a given point, either scan or size. This should be a raw trace,
not a normalized one.Method Detail |
public double getHeightAt(double size)
size
- the location of interest, specified in bpuseTrace(int)
public final java.lang.String getName()
setName
.public final void setName(java.lang.String newName)
newName
- the value to set the name to.public final java.lang.String getGelName()
setGelName
.public final void setGelName(java.lang.String newName)
newName
- the value to set the name to.public final int getLaneNumber()
public final void setLaneNumber(int newLaneNum)
newName
- the value to set the lane number to to.public final int getColor()
RED
, YELLOW
, GREEN
, and
BLUE
, which are defined in this class.public final void setColor(int color)
the
- color, possible values are given in this class.public SizeFunction getSizeFunction()
public void setSizeFunction(SizeFunction sizeFunction)
sizeFunction
- the new way to convert between scan number and sizepublic DataList getPeaksInRange(double min, double max)
min
- the minimum size in bpmax
- the maximum size in bppublic DataList getPeaks()
public double getMaxHeight(double minSize, double maxSize)
minSize
- the size in bp of the lower boundmaxSize
- the size in bp of the upper boundpublic double getMaxGlobalHeight()
public TracePoint getMaxPoint(double minSize, double maxSize)
minSize
- the size in bp of the lower boundmaxSize
- the size in bp of the upper boundpublic int getNumPoints()
public void useTrace(int trace_num)
trace_num
- indicates which trace to use, possiblities are
ORIGINAL
or NORMALIZED
java.lang.IllegalArgumentException
- occurs when trace_num
is not one of the excepted values.NoDataError
- occurs if this lane has not yet been
normalized. If this is the case, then the normalized trace does not
exist and therefore cannot be used.public void setNormTrace(double[] trace)
trace
- the normalized version of the raw trace.public double[] getTrace()
useTrace(int)
public int getLaneIndex()
public int hashCode()
hashCode
in class java.lang.Object
public double getMaxSize()
public double getMinSize()
public java.lang.Object clone()
clone
in class Data
public double getTotalSignal()
public DataList getCutoffs()
public void addCutoff(Cutoff ct)
ct
- the cutoff to be added.public Cutoff cutoffUnder(double size)
size
- the size which the cutoff must be lower thannull
if none exists.public void write(java.io.DataOutputStream out) throws java.io.IOException
read
can recreate the essential properties of this
class.out
- the destination to write the data to.java.io.IOException
- occurs when a problem is encountered when
writing to the stream.public void read(java.io.DataInputStream in) throws java.io.IOException
write
. This
will retrieve this classes state from the input stream. All of the
current data in this class will be replaced by the data from the
stream.in
- the input stream with the data for the class.java.io.IOException
- occurs when a problem is encountered when
writing to the stream.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |