Package haplotype
Class BitHapPair
- java.lang.Object
-
- haplotype.BitHapPair
-
-
Constructor Summary
Constructors Constructor Description BitHapPair(Markers markers, int idIndex, int[] alleles1, int[] alleles2)Constructs a newBitHapPairinstance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intallele1(int marker)Returns the first allele for the specified marker.intallele2(int marker)Returns the second allele for the specified marker.intidIndex()Returns the sample identifier index.Markermarker(int marker)Returns the specified marker.Markersmarkers()Returns the markers.intnMarkers()Returns the number of markers.java.lang.StringtoString()Returns a string representation ofthis.
-
-
-
Constructor Detail
-
BitHapPair
public BitHapPair(Markers markers, int idIndex, int[] alleles1, int[] alleles2)
Constructs a newBitHapPairinstance.- Parameters:
markers- the sequence of markersidIndex- the sample identifier indexalleles1- the sequence of allele indices for the first haplotypealleles2- the sequence of alleles indices for the second haplotype- Throws:
java.lang.IllegalArgumentException- ifalleles1.length != markers.nMarkers() || alleles2.length != markers.nMarkers()java.lang.IllegalArgumentException- ifalleles1[k] < 0 || allele1[k] >= markers.marker(k).nAlleles()for someksatisfying0 <= k && k < markers.nMarkers()java.lang.IllegalArgumentException- ifalleles2[k] < 0 || allele2[k] >= markers.marker(k).nAlleles()for someksatisfying0 <= k && k < markers.nMarkers()java.lang.IndexOutOfBoundsException- ifidIndex < 0java.lang.NullPointerException- ifmarker == null || alleles1 == null || allele2 == null
-
-
Method Detail
-
allele1
public int allele1(int marker)
Description copied from interface:HapPairReturns the first allele for the specified marker.
-
allele2
public int allele2(int marker)
Description copied from interface:HapPairReturns the second allele for the specified marker.
-
marker
public Marker marker(int marker)
Description copied from interface:HapPairReturns the specified marker.
-
nMarkers
public int nMarkers()
Description copied from interface:HapPairReturns the number of markers.
-
idIndex
public int idIndex()
Description copied from interface:HapPairReturns the sample identifier index.
-
toString
public java.lang.String toString()
Returns a string representation ofthis. The exact details of the representation are unspecified and subject to change.- Overrides:
toStringin classjava.lang.Object- Returns:
- a string representation of
this
-
-