Class KaryogramThe class Karyogram extends the functionality of the class Karyotype which represents a monoclonal karyotype by providing methods for the description of all chromosomes of the karyotype and further interfacing to a graphical representation of those chromosomes. Hereby, further checks on the total number of chromosomes and the sex chromosomes were integrated.
- Interaction with other classes
- Internal data processing
|New(ByRef Karyotype: Karyotype)|
|addAberration(AberrationType: QualitativeAberration.eAberrationType, ByRef cChromosomes: Chromosomes, ByRef cBands: Bands): Void|
|getKaryogramAsMap(Resolution: ChromosomeData.eResolutionLevel, Scale: Single, DrawSequence: String, Colored: Boolean, ByRef BackGroundColor: System.Drawing.Color, AlteredChromosomesOnly: Boolean): ImageMapData|
- Microsoft Visual Basic .Net.
- Copyrighted but free software under the GNU Public License.
- Binaries and source code can be obtained from the Download section.
- This empty constructor is made available for use with old-style VBA programming (e.g. with MS Access) where no parameters can be passed to a constructor. Here, the call of the constructor is to be followed by a call to the Karyotype property.
- Whenever possible, the use of this constructor is strongly discouraged.
- Karyotype: a reference to the karyotype object whose chromosomes are to be analysed.
- This constructor is intended as the "normal" constructor for the Karyogram class.
- A reference of the karyotype object is passed to the constructor. Consequently, all optimisations to the karyotype will be available also outside this class.
- To initialise a Karyogram object with a male karyotype containing the Philadelphia translocation and an additional aberrant chromosome 22, do e.g.:
Dim myKaryogram As Karyogram
myKaryogram = New Karyogram(New Karyotype("47,Y,t(9;22)(q341;q112),+der(22)t(9;22)"))
- the karyotype associated with the Karyogram.
- Note that there is no possiblility to use a reference when setting a karyotype. Visual Basic enforces a passing of the parameter "by value". It is recommended to set the karyotype at initialisation.
Public Sub addAberration(ByVal AberrationType As QualitativeAberration.eAberrationType, ByRef cChromosomes As Chromosomes, ByRef cBands As Bands)Introduces an (additional) aberration into the karyotype of the karyogram object.
- AberrationType: the type of the aberration to be introduced. The types are defined in the QualitativeAberration.eAberrationType enumeration.
- cChromosomes: a reference to a Chromosomes object containing the (derivative or normal) chromosome(s) involved in the aberration.
- cBands: a reference to a Bands object containing the breakpoint(s) involved in the aberration.
- The number of chromosomes and break points to be contained in the respective collections depends on the aberration type.
- The Karyotype of the karyogram object is altered. The changes are also available in the original karyotype which was passed into this karyogram object.
Public Function getKaryogramAsMap(ByVal Resolution As ChromosomeData.eResolutionLevel, ByVal Scale As Single, ByVal DrawSequence As String, ByVal Colored As Boolean, ByRef BackGroundColor As System.Drawing.Color, ByVal AlteredChromosomesOnly As Boolean) As ImageMapDataCreates the data for an image map showing all the normal and altered chromosomes of the karyotype, linked with an external resource.
- an ImageMapData object for all chromosomes of the karyotype.
- Resolution: the banding resolution to be used for the chromosome ideograms. Values are defined in the ChromosomeData.eResolutionLevel enumeration.
- DrawSequence: a comma separated list of the numbers of the chromosomes to be shown; "BR" indicates a line break, "?" indicates chromosomes of unknown centromeric origin.
- Colored: indicates if ideograms are to be drawn in color (true) or black and white only (false).
- BackGroundColor: the color to be used as a back ground for the ideograms.
- AlteredChromosomesOnly: indicates if all chromosomes of the karyotype are to be drawn (false) or the chromosmes which were altered only (true).
- The colors for the ideograms are taken from the ChromosomeData class. More information is available there.
- Also the external resource (map viewer) is a generally available property of the ChromosomeData class; see also ChromosomeData.MapViewer.
- The function has the Chromosomes calculated by a call to calculateAlteredChromosomes() or to calculateChromosomes() and then retrieves the image map data from the drawKaryogram() function of the CyDASGraphics class.
- The karyotype is suppossed to be an exact, monoclonal karyotype. Composite karyotypes may have rearrangements which may seem contradicting, as well as features which do not allow for an exact determination of chromosome count and sex chromosomes.
- The Karyotype is changed by this procedure.
- The correct karyotype can then be retrieved by a call to Karyotype.toString("E").
- The chromosome count is based on the number of chromosomes found in the internal Chromosomes collection and the PloidyLevel requested from the karyotype object.
- The internal Chromosomes collection is searched for X and Y chromosomes. If such a chromosome is not linked to a CausingAberration, it is counted as normal.
Classes using KaryogramThe Karyogram class is a top level class in the ISCNAnalyser. It is not used by other classes.
Classes used by KaryogramA Karyogram object constitutionally contains one Karyotype object and one Chromosomes object for all the chromosomes of that karyotype. Karyotype.getAlteredChromosomes) and provides them with identifiers which are needed for drawing. The karyotype in turn retrieves the chromosomes from its aberrations (Aberration.getAlteredChromosomes).
First, a set of normal chromosomes for the given ploidy and sex is created. All chromosomes are identified with a short string containing the chromosome number, an underline ("_") sign, and an index pertaining to the chromosome in the group chromosomes with the same chromosome number.
Next, all altered chromosomes are retrieved from the karyotype (Karyotype.getAlteredChromosomes) which in turn retrieves the chromosomes from its aberrations (Aberration.getAlteredChromosomes). Each chromosome is checked for its ReplacingStatus.
If a chromosome is simply to be added, it receives an identifier as above and is put into the collection.
If a whole chromosome is to be removed, chromosomes of the respective chromosome number are checked for the existence of a CausingAberration; if a chromosome with no such aberration was found, it is removed from the collection. Otherwise an exception is raised.
The situation is more complicated, when a chromosome replaces one or
more normal chromosomes.As with removing a whole normal chromosome,
chromosomes with the same chromosome number (or the same number as the
first relevant chromosome number in multi-centromeric chromosomes) are
checked for the existence of a CausingAberration;
if a chromosome with no such aberration was found, it is removed from the
collection, otherwise an exception is raised. Now, the replacing chromosome
is added to the collection of chromosomes.
If the replacing chromosome is multi-centromeric, normal chromosomes are removed for the other relevant chromosome numbers accordingly. Note that a normal chromosome cannot be replaced for a centromere of the replacing chromosome which is of unknown origin ("?").
Otherwise, the CausingAberration is checked if it gives raise to one or more derivative chromosomes (Aberration.causesOneDerivative). If there is only one derivative chromosome caused, five cases must be differentiated; in all cases a new aberration object is instantiated which replaces the CausingAberration (function replaceAberration()):
- The CausingAberration is a complcated derivative chromosome which is described in thedetailed ISCN format only. Here, the aberration is introduced into the derivative chromsome, and the resulting aberration is simply the ISCN long description of the resulting chromosome.
- If the CausingAberration is a derivation ("der()..."), the description of the new aberration is added into the description of the derivation.
- If the CausingAberration is an isoderivation ("der()..."), its description is changed to an aberration giving raise to the same product, and then the description of the new aberration is added into that description.
- If the CausingAberration is a whole chromosome gain, the new aberration is a gain of the aberration to be introduced.
- In all other cases, a derivative chromosome is set up with the CausingAberration and the aberration to be introduced.
Multiplicators of the CausingAberration are ignored during that step; they will be considered in the replaceAberration() function (see below). If complex derivative chromosomes were encountered, they are simplified by the correctDerivativeAberration() function of the aberration class.
If the mulitplicator of the previous aberration (i.e. the "CausingAberration" above) is greater than one, that aberration is located in the Aberrations collection of the Karyotype (Aberrations.indexOf() function); its multiplicator is reduced by 1. Otherwise, the aberration is fully removed from that collection.
Next, every chromosome caused by the original aberration is written as a derivative chromosome and added to the karyotype, except the chromosome to be affected by the additional aberration.
Finally, the new aberration is added into the karyotype.
Note that the Chromosome class has no functions for the introduction of three or more way translocations - they are all introduced with the function for two way translocations and thus internally handled (especially for the ISCNShort property) as two translocations. Also, the donor chromosome for an insertion internally "sees" a deletion. Hence, the resulting descriptions may not fully represent the events which lead to the karyotype, but they do really describe a karyotype of the chromosome composition shown.