Class QuantitativeAberrations
The class QuantitativeAberrations describes a collection of quantitative aberration objects.Overview
QuantitativeAberrations |
New() |
New(QuantitativeAberrationsList: String, Optional Format: String = "S", Optional Resolution: eResolutionLevel = Band.eResolutionLevel.ResolutionNone) |
item(index: Integer): QuantitativeAberration |
Resolution: eResolutionLevel |
add(ByRef NewQuantitativeAberration: QuantitativeAberration) |
addRange(ByRef NewQuantitativeAberrations: QuantitativeAberrations) |
balance(): QuantitativeAberrations |
clone(): Object {Implements ICloneable.Clone} |
contains(ByRef AberrationToCheck: QuantitativeAberration, Optional IgnoreMultiplicators: Boolean = True, Optional IgnoreQuestionMarks: Boolean = False): Boolean |
count(): Integer |
expandToResolution(Resolution: eResolutionLevel, Optional IgnoreUncertainties: Boolean = True): QuantitativeAberrations |
GetEnumerator(): IEnumerator {Implements IEnumerable.GetEnumerator} |
getGainsLossesStructs(Resolution: Band.eResolutionLevel): GainsLossesStructs |
toArrayOfString(format: String): String() |
toString(): String |
toString(format: String, Optional Sorted: Boolean = True): String; |
Programming Language
- Microsoft Visual Basic .Net.
Availability
- Copyrighted but free software under the GNU Public License.
- Binaries and source code can be obtained from the Download section.
Constructors
Public Sub New()
Initializes a new QuantitativeAberrations object. Its internal collection of quantitative aberrations is empty.Public Sub New(ByVal QuantitativeAberrationsList As String, Optional ByVal Format As String = "S", Optional ByVal Resolution As Band.eResolutionLevel = Band.eResolutionLevel.ResolutionNone)
Initializes a new QuantitativeAberrations object. Its internal collection gets filled with the aberrations given in the QuantitativeAberrationsList parameter.Parameters
- QuantitativeAberrationsList: a textual description of quantitative aberrations separated by commata.
- Format: "O" indicates that the textual description is in original style SCCN, any other value indicates new style (default: new style).
- Resolution: banding resolution met by the description of the aberrations.
Exceptions
- ArgumentException: If the textual description of a quantitative aberration does not meet the patterns (regular expressions) used to recognize its constituents, an ArgumentException containing a description of the problem is thrown by the underlying QuantitativeAberration class and will be passed through.
Remarks
- If two aberrations of the same type and fragment are encountered, only one of them will be added to the collection and its multiplicators will be adjusted.
- "empty" aberration descriptions will be ignored.
Interfaces
ICloneable
is implemented with the clone function.IEnumerable
is implemented with the GetEnumerator function.Enumerations
The class does not provide enumerations.Properties
Default Public ReadOnly Property item(ByVal index As Integer) As QuantitativeAberration
Gets the QuantitativeAberration object at the specified index.Property Value
- the QuantitativeAberration object at the specified index.
Parameters
- index: The zero-based index of the element to get.
Exceptions
- ArgumentOutOfRangeException: index is less than zero or index is equal to or greater than count.
Remarks
- This property provides the ability to access a specific QuantitativeAberration object in the QuantitativeAberrations object by using the following syntax: myQuantitativeAberrations(index).
- The property is read-only.
Resolution As Band.eResolutionLevel
Gets or sets the banding resolution met by the QuantitativeAberrations object.Property Value
- the banding resolution met by the QuantitativeAberrations object.
Remarks
- only used in getGainsLossesStructs for determining if the quantitative aberrations need an expansion to the resolution demanded.
Methods
Public Sub add(ByRef NewQuantitativeAberration As QuantitativeAberration)
Adds NewQuantitativeAberration to the collection of quantitative aberrations. If an aberration already exists in the collection, the multiplicators of the previously added aberration will be increased and NewQuantitativeAberration will not be added.Parameters
- NewQuantitativeAberration: a reference to the quantitative aberration to be added to the collection.
Exceptions
- ArgumentNullException: the aberration to be added must not be a null reference.
Remarks
- A reference to the NewQuantitativeAberration is added, not a clone.
Public Sub addRange(ByRef NewQuantitativeAberrations As QuantitativeAberrations)
Adds the quantitative aberration objects stored in NewQuantitativeAberrations to the collection.Parameters
- NewQuantitativeAberrations: a reference to a list of quantitative aberration objects to be added to the collection.
Remarks
- Invocates the add function for each quantitative aberration.
Public Function balance() As QuantitativeAberrations
Returns a collection of quantitative aberration objects in which gains and losses of the fragments have been balanced against each other.Return Value
- a collection of quantitative aberration objects in which gains and losses of the fragments have been balanced against each other.
Remarks
- Balancing is performed at the level of fragment only. Fragments which are overlapping only will not be balanced.
Examples
- if the original collection contains two gains of fragment "22q11->22qter" and one loss of it, the new collection contains one gain only of that fragment.
Public Function clone() As Object Implements ICloneable.Clone
Creates a deep copy of the QuantitativeAberrations object; i.e. while cloning, each QuantitativeAberration object contained in the collection is cloned.Return Value
- A deep copy of the QuantitativeAberrations object.
Implements
Remarks
- A deep copy copies not only the elements of the internal collection, but it does also copy the objects that the references refer to. For each QuantitativeAberration object, QuantitativeAberration.clone() is called.
Public Function contains(ByRef AberrationToCheck As QuantitativeAberration, Optional ByVal IgnoreMultiplicators As Boolean = True, Optional ByVal IgnoreQuestionMarks As Boolean = False) As Boolean
Determines whether AberrationToCheck is in the internal collection of the QuantitativeAberrations object.Parameters
- AberrationToCheck: a reference to the QuantitativeAberration object to locate in the QuantitativeAberrations object. It must not be a null reference.
- IgnoreMultiplicators: the objects may be deemed equal if they differ only in their multiplicators (true by default)
- IgnoreQuestionMarks: the objects may be deemed equal if they differ only in their question marks (false by default)
Return Value
- true if AberrationToCheck is found in the QuantitativeAberrations object
- false, otherwise.
Exceptions
- ArgumentNullException: AberrationToCheck must not be a NULL reference.
Remarks
- This method performs a linear search; therefore, the average execution time is proportional to count. That is, this method is an O(n) operation, where n is count.
- This method determines equality by calling QuantitativeAberration.equals().
Public Function count() As Integer
Gets the number of QuantitativeAberration objects actually contained in the QuantitativeAberrations object.Public Function expandToResolution(ByVal Resolution As Band.eResolutionLevel, Optional ByVal IgnoreUncertainties As Boolean = True) As QuantitativeAberrations
Returns a QuantitativeAberrations object containing QuantitativeAberration objects corresponding to the aberrations of this collection at the given resolution.Return Value
- a QuantitativeAberrations object containing QuantitativeAberration objects corresponding to the aberrations of this list at the given resolution.
Parameters
- Resolution: the banding resolution to be met by the aberrations.
- IgnoreUncertainties: If set to true, all aberrations containing uncertainties will be ignored (default), otherwise the information about the uncertainty will be lost.
Remarks
- Uses QuantitativeAberration.expandToResolution which in turn uses Band.expandToResolution function.
Public Function GetEnumerator() As IEnumerator Implements IEnumerable.GetEnumerator
Returns an enumerator that can iterate through the collection of QuantitativeAberration objects of this QuantitativeAberrations object. The list is sorted.Implements
Remarks
- The underlying collection is sorted first.
Public Function getGainsLossesStructs(ByVal Resolution As Band.eResolutionLevel) As GainsLossesStructs
Returns a list of bands at the given resolution level with the number of gains, losses and structural aberrations having occured there. Because this object describes quantitative aberrations, structural aberrations are zero.Return Value
- a list of bands at the given resolution level with the number of gains, losses and structural aberrations having occured there.
Parameters
- Resolution: the banding resolution to be met by the list.
Remarks
- This structure is also used by the QualitativeAberration(s) classes. For compatibilty, it contains both gains and losses as well as structural aberrations.
Public Function toArrayOfString(ByVal format As String) As String()
Returns a sorted array with textual descriptions of the quantitative aberration objects in the specified format.Return Value
- a sorted array with textual descriptions of the quantitative aberration objects.
Parameters
- format: "O" causes the the old style SCCN to be used, whereas "S" and all other values cause the standard (new style) SCCN to be used; "M" is a short format for data mining purposes.
- The underlying collection is sorted first.
Remarks
- If an unknown format is specified, the standard format will be used.
- Sorting causes the order in the underlying collection to be changed.
Public Shadows Function toString() As String
Returns a textual description of the list of quantitative aberrations using the Simplified Computer readable Cytogenetic Notation (SCCN; new style). Quantitative aberrations are sorted and separated by commata.Return Value
- a textual description of the quantitative aberrations using SCCN.
Remarks
- delegates to 'toString("S", True)'.
- Sorting causes the order in the underlying collection to be changed.
Public Shadows Function toString(ByVal format As String, Optional ByVal Sorted As Boolean = True) As String
Returns a textual description of the list of quantitative aberrations using the Simplified Computer readable Cytogenetic Notation (SCCN). The list may be sorted.Return Value
- a textual description of the quantitative aberrations using SCCN.
Parameters
- format: "O" causes the the old style SCCN to be used, whereas "S" and all other values cause the standard (new style) SCCN to be used; "M" is a short format for data mining purposes.
- Sorted: true, if the list is to be sorted; false, otherwise.
Remarks
- If an unknown format is specified, the standard format will be used.
- Sorting causes the order in the underlying collection to be changed.
Interaction with other classes
Classes using QuantitativeAberrations
The QuantitativeAberrations class is integral part in the Karyotype, Chromosome and Aberration classes.Classes used by QuantitativeAberrations
A QuantitativeAberrations object contains zero to many objects of QuantitativeAberration type.The GainLossStruct and GainsLossesStructs classes are used in a function returning the latter type.