public class PositionMap extends java.lang.Object implements GeneticMap
Class PositionMap
represents a genetic map obtained by
multiplying chromosome position by a scale factor.
Instances of class PositionMap
are immutable.
Constructor and Description |
---|
PositionMap(double scaleFactor)
Constructs a new
PositionMap instance. |
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.
|
double |
scaleFactor()
Returns the scale factor that is multiplied by the chromosome position
to obtain the corresponding genetic map position
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
genPos, pRecomb, toString
public PositionMap(double scaleFactor)
PositionMap
instance.scaleFactor
- the factor that is multiplied by
a base position to obtain the corresponding genetic map positionjava.lang.IllegalArgumentException
- if
scaleFactor <= 0d || Double.isFinite(scaleFactor) == false
public double scaleFactor()
public int basePos(int chrom, double geneticPosition)
GeneticMap
basePos
in interface GeneticMap
chrom
- the chromosome indexgeneticPosition
- the genetic position on the chromosomepublic double genPos(Marker marker)
GeneticMap
genPos
in interface GeneticMap
marker
- a genetic markerpublic double genPos(int chrom, int basePosition)
GeneticMap
genPos
in interface GeneticMap
chrom
- the chromosome indexbasePosition
- the base coordinate on the chromosome