Class Markers
The class Markers describes a collection of marker chromosomes.Overview
Markers |
New() |
CountMax: Integer |
CountMin: Integer |
item: Marker {default; read-only} |
add(ByRef AdditionalMarker: Marker): void |
clone(): Object {Implements ICloneable.Clone} |
count(): Integer |
GetEnumerator(): IEnumerator {Implements IEnumerable.GetEnumerator} |
indexOf(ByRef MarkerToFind: Marker): Integer |
removeAt(Index: Integer): void |
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 Markers object.Interfaces
ICloneable
is implemented with the clone function.IEnumerable
is implemented with the GetEnumerator function.Enumerations
The class does not provides enumerations.Properties
All properties are read-only.Public ReadOnly Property CountMax() As Integer
Gets a value indicating the sum of maximum copy numbers of the marker chromosomes in this collection.Property Value
- a value indicating the sum of maximum copy numbers of the marker chromosomes in this collection.
Remarks
- CountMax and CountMin are increased whenever a Marker object is added to the collection.
Public ReadOnly Property CountMin() As Integer
Gets a value indicating the sum of minimum copy numbers of the marker chromosomes in this collection.Property Value
- a value indicating the sum of minimum copy numbers of the marker chromosomes in this collection.
Remarks
- CountMax and CountMin are increased whenever a Marker object is added to the collection.
Default Public ReadOnly Property item(ByVal Index As Integer) As Marker
Returns the marker chromosomes at the specified position of the collection.Property Value
- the marker chromosome at the specified position of the collection.
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 Marker object in the Markers object by using the following syntax: myMarkers(index).
- The property is read-only.
Methods
Public Sub add(ByRef AdditionalMarker As Marker)
Adds AdditionalMarker to the collection. AdditionalMarker must not be a null reference.Return Value
- None.
Parameters
- AdditionalMarker: a reference to the Marker to be added to the collection.
Exceptions
- ArgumentNullException: the AdditionalMarker to be added must not be a null reference.
Remarks
- The values for minimum copies and maximum copies of markers in the collection is increased.
- A reference to the AdditionalMarker is added to the collection, not a clone of it.
Public Function clone() As Object Implements ICloneable.Clone
Creates a deep copy of the Markers object; i.e. while cloning, each Marker object contained in the collection is cloned.Return Value
- A deep copy of the Markers object.
Parameters
- None.
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; i.e. the Marker objects contained are also cloned using Marker.clone().
Public Function count() As Integer
Gets the number of Marker objects actually contained in the Markers object.Public Function GetEnumerator() As IEnumerator Implements IEnumerable.GetEnumerator
Returns an enumerator that can iterate through the collection of Marker objects of this Markers object. The list is sorted.Implements
Remarks
- The underlying collection is sorted first.
Public Function indexOf(ByRef MarkerToFind As Marker) As Integer
Returns the index of the specified marker object in the collection.Return Value
- the index of the specified marker object in the collection.
- -1, if the specified marker is not contained in the collection.
Parameters
- MarkerToFind: a reference to the marker object to be located in the internal colelction.
Remarks
- Though this function is similar to the indexOf() function of collection classes, it does not implement it since the parameter is passed by reference for performance reasons.
Public Sub removeAt(ByVal Index As Integer)
Removes the element at the specified index of the internal collection.Return Value
- None.
Parameters
- index: The zero-based index of the element to remove.
Exceptions
- ArgumentOutOfRangeException: index is less than zero or index is equal to or greater than count.
Remarks
- The elements that follow the removed element move up to occupy the vacated spot. The indexes of the elements that are moved are also updated.
- Internally, the function calls ArrayList.removeAt().
Public Overloads Overrides Function toString() As String
Returns a textual description of the Marker chromosomes fulfilling the specification of ISCN 1995.Return Value
- a textual description of the Marker chromosomes.
Remarks
- delegates to toString("L").
Public Overloads Overrides Function toString(format As String) As String
Returns a textual description of the Marker chromosomes fulfilling the specification of ISCN 1995. When the short format is specified, no distinction between marker chromosomes is made.Return Value
- a textual description of the Marker chromosomes.
Parameters
- format: "S" means short format. Here, no distinction between individually distinguishable marker chromosomes is made and a representation showing the added values of copy numbers is given.
"L" means long format (default). Here, markers are sorted according to their numbers and are written in a comma separated list. Marker.toString() is called for each Marker object.
Remarks
- If an unknown format is specified, the long format will be taken by default.