|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--AFLPcore.Data | +--AFLPcore.SortableData | +--AFLPcore.Bin
This class represents a bin, which is simply a region defined in a gel.
It also contains a ScoreFunction
. This is responsible for
interpreting the data inside of the bin. The bin also contains the
label assigned to each lane by the score function.
ScoreFunction
Constructor Summary | |
Bin(double loc)
Creates a new bin with the specified parameters. |
|
Bin(double loc,
double range)
Creates a new bin with the specified parameters. |
|
Bin(double loc,
double range,
ScoreFunction score)
Creates a new bin with the specified parameters. |
Method Summary | |
void |
adjustLocation(double adjustment)
Moves the bin to a new location based on it's present location. |
void |
adjustRange(double adjustment)
Changes the range relative to the current value of the range. |
java.lang.Object |
clone()
Produces a new bin identical to this one, except it has not been scored. |
double |
getLocation()
Gives the position of this bin in the gel. |
java.lang.String |
getName()
Gives the name of this bin. |
double |
getRange()
Gives the range of the bin. |
java.lang.String |
getScore(Lane ln)
Gives the string representing how the given lane was scored. |
java.lang.String[] |
getScoreInfo()
Gives the overall score info for the bin. |
ScoreFunction |
getScoreMethod()
Gives the method used to score a bin. |
double |
getSearchKey()
Gives the value used to search/sort bins. |
boolean |
isScored()
Used to tell whether or not the score method has been
called on this bins current configuration. |
void |
read(java.io.DataInputStream in)
Reads in the properties of this class from the specified input stream. |
void |
score(DataList lanes)
Scores this bin using the scoring method set and the lanes specified. |
void |
scoreOverall(DataList lanes)
Sets the overall scoring information for the bin. |
void |
setLocation(double location)
Sets the position/location of this bin to the one specified. |
void |
setName(java.lang.String name)
Sets the name of the bin to the specified value. |
void |
setRange(double range)
Sets the range of the bin to the specified value. |
void |
setScore(boolean scored)
Sets the bin so that the current scoring is either accepted as valid or invalidated. |
void |
setScore(Lane ln,
java.lang.String value)
Changes the scoring for the specified lane. |
void |
setScoreMethod(ScoreFunction scorer)
Sets the scoring method to the one specified. |
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 |
Constructor Detail |
public Bin(double loc)
loc
- the location, in bp, of the bin on the gel.public Bin(double loc, double range)
loc
- the location, in bp, of the bin on the gel.range
- the range of the bin, agan in bp.public Bin(double loc, double range, ScoreFunction score)
loc
- the location, in bp, of the bin on the gel.range
- the range of the bin, agan in bp.score
- the method used to score the bin.Method Detail |
public final double getSearchKey()
getSearchKey
in class SortableData
public ScoreFunction getScoreMethod()
setScoreMethod(AFLPcore.ScoreFunction)
public void setScoreMethod(ScoreFunction scorer)
scorer
- The method to use on this bin.getScoreMethod()
public void score(DataList lanes)
lanes
- the lanes to include in the bin.public void scoreOverall(DataList lanes)
lanes
- the lanes to include in the overall scoring of this bingetScoreInfo()
,
ScoreFunction
,
Peak.isMarked()
public java.lang.String getScore(Lane ln)
ln
- the lane to retrieve the score forgetScoreMethod()
,
setScoreMethod(AFLPcore.ScoreFunction)
public void setScore(Lane ln, java.lang.String value)
ScoreFuction
set for this bin.ln
- the lane to changevalue
- the new score for the lane, which should be one of the
choices offered by the current score method.getScoreMethod()
,
ScoreFunction.getChoices(int)
public java.lang.String[] getScoreInfo()
ScoreFunction
,
scoreOverall(AFLPcore.DataList)
public boolean isScored()
score
method has been
called on this bins current configuration. For example, if the bin
is moved, it needs to be rescored.true
if the bin still has a valid scoring.public void setScore(boolean scored)
scored
- true
if the current scoring is to be valid.public double getLocation()
public void setLocation(double location)
location
- the new position for the binpublic void adjustLocation(double adjustment)
adjustment
- the distance to move the bin, which may be either
positive or negative.public double getRange()
public void setRange(double range)
range
- the new value for the range as described abovepublic void adjustRange(double adjustment)
adjustment
- the value to increment the range by. This value
can be either positive or negative.public void setName(java.lang.String name)
name
- the new name for the bin.public java.lang.String getName()
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.
Warning: this method cannot read in the scoring values
because of the way that they are stored, specifically by lane.
However, the lanes are not available to this method, so the information
cannot be stored. A class calling this method should make provisions
to take care of the rest of the data stream. The method
setScore
can be used to set the value, it takes a
lane value pair and records it. The stream will be left at the
start of the values. The first thing will be an integer giving the
number of entries stored in the stream. It will be followed by
pairs of laneIndexies and values. The laneIndexies are integers and
the values are UTF-encoded Strings.
in
- the input stream with the data for the class.java.io.IOException
- occurs when a problem is encountered when
writing to the stream.setScore(AFLPcore.Lane, java.lang.String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |