All Packages Class Hierarchy This Package Previous Next Index
Class CPGMap.CPGMapUtilities
java.lang.Object
|
+----CPGMap.CPGMapUtilities
- public class CPGMapUtilities
- extends Object
This is a support class for CPGMap. CPGMap uses the methods contained within this class to abstract some of it's functionality to
facilitate the understanding of the code and also to make the functionality more secure.
- Author:
- Jeremy Dickson.
- See Also:
- CPGMap, CPG_Locus, MapAndLocusNumber
-
CPGMapUtilities(boolean, int)
- Creates an instance of the class and itialises the variables passed to it as local
-
convertString(double, boolean)
- Converts a double in to the appropriate format to be displayed on the scale bar.
-
createHomologyData(Vector)
- This method takes the data describing the maps and accesses the homology group data variable of each CPG_Locus.
-
findTheMinimumAndRangeOfTheMaps(Vector, FontMetrics)
- Finds the minimum and range in loci positions for each map and stores the results in an
array of doubles.
-
getMaximumMagnification(int[], int[])
- Returns the value of the maximum size of a map in the current data set.
-
setColourCascade(int, Vector, Vector, MapAndLocusNumber)
- This method changes the 'colour' of a particular locus by resetting the colour value of
the locus.
-
whoWasClicked(Vector, int, int)
- Finds out from the mouse coordinates which particular locus, if any, was clicked.
CPGMapUtilities
public CPGMapUtilities(boolean isThereDoubleMapData,
int noOfMaps)
- Creates an instance of the class and itialises the variables passed to it as local
- Parameters:
- isThereDoubleMapData - Whether the data passed to CPGMap describes single or double maps.
- noOfMaps - The number of maps that the data describes.
findTheMinimumAndRangeOfTheMaps
public double[] findTheMinimumAndRangeOfTheMaps(Vector locusData,
FontMetrics labelMetrics)
- Finds the minimum and range in loci positions for each map and stores the results in an
array of doubles. If the data describes double maps the minimum and range of each half
of the double maps is calculated independantly.
- Parameters:
- locusData - The data describing the maps.
- Returns:
- A data structure containing the results which CPGMap can decode.
createHomologyData
public Vector createHomologyData(Vector locusData)
- This method takes the data describing the maps and accesses the homology group data variable of each CPG_Locus.
A complex data structure is then created grouping loci of identical homology groups. The returned data
structure consists of a vector of vectors desribing the 'homology relationships' between the different maps.
- Parameters:
- locusData - The data describing the maps.
- Returns:
- The data structure describing the 'homology relationships' between the maps.
getMaximumMagnification
public int getMaximumMagnification(int LHS[],
int RHS[])
- Returns the value of the maximum size of a map in the current data set.
- Returns:
- The maximum map size.
convertString
public String convertString(double num,
boolean niceNumbers)
- Converts a double in to the appropriate format to be displayed on the scale bar.
- Parameters:
- num - The double to be converted.
- niceNumbers - Whether the numbers are to be shown as the full numbers or exponents.
- Returns:
- The formatted number.
whoWasClicked
public MapAndLocusNumber whoWasClicked(Vector locusData,
int x,
int y)
- Finds out from the mouse coordinates which particular locus, if any, was clicked.
- Parameters:
- locusData - The data describing the maps.
- x - The x position of the mouse click.
- y - The y position of the mouse click.
setColourCascade
public void setColourCascade(int colour,
Vector locusData,
Vector homologyGroupData,
MapAndLocusNumber mapAndLocus)
- This method changes the 'colour' of a particular locus by resetting the colour value of
the locus. It also changes the colour of any loci that it 'owns', (on the same map),
and all other loci of it's homology group.
- Parameters:
- colour - The int value of the colour that the locus is to be changed to. See CPG_Locus.
- locusData - The data describing the maps.
- homologyGroupData - The data structure describing the 'homology relationships' of the maps.
- mapAndLocus - The number of the map and the locus in the map that was clicked.
All Packages Class Hierarchy This Package Previous Next Index