Class Karyogram

The 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.


New(ByRef Karyotype: Karyotype)
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
optimizeISCN(): Void

Programming Language

  • Microsoft Visual Basic .Net.



Public Sub New()

Instantiates a new Karyogram object.


  • 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.

Public Sub New(ByRef Karyotype As Karyotype)

Initialises a new Karyogram object.


  • 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)"))


No interfaces were implemented.


The class does not provide enumerations.


The class offers the following property:

Public Property Karyotype() As Karyotype

Gets or sets the karyotype associated with the Karyogram.

Property Value

  • 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.

Return Value

  • None.


  • 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 ImageMapData

Creates the data for an image map showing all the normal and altered chromosomes of the karyotype, linked with an external resource.

Return Value


  • 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).


Internal processing

Public Sub optimizeISCN()

Corrects the chromosome count field and the sex chromosomes field of the karyotype.

Return Value

  • None.


  • 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").

Internal processing

  • 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.

Interaction with other classes

Classes using Karyogram

The Karyogram class is a top level class in the ISCNAnalyser. It is not used by other classes.

Classes used by Karyogram

A Karyogram object constitutionally contains one Karyotype object and one Chromosomes object for all the chromosomes of that karyotype.

Temporarily, a ChromosomeCount and a SexChromosomes object are used for optimisation of the ISCN formula.

More important is the use of Chromosome objects during the insertion of additional aberrations. Here, Aberration objects are also often used.

Internal Processing

Calculation of Altered Chromosomes

The altered chromosomes only are calculated by the private function calculateAlteredChromosomes(). It queries the altered chromosomes from the 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).

Calculation of All Chromosomes

All chromosomes of a karyotype are calculated with the calculateChromosomes() function.

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 ("?").

Introducing Further Aberrations

The entrance point for the introduction of aberrations is the addAberration() function described above. For every type of aberration, it calls a specific do<AberrationType>() function which receives adequate parameters from the original parameters.

Aberrations Affecting One Chromsome Only

The chromosome affected by the aberration is checked for its CausingAberration. If it is a normal chromosome, an aberration object for the new aberation is instantiated and added to the karyotype.

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.
If the CausingAberration yields several derivative chromosomes, the situation gets much easier again. The chromosome to be affected by the additional aberration can always be described in the ISCN short notation which is available via the Chromosome.ISCNShort property. The description of the additional aberration is added to that description. The new aberration replaces the CausingAberration.

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.

Aberrations Affecting Two or More Chromsomes

Not yet implemented.

The replaceAberration() Function

This function replaces an aberration by a new one derived from the original aberation. It takes care of multiplicators and all derivations to be denoted.

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.