Class GainsLossesStructs

The class GainsLossesStructs describes a collection of GainLossStruct objects.

Overview

GainsLossesStructs
New()
New(Resolution: eResolutionLevel)
item(index: Integer): GainLossStruct {default, read-only}
MaximumGains: Integer {read-only} 
MaximumLosses: Integer {read-only} 
MaximumStructs: Integer {read-only} 
MaximumGainsLosses: Integer {read-only} 
Resolution: eResolutionLevel
add(AdditionalGainLossStruct: GainLossStruct) 
addRange(AdditionalGainsLossesStructs: GainsLossesStructs) 
count(): Integer
GetEnumerator(): IEnumerator {Implements IEnumerable.GetEnumerator}
getGainsAndLossesForChromosome(ChromosomeNumber: String): GainsLossesStructs
sort()
toArrayOfString(format: String): String
toHTML(): String
toString(): String
toString(format: String): String

Programming Language

  • Microsoft Visual Basic .Net.

Availability

Constructors

Public Sub New()

Instantiates a new GainsLossesStructs object. Its internal collection is empty.

Public Sub New(ByVal Resolution As Band.eResolutionLevel)

Instantiates a new GainsLossesStructs object. Its internal collection will be filled with empty GainLossStructs object representing all bands of all chromosomes at the given resolution.

Parameters

  • Resolution: the resolution level to be met by the bands in the collection.

Remarks

  • The generation of a set of bands representing all bands at the resolution may take some time. But later on, the addition of further GainLossStruct objects can be performed at considerably higher speed.

Interfaces

IEnumerable

is implemented with the GetEnumerator function.

Enumerations

The class does not provide enumerations.

Properties

All properties are read-only, since they are actually derived from the GainLossStruct items in the internal collection.

Default Public ReadOnly Property item(ByVal index As Integer) As GainLossStruct

Gets the GainLossStruct object at the specified index.

Property Value

  • the GainLossStruct object at the specified index.

Parameters

  • index: The zero-based index of the element to get.

Exceptions

Remarks

  • This property provides the ability to access a specific GainLossStruct object in the GainsLossesStructs object by using the following syntax: myGainsLossesStructs(index).
  • The property is read-only.

MaximumGains

Gets the maximum number of gains among all the GainLossStruct objects of the collection. Read-Only.

MaximumLosses

Gets the maximum number of losses among all the GainLossStruct objects of the collection. Read-Only.

MaximumStructs

Gets the maximum number of structural aberrations among all the GainLossStruct objects of the collection. Read-Only.

MaximumGainsLosses

Gets the maximum number of gains or losses (whichever is greater) among all the GainLossStruct objects of the collection. Read-Only.

Resolution

Gets or sets the resolution level to be met by the description of  the bands of the individual objects. Read and Write access.

Methods

Public Sub add(ByRef AdditionalGainLossStruct As GainLossStruct)

Adds AdditionalGainLossStruct to the collection. AdditionalGainLossStruct must not be a null reference.

Parameters

  • AdditionalGainLossStruct: a reference to the GainLossStruct to be added to the collection

Exceptions

Remarks

  • If a GainLossStruct for the same band is already present, the numbers of gains, losses and structural aberrations of the previously added GainLossStruct will be increased by the respective amounts of AdditionalGainLossStruct, and the latter one will not be added to the collection.

Public Sub addRange(ByRef AdditionalGainsLossesStructs As GainsLossesStructs)

Adds the GainLossStruct objects contained in AdditionalGainsLossesStructs to the collection.

Parameters

  • AdditionalGainsLossesStructs: a reference to the collection whose GainLossStruct objects are to be added to the collection.

Remarks

  • Uses the add function for every GainLossStruct object of AdditionalGainsLossesStructs.

Public Function count() As Integer

Gets the number of GainLossStruct objects actually contained in the GainsLossesStructs object.

Public Function GetEnumerator() As IEnumerator Implements IEnumerable.GetEnumerator

Returns an enumerator that can iterate through the collection of GainLossStruct objects.

Implements

Public Function getGainsAndLossesForChromosome(ByVal ChromosomeNumber As String) As GainsLossesStructs

Selects from the present collection all those GainLossStruct objects which refer to the given Chromosome.

Return Value

  • a collection of all those GainLossStruct objects which refer to the given Chromosome.

Parameters

  • ChromosomeNumber: denotes the chromosome for which GainLossStruct objects are to be selected.

Remarks

  • The function loops through the collection and checks for every GainLossStruct object whether it refers to the given Chromosome.

Public Sub sort()

Sorts the underlying collection of GainLossStruct objects.

Public Function toArrayOfString(ByVal format As String) As String()

Returns an array with string representations for each GainLossStruct object in the internal collection.

Return Value

  • an array with textual representations of the GainLossStruct objects in the collection.

Parameter

  • format: an indication of the format to be used. Only the value "M" (= data mining format) is defined yet.

Remarks

  • The items are extremely abbreviated, since only the presence of a gain / loss / structural aberration is indicated. A gain is represented by "G", a loss by "L", and a structural aberration by "S", followed by the band name (without uncertainties) in brackets.

Public Function toHTML() As String

Returns an HTML table representing the GainsLossesStructs object and all its GainLossStruct objects.

Return Value

  • a textual representation of the GainsLossesStructs object.

Remarks

  • The table contains a header describing the columns.
  • For each GainLossStruct object in the collection, GainLossStruct.toHTML() is invoked which returns an HTML table row for the respective object.

Public Shadows Function toString() As String

Returns a textual representation of the GainsLossesStructs object. The textual representations of its GainLossStruct objects are given one per line.

Return Value

  • a textual representation of the GainsLossesStructs object.

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

Returns a textual representation of the GainsLossesStructs object with the given format. The textual representations of its GainLossStruct objects are given one per line.

Return Value

  • a textual representation of the GainsLossesStructs object.

Parameter

  • format: the format to be used. The following values are defined:
    • "M": data mining format. The items are extremely abbreviated, since only the presence of a gain / loss / structural aberration is indicated. A gain is represented by "G", a loss by "L", and a structural aberration by "S", followed by the band name (without uncertainties) in brackets.
    • "E": exact representation of the band name. Gains, losses, and structural aberrations follow separated by tabulators for each GainLossStruct. GainLossStruct.toString("E") is invoked.
    • any other value: sloppy representation of the band name. Gains, losses, and structural aberrations follow separated by tabulators for each GainLossStruct. GainLossStruct.toString() is invoked.

Interaction with other classes

Classes using GainsLossesStructs

No class of thy CyDAS library contains a GainsLossesStructs object as an integral part.

GainsLossesStructs object are transiently invoked by the QuantitativeAberration(s) and QualitativeAberration(s) classes. Some functions of the CyDASGraphics class require a GainsLossesStructs object as a parameter.

Classes used by GainsLossesStructs

A GainsLossesStructs object contains zero, one or many GainLossStruct objects. Band objects are temporarily used when searching for GainLossStruct objects in the collection.