Package vcf
Class MarkerMap
- java.lang.Object
-
- vcf.MarkerMap
-
public class MarkerMap extends java.lang.ObjectClass
MarkerRecombMaprepresents genetic map positions and inter-marker haplotype switch probabilities for a sequence of genomic loci.Instances of class
MarkerRecombMapare immutable.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MarkerMapcreate(GeneticMap genMap, Markers markers)Returns a newMarkerMapinstance constructed from the specified dataFloatArraygenDist()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).DoubleArraygenPos()Returns aDoubleArrayof sizethis.markers().nMarkers()whosek-th element is the genetic map position of thek-th marker.FloatArraypRecomb(float recombIntensity)Returns a map of marker index to the probability of recombination in the interval between the marker and the preceding marker.MarkerMaprestrict(int[] indices)Return a marker map restricted to the specified markers
-
-
-
Method Detail
-
create
public static MarkerMap create(GeneticMap genMap, Markers markers)
Returns a newMarkerMapinstance constructed from the specified data- Parameters:
genMap- the genetic mapmarkers- a list of markers- Returns:
- a returns new
MarkerMapinstance - Throws:
java.lang.IllegalArgumentException- ifmarkers.marker(0).chromIndex() != markers.marker(markers.nMarkers()-1).chromIndex()java.lang.NullPointerException- ifgenMap == null || markers == null
-
restrict
public MarkerMap restrict(int[] indices)
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:
java.lang.IndexOutOfBoundsException- if there existsjsuch that(0 <= j && j < indices.length)such that(indices[j] < 0 || indices[j] >= this.nMarkers())java.lang.IllegalArgumentException- if there existsjsuch that(1 <= j && j < indices.length)such that(indices[j] <= indice[j - 1])java.lang.NullPointerException- ifindices == null
-
genPos
public DoubleArray 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
public FloatArray 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
public FloatArray pRecomb(float recombIntensity)
Returns a map of marker index to the probability of recombination in the interval between the marker and the preceding marker.- Parameters:
recombIntensity- the factor multiplied by genetic distance to obtain the probability of transitioning to a random HMM state.- Returns:
- a map of marker index to the probability of recombination in the interval between the marker and the preceding marker
- Throws:
java.lang.IllegalArgumentException- ifintensity <= 0.0 || Float.isFinite(intensity)==false
-
-