Package vcf
Class MarkerMap
java.lang.Object
vcf.MarkerMap
Class MarkerRecombMap represents genetic map positions and
inter-marker genetic distances for a sequence of genomic loci.
Instances of class MarkerRecombMap are immutable.
-
Method Summary
Modifier and TypeMethodDescriptionstatic MarkerMapcreate(GeneticMap genMap, double minGenDist, Markers markers) Returns a newMarkerMapinstance constructed from the specified data.static MarkerMapcreate(GeneticMap genMap, Markers markers) Returns a newMarkerMapinstance constructed from the specified data.genDist()Return aFloatArrayof sizethis.markers().nMarkers()whosek-th element is the genetic distance between thek-th target marker and the previous marker, or0.0if(k == 0).genPos()Returns aDoubleArrayof sizethis.markers().nMarkers()whosek-th element is the genetic map position of thek-th marker.static doublemeanSingleBaseGenDist(GeneticMap genMap, Markers markers) Returns the mean genetic distance between two consecutive base positions.pRecomb(float recombIntensity) Returns a map of marker index to the probability of recombination in the interval between the marker and the preceding marker.restrict(int[] indices) Return a marker map restricted to the specified markersReturn a marker map restricted to the specified markers
-
Method Details
-
create
Returns a newMarkerMapinstance constructed from the specified data.- Parameters:
genMap- the genetic mapmarkers- a list of markers- Returns:
- a returns new
MarkerMapinstance - Throws:
IllegalArgumentException- ifmarkers.marker(0).chromIndex() != markers.marker(markers.nMarkers() - 1).chromIndex()IllegalArgumentException- if the specified genetic map has no map positions for the specified chromosomeNullPointerException- ifgenMap == null || markers == null
-
create
Returns a newMarkerMapinstance constructed from the specified data.- Parameters:
genMap- the genetic mapminGenDist- the required minimum cM distance between successive markersmarkers- a list of markers- Returns:
- a returns new
MarkerMapinstance - Throws:
IllegalArgumentException- ifmarkers.marker(0).chromIndex() != markers.marker(markers.nMarkers() - 1).chromIndex()IllegalArgumentException- ifDouble.isFinite(minDist) == falseIllegalArgumentException- if the specified genetic map has no map positions for the specified chromosomeNullPointerException- ifgenMap == null || markers == null
-
meanSingleBaseGenDist
Returns the mean genetic distance between two consecutive base positions.- Parameters:
genMap- the genetic mapmarkers- a list of markers- Returns:
- the mean genetic distance between two consecutive base positions
- Throws:
IllegalArgumentException- ifmarkers.marker(0).chromIndex() != markers.marker(markers.nMarkers() - 1).chromIndex()IllegalArgumentException- ifmarkers.marker(0).pos() == markers.marker(markers.nMarkers() - 1).pos()IllegalArgumentException- if the specified genetic map has no map positions for the specified chromosomeNullPointerException- ifgenMap == null || markers == null
-
restrict
Return a marker map restricted to the specified markers- Parameters:
indices- a list of distinct marker indices in increasing order- Returns:
- a marker map restricted to the specified markers
- Throws:
IndexOutOfBoundsException- if there existsjsuch that(0 <= j && j < indices.length)such that(indices[j] < 0 || indices[j] >= this.nMarkers())IllegalArgumentException- if there existsjsuch that(1 <= j && j < indices.length)such that(indices[j] <= indice[j - 1])NullPointerException- ifindices == null
-
restrict
Return a marker map restricted to the specified markers- Parameters:
indices- a list of distinct marker indices in increasing order- Returns:
- a marker map restricted to the specified markers
- Throws:
IndexOutOfBoundsException- if there existsjsuch that(0 <= j && j < indices.length)such that(indices.get(j) < 0 || indices.get(j) >= this.nMarkers())IllegalArgumentException- if there existsjsuch that(1 <= j && j < indices.length)such that(indices.get(j) <= indice.get(j - 1))NullPointerException- ifindices == null
-
genPos
Returns aDoubleArrayof sizethis.markers().nMarkers()whosek-th element is the genetic map position of thek-th marker.- Returns:
- the array of genetic map positions
-
genDist
Return aFloatArrayof sizethis.markers().nMarkers()whosek-th element is the genetic distance between thek-th target marker and the previous marker, or0.0if(k == 0).- Returns:
- a
FloatArrayof sizethis.nTargMarkers()whosek-th element is the genetic distance between thek-th target marker and the previous marker,
-
pRecomb
Returns a map of marker index to the probability of recombination in the interval between the marker and the preceding marker.- Parameters:
recombIntensity- the intensity of the exponential distribution that gives the probability of transitioning to a random HMM state in a specified cM distance- Returns:
- a map of marker index to the probability of recombination in the interval between the marker and the preceding marker
- Throws:
IllegalArgumentException- ifintensity <= 0.0 || Float.isFinite(intensity)==false
-