pairwise-logo.gif (1266 bytes)

All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class PairwiseComparativeMap.PairwiseHomologys

java.lang.Object
   |
   +----PairwiseComparativeMap.PairwiseHomologys

public class PairwiseHomologys
extends Object
This class manages the data that describes the homologys between all the loci. It works on the homology group system whereby any homologous loci are put in the same homology group regardless of what map they're on. A top level array holds a set of arrays, (representing homology groups), containing LocusNoAndMap objects that describe which map the locus is in and it's position within the loci array.

All LocusNoAndMap objects in the same lower level array in this class are considered to be in the same homology group, i.e. they have an equivalency and all get highlighted together.

Version:
1.0

Author:
Written by Jeremy Dickson for the UK Crop Plant Bioinformatics Network, October 1998.

See Also:
PCM_FileParser, PairwiseLocus, PairwiseMap, PairwiseComparativeMapData, PairwiseCanvas, LocusNoAndMap

Constructor Index

 o PairwiseHomologys()
Default constructor

Method Index

 o addLocusToHomologyGroup(int, LocusNoAndMap)
Adds a locus to a homology group.
 o createNewHomologyGroup(LocusNoAndMap, LocusNoAndMap)
Adds a new homology group to the data structure.
 o drawHomologys(Array, PairwiseMap, PairwiseMap, int, int)
This method called by the PairwiseCanvas class and creates a set of Line objects in an Array that represent the lines between the two maps in the PCM.
 o getHighlightedHomologyGroup(LocusNoAndMap)
Checks the LocusNoAndMap object passed in to the method to see if this is contained within any homology groups.
 o getHomologyGroupNumber(LocusNoAndMap)
Takes in a LocusNoAndMap object and see if it already exists in one of the homology groups that this class holds.
 o mergeHomologyGroups(int, int)
This method merges the two homology groups in the data structure at the homologyGroup_LHS and homologyGroup_RHS indexes
 o trimArrays()
Trims the array data structure so to minimize on the space it uses.

Constructors

 o PairwiseHomologys
 public PairwiseHomologys()
Default constructor

Methods

 o getHomologyGroupNumber
 public int getHomologyGroupNumber(LocusNoAndMap input_locusNoAndMap)
Takes in a LocusNoAndMap object and see if it already exists in one of the homology groups that this class holds. If it does exist, an index reference to the homology group is returned. If not, -1 is returned.

 o createNewHomologyGroup
 public void createNewHomologyGroup(LocusNoAndMap no1,
                                    LocusNoAndMap no2)
Adds a new homology group to the data structure. The new homology group is initialised with the two LocusNoAndMap objects that are fed in to the method.

 o addLocusToHomologyGroup
 public void addLocusToHomologyGroup(int homologyGroupNumber,
                                     LocusNoAndMap locus)
Adds a locus to a homology group. You have to feed it the index to the homology group that you want to add to and a LocusNoAndMap object that describes the locus.

 o mergeHomologyGroups
 public void mergeHomologyGroups(int homologyGroup_LHS,
                                 int homologyGroup_RHS)
This method merges the two homology groups in the data structure at the homologyGroup_LHS and homologyGroup_RHS indexes

 o trimArrays
 public void trimArrays()
Trims the array data structure so to minimize on the space it uses.

 o drawHomologys
 public Array drawHomologys(Array lines,
                            PairwiseMap LHS_map,
                            PairwiseMap RHS_map,
                            int LHS_start,
                            int RHS_start)
This method called by the PairwiseCanvas class and creates a set of Line objects in an Array that represent the lines between the two maps in the PCM.

Parameters:
lines - The array the Line objects are to be added to.
LHS_map - The PairwiseMap object on the LHS.
RHS_map - The PairwiseMap object on the RHS.
LHS_start - The x axis start position where the lines are to be drawn from.
RHS_start - The x axis start position where the lines are to be drawn to
 o getHighlightedHomologyGroup
 public Array getHighlightedHomologyGroup(LocusNoAndMap locus)
Checks the LocusNoAndMap object passed in to the method to see if this is contained within any homology groups.


All Packages  Class Hierarchy  This Package  Previous  Next  Index