public interface GeneticMap
Interface GeneticMap
represents a genetic map for one or more
chromosomes.
Instances of class GeneticMap
are immutable.
Modifier and Type | Method and Description |
---|---|
int |
basePos(int chrom,
double geneticPosition)
Returns the base position corresponding to the specified genetic map
position.
|
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.
|
default double[] |
genPos(Markers markers)
Returns the an array of length
hapPairs.nMarkers() whose
whose j -th element is the genetic map position
of the j -th marker. |
default float[] |
pRecomb(Markers markers,
int nHaps,
float ne)
Returns the an array of length
hapPairs.nMarkers() whose
whose j -th element for j > 0 is the
probability of recombination between marker j - 1
and marker j , and whose initial element is 0 . |
java.lang.String |
toString()
Returns a string representation of this genetic map.
|
int basePos(int chrom, double geneticPosition)
chrom
- the chromosome indexgeneticPosition
- the genetic position on the chromosomejava.lang.IllegalArgumentException
- if the calculated base position
exceeds Integer.MAX_VALUE
java.lang.IllegalArgumentException
- if this genetic map has no
map positions for the specified chromosomejava.lang.IndexOutOfBoundsException
- if
chrom < 0 || chrom >= ChromIds.instance().size()
double genPos(Marker marker)
marker
- a genetic markerjava.lang.IllegalArgumentException
- if this genetic map has no
map positions for the specified chromosomejava.lang.NullPointerException
- if marker == null
double genPos(int chrom, int basePosition)
chrom
- the chromosome indexbasePosition
- the base coordinate on the chromosomejava.lang.IllegalArgumentException
- if this genetic map has no
map positions for the specified chromosomejava.lang.IndexOutOfBoundsException
- if
chrom < 0 || chrom >= ChromIds.instance().size()
java.lang.String toString()
toString
in class java.lang.Object
default double[] genPos(Markers markers)
hapPairs.nMarkers()
whose
whose j
-th element is the genetic map position
of the j
-th marker.markers
- the list of markersjava.lang.NullPointerException
- if markers == null
default float[] pRecomb(Markers markers, int nHaps, float ne)
hapPairs.nMarkers()
whose
whose j
-th element for j > 0
is the
probability of recombination between marker j - 1
and marker j
, and whose initial element is 0
.
Any inter-marker genetic distances less than 1e-7
cM are
increased to 1e-7
cM.markers
- the list of markersnHaps
- the number of haplotypes in the samplene
- the effective population sizejava.lang.IllegalArgumentException
- if nHaps < 1
java.lang.IllegalArgumentException
- if ne < 1f
java.lang.NullPointerException
- if markers == null