GeneticMappublic class MarkerMap extends java.lang.Object implements GeneticMap
Class MarkerMap represents genetic map positions for a
list of markers.
Instances of class MarkerMap are immutable.
| Modifier and Type | Method | Description |
|---|---|---|
int |
basePos(int chrom,
double geneticPosition) |
Returns the base position corresponding to the specified genetic map
position.
|
java.lang.String |
chrom() |
Returns the chromosome corresponding to the list of markers.
|
int |
chromIndex() |
Returns the index of the chromosome corresponding to the list of markers.
|
static MarkerMap |
create(GeneticMap genMap,
Markers markers) |
Returns a new
MarkerMap instance that is constructed from the
specified data |
double[] |
genPos() |
Returns the array of genetic map positions whose
k-th element
equals this.genPos(k). |
double |
genPos(int marker) |
Returns the genetic map position of the specified marker.
|
double |
genPos(int chrom,
int basePosition) |
Returns the genetic map position of the specified genome coordinate.
|
double |
genPos(Marker marker) |
Returns the genetic map position of the specified marker.
|
Marker |
marker(int marker) |
Returns the specified marker.
|
Markers |
markers() |
Returns the list of markers.
|
int |
nMarkers() |
Returns the number of markers.
|
MarkerMap |
reverse() |
Returns a
MarkerMap instance that is
obtained by reversing the order of markers in this. |
genPos, pRecomb, toStringpublic static MarkerMap create(GeneticMap genMap, Markers markers)
MarkerMap instance that is constructed from the
specified datagenMap - the genetic mapmarkers - a list of markersMarkerMap instancejava.lang.IllegalArgumentException - if
markers.marker(0).chromIndex()
!= markers.marker(markers.nMarkers()-1).chromIndex()java.lang.NullPointerException - if genMap == null || markers == nullpublic MarkerMap reverse()
MarkerMap instance that is
obtained by reversing the order of markers in this.MarkerMap instance that is obtained by
reversing the order of markers in thispublic java.lang.String chrom()
public int chromIndex()
public int basePos(int chrom,
double geneticPosition)
GeneticMapbasePos in interface GeneticMapchrom - the chromosome indexgeneticPosition - the genetic position on the chromosomepublic double genPos(Marker marker)
GeneticMapgenPos in interface GeneticMapmarker - a genetic markerpublic double genPos(int chrom,
int basePosition)
GeneticMapgenPos in interface GeneticMapchrom - the chromosome indexbasePosition - the base coordinate on the chromosomepublic int nMarkers()
public Markers markers()
public Marker marker(int marker)
marker - a marker indexpublic double genPos(int marker)
marker - a marker indexjava.lang.IndexOutOfBoundsException - if
marker < 0 || marker >= this.nMarkers()public double[] genPos()
k-th element
equals this.genPos(k).