CCAnnotation.pm - A class from which all annotations used with coloredChromosomes.pl are to be derived
Subclass by: @ISA = qw(CCAnnotation); use CCAnnotation;
This class is an abstract superclass from which all classes implementing annotations for coloredChromosomes.pl are derived. Each subclass has to implement the method draw which is to draw a single chromosome. Each instance of CCAnnotation (or a subclass) can assume that an instance variable called 'ps' is initialized. This is a Postscript object which supports many postscript operators (see Postscript). When draw is called the instance may safely assume the shape of the current chromosome to be the chromosomal shape, which is clipped to if the annotation is internal.
The following methods can be used to determine positions along the chromosome:
positionFromSpec($spec)
- return the a relative positions (0 to 1) of the position $spec along the chromosome
absolutePositionFromSpec - return the vertical position in points of the specified position
absoluteSizeOfBand($bandName)
- return the size of a band from the current chromosome in points
midBandPosition($bandName)
- return the vertical middle position of the band from the current chromosome named $bandName in points.
The format of specifications for chromosomal locations is detailed in the man page of coloredChromosomes.pl. The implemented annotation classes can be referred on as examples on how to explore the use of these methods.
coloredChromosomes.pl(1) Postscript(3)