Class Fragment

The class Fragment describes a part of a (derivative) chromosome. It describes the start and end points of that part and provides functions for determining the relative position of the fragment on the chromosome.

Example: The derivative Philadelphia chromosome der(22)(22pter->22q112::9q34->9qter) consists of two fragments, "22pter->22q112" and "9q34->9qter", respectively.

Overview

Fragment
New()
New(Fragment: String)
New(Fragment: String, Format: String)
New(ByRef Band1: Band, ByRef Band2: Band)
New(ByRef StartBand: Band, FragmentWillContainCentromere As Boolean = False)
New(ByVal ContainsCentromere As Boolean)
EndBand: Band
StartBand: Band
clone(): Object {Implements ICloneable.Clone}
compareTo(obj: Object): Integer {Implements IComparable.CompareTo}
containsFragment(ByRef compareFragment: Fragment): Boolean
endsOnCentromere(): Boolean
extendsOverBand(ByRef CompareBand: Band): Boolean
extendsOverCentromer(): Boolean
getBandClosestToPTer(): Band
getBandClosestToQTer(): Band
getChromosome: String
getChromosomeWithoutUncertainty: String
getCentromere(): Band
getContainedBands(Resolution: eResolutionLevel): Bands
getFirstBand(): Band
getOrientation: eOrientation
getSecondBand(): Band
inverted(): Fragment
isFullChromosome(): Booelan
isPTerminalTo(ByRef CompareBand: Band): Boolean
isPTerminalTo(ByRef CompareFragment: Fragment): Boolean
toString(): String
toString(format: String): String
translateOrientationToString(OrientationValue: eOrientation): String {static}
translateStringToOrientation(OrientationString: String): eOrientation {static}

Programming Language

  • Microsoft Visual Basic .Net.

Availability

Constructors

Public Sub New()

Initializes an instance of the Fragment class.

Parameters

  • None.

Remarks

  • This constructor was created for COM compatibility reasons only. Its use is not recommended.

Public Sub New(ByVal Fragment As String)

Initializes an instance of the Fragment class.

Parameters

  • Fragment: a textual description of a chromosomal fragment in the Startband->Endband style of ISCN.

Exceptions

  • ArgumentException: If the textual description of the fragment does not meet the patterns (regular expressions) used to recognize the constituents of the fragment, an ArgumentException containing a description of the problem is thrown.

Remarks

  • Generally, a fragment is expected to have both a start and an end point. But sometimes fragments are so short that both start and end point reside on the same chromosomal band. Hence, such short fragments may be described with a single band only.
  • The chromosome number must be given with the first band, at the second band it is optional.
  • Also the term "hsr" is accepted.

Examples

  • myNormalFragment = New Fragment("22pter->22q112")
  • myShortFragment = New Fragment("13q21")

Public Sub New(ByVal Fragment As String, ByVal Format As String)

Initializes an instance of the Fragment class.

Parameters

  • Fragment: a textual description of a chromosomal fragment in the CGH style of fragment descriptions.
  • Format: a string indicating the style the fragment is described with. Upto now, only "C" indicating CGH style is accepted.

Exceptions

  • ArgumentException: If the textual description of the fragment does not meet the patterns (regular expressions) used to recognize the constituents of the fragment, an ArgumentException containing a description of the problem is thrown.

Remarks

Examples

  • myFragment = New Fragment("22q11qter","C")

Public Sub New(ByRef Band1 As Band, ByRef Band2 As Band)

Initializes an instance of the Fragment class. The fragment extends from Band1 to Band2.

Parameters

  • Band1: the start of the fragment
  • Band2: the end of the fragment

Examples

  • myBand1 = New Band("22q11")

  • myBand2 = New Band("22qter")
    myFragment = New Fragment(Band1, Band2)

Public Sub New(ByRef StartBand As Band, Optional ByVal FragmentWillContainCentromere As Boolean = False)

Initializes an instance of the Fragment class. The fragment starts at StartBand and extends to a terminus of the chromosome via or not via the centromere.

Parameters

  • StartBand: the start of the fragment.
  • FragmentWillContainCentromere: determines if the fragment extends from the StartBand directly to the terminus (default) or via the centromer to the terminus of the opposite arm.

Remarks

  • This function is a convenient short cut for constructing terminal fragments.

Examples

  • To construct a fragment from 22q11 to 22qter, do:

  • myBand = New Band("22q11")
    myFragment = New Fragment(Band, false)

Public Sub New(ByVal ContainsCentromere As Boolean)

Initializes an instance of the Fragment class. The fragment starts is of unknown origin but may or may not contain a centromere.

Parameters

  • ContainsCentromere: indicates whether the fragment of unknown origin has a centromer or not.

Remarks

  • This function useful when constructing derivative chromosomes whose centromers are of unknown origin.

Interfaces

IComparable

is implemented with the compareTo function.

ICloneable

is implemented with the clone function.

Enumerations

The class provides an enumerations for the orientation of a fragment.

Enum eOrientation

This enumeration describes the orientation of a fragment. If the fragment is oriented from p-terminus to q-terminus, it is along the plus-strand. This nomenclature basically coincides with the nomenclature used by the human genome project.
Value Meaning
PlusStrand = 1 from p-ter to q-ter.
Unknown = 0 the orientation cannot be determined.
MinusStrand = -1 from q-ter to p-ter.

Properties

Public Property EndBand() As Band

Gets or sets the band the fragment ends with.

Property Value

  • the band the fragment ends with.

Parameters

  • None.

Exceptions

Remarks

  • Make sure that StartBand has been set directly or indirectly before setting the EndBand. It is not possible to change both StartBand and EndBand to a different chromosome.
  • Actually, the write-access to this property is required only when a fragment object was instantiated with the parameterless constructor for old COM projects.

Public Property StartBand() As Band

Gets or sets the band the fragment starts with.

Property Value

  • the band the fragment starts with.

Parameters

  • None.

Exceptions

  • Exception, if StartBand is set to a band residing on a chromosome different than the chromosome of EndBand.

Remarks

  • It is not possible to change both StartBand and EndBand to a different chromosome.
  • Actually, the write-access to this property is required only when a fragment object was instantiated with the parameterless constructor for old COM projects.

Methods

Public Function clone() As Object Implements ICloneable.Clone

Creates a deep copy of the Fragment object.

Return Value

  • A deep copy of the Fragment object.

Implements

Remarks

  • Cloning is performed by first cloning the constituent Band objects of the Fragment object (calling Band.clone()) and then instantiating a new Fragment object with the cloned Band objects.

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

Compares this instance to a specified Fragment object and returns an indication of their relative values.

Return Value

  • <-1: This fragment resides on a chromosome with lower number.
  • -1: Both fragments are on the same chromosome, but this one is closer to the p-terminus.
  • 0: The fragments are equal.
  • +1: Both fragments are on the same chromosome, but this one is closer to the q-terminus.
  • >+1: This fragment resides on a chromosome with higher number.

Parameters

  • obj: the Fragment to be compared with this fragment.

Exceptions

Implements

Remarks

  • The bands closest to the p-terminus of each fragment are determined first and compared to each other using the compareTo(SecondBand, MayContainUncertainties) function of the Band class. If they are equal, the bands closest to the q-terminus are compared in the same style.

Public Function containsFragment(ByRef CompareFragment As Fragment) As Boolean

Determines whether CompareBand is conatined in this fragment.

Return Value

  • true, if CompareFragment is part of this fragment.
  • false, otherwise.

Parameters

  • CompareFragment: the fragment to be checked wether it is contained in this fragment.

Remarks

  • This function checks if this fragment extends over both the p-terminal and the q-terminal band of compareFragment using the extendsOverBand() function.

Public Function endsOnCentromere() As Boolean

Determines whether one terminal band of this fragment is a centromere.

Return Value

  • true, if this fragment has a centromere at one of its termini.
  • false, otherwise.

Parameters

  • None.

Remarks

Public Function extendsOverBand(ByRef CompareBand As Band) As Boolean

Determines whether CompareBand resides on this fragment.

Return Value

  • true, if CompareBand corresponds to a terminus of this fragment or lies somewhere between the termini of this fragment.
  • false, otherwise.

Parameters

  • CompareBand: a reference to the band whose position relative to this fragment is to be determined.

Remarks

  • Also returns true when both chromosomes are unknown (="?").
  • Uncertainties are ignored.

Examples

  • the fragment "22pter->22q12" contains band "22p12".
  • the fragment "22pter->22q12" contains band "22?p13".
  • the fragment "22pter->22q12" does not contain band "9q34".

Public Function extendsOverCentromer() As Boolean

Determines whether this fragment contains a centromer.

Return Value

  • true, if a terminus of this fragment is a centromere or if a centromere lies somewhere between the termini of this fragment.
  • false, otherwise.

Remarks

  • Also returns true when at least one arm of the fragment is unknown (="?").
  • Uncertainties are ignored.

Examples

  • the fragment "22pter->22q12" extends over a centromere.
  • the fragment "22pter->22p10" extends over a centromere.
  • the fragment "22pter->22p12" does not extend over a centromere.

Public Function getBandClosestToPTer() As Band

Returns the terminal band of this fragment which is closest to the p-terminus.

Return Value

  • The terminal band of this fragment which is closest to the p-terminus.

Examples

  • With fragment "Xp21->Xq22" as well as with fragment "Xqter->Xp21", getBandClosestToPTer returns band "Xp21"

Public Function getBandClosestToQTer() As Band

Returns the terminal band of this fragment which is closest to the q-terminus.

Return Value

  • The terminal band of this fragment which is closest to the q-terminus.

Examples

  • With fragment "Xp21->Xq22" as well as with fragment "Xq22->Xpter", getBandClosestToQTer returns band "Xq22"

Public Function getChromosome() As String

Gets the number of the chromosome the fragment resides on.

Return Value

  • The number of the chromosome the fragment resides on.

Remarks

Public Function getChromosomeWithoutUncertainty() As String

Gets the number of the chromosome the fragment resides on. Uncertainties are removed from the number

Return Value

  • The number of the chromosome without uncertainties the fragment resides on.

Remarks

  • Does not contain question marks. If uncertainties do matter, use getChromosome instead.

Public Function getCentromere() As Band

Gets a Band corresponding to the centromere residing on this fragment.

Return Value

  • a Band corresponding to the centromere residing on this fragment.
  • Nothing, if the fragment does not contain a centromere.

Remarks

  • If a terminus of the fragment is a centromere, that band is returned.
  • If the centromere is inside the fragment, a new band object is instantiated with the chromosome number of the fragment and "cen" as band denomination.

Public Function getContainedBands(ByVal Resolution As Band.eResolutionLevel) As Bands

Produces a list of all chromosomal bands which reside on the fragment at the given resolution. Bands are ordered from the start band of the fragment to the end band.

Return Value

  • a Bands object containing a list of all chromosomal bands which reside on the fragment at the specified resolution.

Parameters

Exceptions

  • Errors are raised when the resource file defining the chromosomal bands does not provide the information required.

Public Function getFirstBand() As Band

Gets the first Band of the fragment.

Return Value

  • the first Band of the fragment.

Parameters

  • None.

Remarks

Public Function getOrientation() As eOrientation

Gets a value indicating the orientation of the fragment.

Property Value

  • PlusStrand: the orientation is from p-terminus to q-terminus
  • MinusStrand: the orientation is from q-terminus to p-terminus
  • Unknown: the orientation could not be determined

Parameters

  • None.

Remarks

  • The values for the Orientation are defined in the eOrientation enumeration.
  • If fragments are very short, i.e. described by one band only, the orientation cannot be determined

Examples

  • the orientation of fragment "22pter->22q112" is "PlusStrand"
  • the orientation of fragment "22q11->22q11" is "Unknown"

Public Function getSecondBand() As Band

Gets the second band of the fragment.

Return Value

  • the second Band of the fragment.

Parameters

  • None.

Remarks

Public Function inverted() As Fragment

Returns a Fragment with the same end points, but in the inverted orientation.

Return Value

  • A fragment with inverted orientation

Remarks

  • A new fragment is initialized with the constituent bands of this fragment, simply with inverted order of the bands. The bands are not cloned.

Public Function isFullChromosome() As Boolean

Determines whether the fragment describes a full (non-aberrant) chromosome.

Return Value

  • true, if both ends of the fragment are marked as termini ("ter"), or if both ends are of unknown origin.
  • false, otherwise.

Parameters

  • None.

Remarks

  • The function checks if both constituent band are marked termini ("ter") or if both bands are of unknown origin.

Examples

  • Fragment "Xqter->Xpter" is a full chromosome as well as "9?->9?", but not "Xq26->Xqter", or "Xpter->Xq23", or "Xq13->Xq14".

Public Function isPTerminalTo(ByRef CompareBand As Band) As Boolean

Determines whether the p-terminal end of the fragment resides closer to the p-terminus of the chromosome than does CompareBand.

Return Value

  • true, if the p-terminal end of the fragment resides closer to the p-terminus of the chromosome than does CompareBand.
  • false, otherwise

Parameters

  • CompareBand: a reference to the band whose position on the chromosome relative to the fragment is to be determined.

Remarks

  • The function delegates ist work to the isCloserToPTerThan(CompareBand) of the band class. Hence, it also returns true if CompareBand equals the p-terminal end of the fragment.
  • If CompareBand lies inside the fragment (not on the p-terminal end of the fragment), the function returns true because it is sufficient that some part of the fragment is closer to the p-terminus of the chromosome.

Examples

  • Fragment "Xq13->Xqter" isPTerminalTo Bands "Xq21" and "Xq13", but not to Bands "Xq12" and "Xp21".

Public Function isPTerminalTo(ByRef CompareFragment As Fragment) As Boolean

Determines whether the p-terminal end of this fragment resides closer to the p-terminus of the chromosome than does the p-terminal end of CompareFragment.

Return Value

  • true, if the p-terminal end of the fragment resides closer to the p-terminus of the chromosome than does the p-terminal end of CompareFragment.
  • false, otherwise

Parameters

  • CompareFragment: a reference to the fragment whose position on the chromosome relative to this fragment is to be determined.

Remarks

  • The function determines the p-terminal end of CompareFragment, delegates to isPTerminalTo(CompareBand), and thus actually delegates ist work to the isCloserToPTerThan(CompareBand) of the band class. Hence, it also returns true if both fragments share the same p-terminal end.
  • If CompareFragment starts somewhere inside this fragment (not on the p-terminal end of this fragment), the function returns true because it is sufficient that some part of this fragment is closer to the p-terminus of the chromosome.

Examples

  • Fragment "Xq13->Xq25" isPTerminalTo Fragments "Xq26->Xqter", "Xq21->Xq23", "Xq13->Xq14", but not to fragment "Xq12->Xp11".

Public Shadows Function toString() As String

Returns a textual description of the fragment in the style "StartBand->EndBand".

Return Value

  • A string describing the fragment.

Remarks

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

Returns a textual description of the fragment in the specified format.

Return Value

  • A string describing the fragment.

Parameters

  • format: the format to be used for representing the fragment. The following values are defined:
    • "C": CGH style
    • "S" and all other values: standard ISCN style.

Remarks

Public Shared Function translateOrientationToString(ByValOrientationValue As eOrientation) As String

Returns a short description indicating the orientation.

Return Value

  • "-": the orientation corresponds to the minus strand of the chromosome, i.e. from q-terminus to p-terminus
  • "+": the orientation corresponds to the plus strand of the chromosome, i.e. from p-terminus to q-terminus
  • "?": the orientation is unknown

Parameters

  • OrientationValue: the orientation expressed with the eOrientation enumeration.

Public Shared Function translateStringToOrientation(ByRef OrientationString As String) As eOrientation

Returns a value of the eOrientation enumeration corresponding to the short description.

Return Value

  • A value of the eOrientation enumeration corresponding to the short description.

Parameters

  • OrientationString: a short description of the orientation. May have only those values which are return values of translateOrientationToString.

Exceptions

  • ArgumentException: is thrown when the parameter cannot be translated into a value of the enumeration.

Interaction with other classes

Classes using Fragment

Fragment objects are integral constituents of the Chromosome class, because a derivative chromosome is described by an ordered list of fragments. Also the QuantitativeAberration object contains a Fragment object which is marked gained or lost.

Fragment objects are also used by the Aberration class when determining gains and losses infered by an aberration.

Classes used by Fragment

Two Band objects are constituent parts of the Fragment class.

A Bands object is used as a return value for a list of all bands contained in the fragment.