Package phase
Class Ibs2Markers
- java.lang.Object
-
- phase.Ibs2Markers
-
public final class Ibs2Markers extends java.lang.Object
Class
Ibs2Markers
stores the markers and intervals that are used to detect IBS2 segments.Instances of
Ibs2Markers
are immutable.
-
-
Constructor Summary
Constructors Constructor Description Ibs2Markers(GT targGT, MarkerMap map, FloatArray maf)
Constructs a newIbs2Markers
instance from the specified data.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int[]
markers(int start, int end)
Returns an increasing list of marker indices that are used to detect IBS2 segments in the specified intervalint
nMarkers()
Returns the number of markers.IntArray
stepStarts()
Returns the first marker index in each step in increasing order.
-
-
-
Constructor Detail
-
Ibs2Markers
public Ibs2Markers(GT targGT, MarkerMap map, FloatArray maf)
Constructs a newIbs2Markers
instance from the specified data.- Parameters:
targGT
- target genotype datamap
- a list whosej
-th element is the genetic map position of thej
-th the markermaf
- a list whosej
-th element is the estimated minor allele frequency of thej
-th the marker- Throws:
java.lang.IllegalArgumentException
- iftargGT.nMarkers() != map.genPos().size()
java.lang.IllegalArgumentException
- iftargGT.nMarkers() != maf.size()
java.lang.NullPointerException
- if(targGT == null || map == null || maf == null)
-
-
Method Detail
-
nMarkers
public int nMarkers()
Returns the number of markers.- Returns:
- the number of markers
-
markers
public int[] markers(int start, int end)
Returns an increasing list of marker indices that are used to detect IBS2 segments in the specified interval- Parameters:
start
- the first marker in the interval (inclusive)end
- the last marker in the interval (exclusive)- Returns:
- an increasing list of marker indices that are used to detect IBS2 segments in the specified interval
- Throws:
java.lang.IllegalArgumentException
- ifstart < 0 || end < start || end > this.nMarkers
-
stepStarts
public IntArray stepStarts()
Returns the first marker index in each step in increasing order.- Returns:
- the first marker index in each step
-
-