Class CGHs
The class CGHs describes a result of a CGH analysis of a case. It may contain amplified, enhanced, or diminished elements.Overview
CGHs |
New() |
New(CGHDescription: String) |
New(CGHDescription: String, CaseID: String, CaseDescription: String) |
CaseID(): String |
CaseDescription(): String |
item(index: Integer): CGH {default; read-only} |
add(ByRef NewCGH: CGH): Void |
getCKAS(): CKAS |
GetEnumerator(): IEnumerator {Implements IEnumerable.GetEnumerator} |
getErrorDescription(): String |
getGainsLossesStructs(Resolution: ChromosomeData.eResolutionLevel): GainsLossesStructs |
getQuantitativeAberrations(): QuantitativeAberrations |
isValid(): Boolean |
toArrayOfString(): String() |
toString(): String |
toString(format: String): 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()
Instantiates a new CGHs object.Remarks
- Single CGH elements can be added using the add function.
- The CaseID and CaseDescription property can be set later.
Public Sub New(CGHDescription As String)
Instantiates a new CHGs object. The CGH elements are determined from their textual description.Parameters
- CGHDescription: a textual description of the CGH results of a case.
Exceptions
- ArgumentNullException: if the textual description of the CGH aberrations is empty.
- No exceptions are thrown if the textual description is invalid. Instead, the ErrorDescription property is filled with a meaningful description of the problem and the Valid property is set to false.
Remarks
- The CGH nomenclature is not well defined. The function expects the text to start with a "rev ish". There after, each zero or one (but not more) "enh", "amp", or "dim" section may follow. Elements may separated by comma (",") or by semicolon (";"). Symbols are not case-sensitive. Extra blanks are ignored.
Examples
- myCGHs = New CGHs("Rev ish enh(1q; 2p23pter; 3q26.1pter; 6p; 7q21qter), dim(5q32qter; 16q)")
Public Sub New(CGHDescription As String, ByVal CaseID As String, ByVal CaseDescription As String)
Instantiates a new CHGs object. The CGH elements are determined from their textual description.Parameters
- CGHDescription: a textual description of the CGH results of a case.
- CaseID: an (external) identifier of the case.
- CaseDescription: a description of the case.
Exceptions
- ArgumentNullException: if the textual description of the CGH aberrations is empty.
- No exceptions are thrown if the textual description is invalid. Instead, the ErrorDescription property is filled with a meaningful description of the problem and the Valid property is set to false.
Remarks
- The CGH nomenclature is not well defined. The function expects the text to start with a "rev ish". There after, each zero or one (but not more) "enh", "amp", or "dim" section may follow. Elements may separated by comma (",") or by semicolon (";"). Symbols are not case-sensitive. Extra blanks are ignored.
- Start and end bands of framgents are sorted from p terminus to q terminus, regardless of the original order.
Examples
- myCGHs = New CGHs("Rev ish enh(1q; 2p23pter; 3q26.1pter; 6p; 7q21qter), dim(5q32qter; 16q)","Case007","a test case")
Interfaces
This class does not implement an interface.Enumerations
The class does not provide enumerations.Properties
Property CaseID() As String
Gets or sets the CaseID for this CGH case.Property Value
- the CaseID.
Remarks
- The CaseID property is provided for identifying a case. It is not needed by other functionality of the ISCNAnalyser.
Property CaseDescription() As String
Gets or sets the description of the case.Property Value
- the description of the case.
Remarks
- The CaseDescription property is provided for adding additional information to a case. It is not needed by other functionality of the ISCNAnalyser.
Default Public ReadOnly Property item(ByVal index As Integer) As CGH
Gets the CGH object at the specified index.Parameters
- index: The zero-based index of the element to get.
Property Value
- The CGH object at the specified index.
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 CGH object in the CGHs object by using the following syntax: myCGHs(index).
- The property is read only. For adding a CGH aberration, use the add function which invokes some further calculation. No functionality for removing a CGH aberration is provided.
Methods
Public Sub add(ByRef NewCGH As CGH)
Adds the NewCGH aberration to this case.Parameters
- NewCGH: a reference to the CGH aberration to be added.
Exceptions
- ArgumentNullException: NewCGH must not be a null reference.
Public Function getAberrationCount() As Integer
Returns the number of single CGH elements in this case.Public Function getCKAS() As CKAS
Returns the Complex Karyotype Aberration Score (CKAS) of this case.Return Value:
- the Complex Karyotype Aberration Score
Remarks
- Each CGH element is treated as an unbalanced aberration.
Examples
- The case "Rev ish enh(1q; 2p23pter; 3q26.1pter; 6p; 7q21qter)" causes an overall CKAS of 5, with the unbalanced fraction being 5, all other fraction being 0.
Public Function GetEnumerator() As IEnumerator Implements IEnumerable.GetEnumerator
Returns an enumerator that can iterate through the collection of single CGH aberrationss of this case.Implements
Public Function getErrorDescription() As String
In case of an error, returns a description of the problem.Return Value
- a description of the problem causing an error.
- an empty string, if no error occured.
Remarks
- Typical errors are non-existing bands or illegal characters in the description.
Public Function getGainsLossesStructs(ByVal Resolution As ChromosomeData.eResolutionLevel) As GainsLossesStructs
Returns a list of all chromosomal bands with the number of gains, losses and structural aberrations which occured at each of the bands.Return Value
- a GainsLossesStructs object describing the aberrations of this case per chromosomal band.
Remarks
- The structural fraction of the GainLossStruct elements is always 0, because the start and end points of the CGH elements are not regarded as break points.
Public Function getQuantitativeAberrations() As QuantitativeAberrations
Returns the QuantitativeAberrations implied by this case.Return Value
- the QuantitativeAberrations implied by this case.
Remarks
- The function calls CGH.getQuantitativeAberration on each of the CGH elements.
- Note the translation of CGH symbols into Quantitative aberrations described there.
Examples
- The case "Rev ish enh(1q; 2p23pter; 3q26.1pter; 6p; 7q21qter)" gives raise to the QuantitativeAberrations "+(1)(q10qter),+(2)(pterp23),+(3)(pterq26.1),+(6)(pterp10)+(7)(q21qter)"
Public Function isValid() As Boolean
Indicates if the CGH data of the case are validReturn Value
- true, if the data are valid.
- false, otherwise
Remarks
- Only when the data of the case are valid, QuantitativeAberrations and GainsLossesStructs etc. can be calculated.
Public Function toArrayOfString() As String()
Returns an array with the textual description of the single CGH aberrations.Return Value
- an array with the textual description of the CGH aberrations.
Remarks
- The function calls CGH.toString on each of the CGH elements.
Examples
- The case "Rev ish enh(1q; 2p23pter; 3q26.1pter; 6p; 7q21qter)" gives raise to the array {"enh(1q)","enh(2pterp23)","enh(3pterq26.1),"enh(6p)","enh(7q21qter)"}
Public Overloads Function toString() As String
Returns a textual descirption of the CGH data of this case.Return Value
- a textual descirption of the CGH data of this case.
Remarks
- The CaseID and CaseDescription parameters are not part of the output.
- The function passes through to "toString("S")".
- Elements and bands get ordered, irregularities get removed.
Examples
- The case "Rev ish enh(1q; 2p23pter; 3q26.1pter; 6p; 7q21qter)" gives raise to the output "rev ish enh(1q,2pterp23,3pterq261,6p,7q21qter)"
Public Overloads Function toString(ByVal format As String) As String
Returns a textual descirption of the CGH data of this case.Return Value
- a textual descirption of the CGH data of this case.
Parameter
- format: a short description of the format.
- "O": the original description
- "M": data mining option. A comma separated list of the descriptions of each element, without grouping.
- "S": standard (grouped) output.
The following values are defined:
Remarks
- The CaseID and CaseDescription parameters are not part of the output.
- If no known format is given, "S" is used.
- The format is not case-sensitive.
Examples
- With format = "O", the output will not be different from the original description.
- Except for data mining (format = "M"), an invalid case will be described with its original description.
- With format = "S", the case "Rev ish enh(1q; 2p23pter; 3q26.1pter; 6p; 7q21qter)" gives raise to the output "rev ish enh(1q,2pterp23,3pterq261,6p,7q21qter)"
- With format = "M", the case "Rev ish enh(1q; 2p23pter; 3q26.1pter; 6p; 7q21qter)" gives raise to the output "enh(1q),enh(2pterp23),enh(3pterq261),enh(6p),enh(7q21qter)"
Interaction with other classes
Classes using CGHs
The CGHs class is used by the CGHCollection class which handles a set of cases..Classes used by CGHs
The CGHs class contains a set of CGH objects which described the aberrations of this case. During instantiation, a Fragment object representing the region afflicted by the aberration is calculated.QuantitativeAberrations, CKAS, and GainsLossesStructs are calculated on demand.