|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--AFLPcore.Data | +--AFLPcore.SortableData | +--AFLPcore.Cutoff
This class represents different cutoffs for a lane. This is used by
ScoreFunction
classes to determine how to score things.
Each cutoff consists of a starting position (in bp) and a number
of levels. Each level can be a different CutoffFunction
.
The levels must have an order. The smallest levels should be those with the
smallest cutoff value. Since some functions are not linear, the ordering
will be based at the cutoff value at the start position.
ScoreFunction
,
CutoffFunction
,
Lane
Field Summary | |
static int |
AREA
|
static int |
HEIGHT
|
Constructor Summary | |
Cutoff(double startPos,
int numLevels)
Creates a new cutoff with the specified number of levels and starting at the specified position. |
Method Summary | |
void |
addFunction(CutoffFunction newFunction)
Adds the specified function to this cutoff. |
java.lang.Object |
clone()
Gives an object where all of the data is the same as this one. |
void |
deleteFunction(int level)
Removes the specified level from this cutoff. |
double |
getCutoff(double size,
int level)
Gives the value for the height/area above which all peaks should be counted with a confidence relative to the level. |
CutoffFunction |
getCutoffFunction(int level)
Gives the cutoff function for the specified level. |
int |
getMode()
Gives the current cutoff mode, either height or area. |
int |
getNumLevels()
Gives the number of different cutoff levels supported by this object. |
double |
getSearchKey()
Gives the starting position for this cutoff. |
double |
getStartPos()
Gives the starting position for this cutoff. |
void |
read(java.io.DataInputStream in)
Reads in the properties of this class from the specified input stream. |
void |
setCutoffFunction(CutoffFunction func,
int level)
Sets the cutoff function for the specified level. |
void |
setMode(int modeSelector)
Sets the cutoff so that it applies either to peak height or to peak area. |
void |
setStartPos(double newPosition)
Adjusts the starting position. |
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, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int AREA
public static final int HEIGHT
Constructor Detail |
public Cutoff(double startPos, int numLevels)
startPos
- the size in bp at which the cutoff first appliesnumLevels
- the number of different cutoff supported by this levelMethod Detail |
public final double getSearchKey()
getSearchKey
in class SortableData
public final double getStartPos()
public void setStartPos(double newPosition)
public int getNumLevels()
public void setMode(int modeSelector)
modeSelector
- either AREA
or HEIGHT
java.lang.IllegalArgumentException
- occurs if modeSelector
isn't one of the accepted values.public int getMode()
AREA
or HEIGHT
public CutoffFunction getCutoffFunction(int level)
level
- the confidence level, must be >= 0 and < numLevels.java.lang.IllegalArgumentException
- occurs if level fails to
meet the above.public void setCutoffFunction(CutoffFunction func, int level)
func
- the function used to determine the cutoff.level
- the confidence level, must be >= 0 and < numLevels.java.lang.IllegalArgumentException
- occurs if level fails to
meet the above.public double getCutoff(double size, int level)
size
- the size in bp to determine the cutoff value for.level
- the confidence level, must be >= 0 and < numLevels.java.lang.IllegalArgumentException
- occurs if level fails to
meet the above.public void addFunction(CutoffFunction newFunction)
newFunction
- the function to add to this cutoff, it's height
should already be set to the desired value.public void deleteFunction(int level)
level
- the level to remove.public java.lang.Object clone()
clone
in class Data
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 |