Class GainLossStruct

The class GainLossStruct describes how often gains, losses, and structural aberrations, resp., occured at a certain position on a chromosome.

Overview


GainLossStruct
New()
New(Band: String, Gains: Integer, Losses: Integer, Structs: Integer)
New(Band: Band, Gains: Integer, Losses: Integer, Structs: Integer)
Band: Band
BandName: String {read-only}
Chromosome: String {read-only}
Gains: Integer
Losses: Integer
Structs: Integer
compareTo(obj: Object): Integer {Implements IComparable.CompareTo}
isEmpty: Boolean
toHTML: String
toString(): String
toString(format: String): String

Programming Language

  • Microsoft Visual Basic .Net.

Availability

Constructors

Public Sub New()

Instantiates a new GainLossStruct object. The values of gains, losses and structural aberrations are initially 0, the Band etc properties not set. The properties can be set later.

Parameters

  • None.

Examples

  • myGainLossStruct = New GainLossStruct() instantiates a new GainLossStruct object.

Public Sub New(ByVal Band As String, ByVal Gains As Integer, ByVal Losses As Integer, ByVal Structs As Integer)

Instantiates a new GainLossStruct object and sets the values of gains, losses and structural aberrations to the values passed.

Parameters

  • Band: the textual description of the chromosome band which is involved in the aberration.
  • Gains: indicates how often chromosomal material of this band has been gained.
  • Losses: indicates how often chromosomal material of this band has been lost.
  • Structs: indicates how often structural aberrations have taken place at this position.

Remarks

Examples

  • myGainLossStruct = New GainLossStruct("9q34", 5, 2, 30) instantiates a new GainLossStruct object which tells that at band 9q34 structural aberrations have taken place 30 times, chromosomal material of that band has been gained 5 times and lost 2 times.

Public Sub New(ByRef Band As Band, ByVal Gains As Integer, ByVal Losses As Integer, ByVal Structs As Integer)

Instantiates a new GainLossStruct object and sets the values of gains, losses and structural aberrations to the values passed.

Parameters

  • Band: the band of the chromosome which is involved in the aberration.
  • Gains: indicates how often chromosomal material of this band has been gained.
  • Losses: indicates how often chromosomal material of this band has been lost.
  • Structs: indicates how often structural aberrations have taken place at this position.

Remarks

  • The Band parameter is passed by reference. I.e. changing its value outside this object will also affect its value inside this object. This can be avoided by passing a clone of the band. It is not changed inside the GLS object.

Examples

  • myGainLossStruct = New GainLossStruct(New Band("9q34"), 5, 2, 30) instantiates a new GainLossStruct object which tells that at band 9q34 structural aberrations have taken place 30 times, chromosomal material of that band has been gained 5 times and lost 2 times.

Interfaces

IComparable

is implemented with the compareTo function.

Enumerations

The class does not provide enumerations.

Properties

It is recommended to set the values of the properties at instantiation of the GainLossStruct object by using a parameterised constructor. But they can be set or changed later, too.

Band As Band

Gets or sets the band involved in the aberration.

Property Value

  • the band involved in the aberration.

Remarks

  • If the band was not set using a band object during instantiation or later, a band object is instantiated from the BandName. If BandName is bogus, an exception will be raised.

BandName As String {read-only}

Gets the textual description of the band involved in the aberration.

Property Value

  • the band involved in the aberration.

Remarks

Chromosome As String {read-only}

Gets the textual description of the chromosome involved in the aberration.

Property Value

  • the chromosome involved in the aberration.

Remarks

  • The property is read-only.
  • The chromosome is calculated from the band description or the band object, uncertainties are ignored.

Gains As Integer

Gets or sets the value indicating how often chromosomal material at this band has been gained.

Losses As Integer

Gets or sets the value indicating how often chromosomal material at this band has been lost.

Structs As Integer

Gets or sets the value indicating how often structural aberrations have occured at this position.

Methods

Public Function compareTo(ByVal obj As Object) As Integer Implements IComparable.CompareTo

Compares this instance to a specified GainLossStruct object and returns an indication of their relative values. Only the bands involved in the aberrations are compared, the number of gains, losses and structural aberrations is ignored.

Return Value

  • <=-1: The band of this GainLossStruct resides on a chromosome with lower number, or if they are on the same chromosome, this one is closer to the p-terminus.
  • 0: The GainLossStruct objects are equal.
  • >=1: The band of this GainLossStruct resides on a chromosome with higher number, or if they are on the same chromosome, this one is closer to the q-terminus.

Parameters

  • obj: the GainLossStruct to be compared with this GainLossStruct.

Exceptions

Implements

Remarks

  • Only the bands involved in the aberration are compared, all values for gaines, losses and structural aberrations are ignored.
  • Delegates to Band.compareTo(SecondBand, false).
  • If the Band property was not yet set, a band object is instantiated from the band description; if this description is bogus, an error will be raised.

Public Function isEmpty As Boolean

Indicates if this GainLossStruct object contains any gains or losses or structs.

Return Value

  • true, if all the values for Gains, Losses and Structural Aberrations are 0.
  • false, if at least one value for Gains, Losses and Structural Aberrations is different from 0.

Public Function toHTML() As String

Returns an HTML description of the GainLossStruct object.

Return Value

  • a textual representation of the GainLossStruct object.

Remarks

  • The band name is linked to the NCBI map viewer.
  • The object is represented by a table row.

Examples

  • myGainLossStruct = New GainLossStruct(New Band("9q34"), 5, 2, 30)

  • myGainLossStruct.toHTML() returns
    <tr><td align="left"><a href="http://www.ncbi.nlm.nih.gov/mapview/maps.cgi?TAXID=9606&CHR=9&MAPS=ideogr%5B9pter%3A9qter%5D%2CugHs%2Cmit%5B1.00%3A243415958.00%5D%2Cgenes%5B1.00%3A243415958.00%5D&BEG=9q34&END=9q34&thmb=on" target="_blank" onclick="getLink(document,this)">9q34</a></td><td align="right">5</td><td align="right">2</td><td align="right">30</td></tr>

Public Shadows Function toString() As String

Returns a textual representation of the GainLossStruct object. The band name, number of gains, losses and structural aberrations are separated by TABs.

Return Value

  • a textual representation of the GainLossStruct object.

Public Shadows Function toString(ByVal format As String) As String

Returns a textual representation of the GainLossStruct object. The band name, number of gains, losses and structural aberrations are separated by TABs.

Return Value

  • a textual representation of the GainLossStruct object.

Parameters

  • format: an indication of the format to be used. The following values are defined:
    • "E": exact representation of the band name; the band name is written strictly according to ISCN
    • any other value: the band name is written with loose adherence to th eISCN.

Interaction with other classes

Classes using GainLossStruct

The GainLossStruct class is contained in its collection class 0, 1 or many times.

A temporary use of GainLossStruct occurs in the QuantitativeAberration(s) and QualitativeAberration(s) classes when a GainsLossesStructs object is calculated there.

Classes used by GainLossStruct

A GainLossStruct object contains exactly one Band object.