Package vcf
Class XBasicGT1
- java.lang.Object
-
- vcf.XBasicGT1
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intallele1(int marker)Returns the first allele for the specified marker if the observed data include a non-missing allele, and returns -1 otherwise.intallele2(int marker)Returns the second allele for the specified marker if the observed data include a non-missing allele, and returns -1 otherwise.floatgl(int marker, int a1, int a2)Returns the probability of the observed data for the specified marker if the specified pair of ordered alleles is the true ordered genotype.intidIndex()Returns the sample identifier index.booleanisPhased(int marker)Returnstrueif the observed data for the specified marker includes a phased genotype, and returnsfalseotherwise.booleanisRefSample()Returnstrueif the observed data for each marker includes a phased genotype that has no missing alleles, and returnsfalseotherwise.Markermarker(int markerIndex)Returns the specified marker.Markersmarkers()Returns the list of markers.intnMarkers()Returns the number of markers.java.lang.StringtoString()Returns a string representation ofthis.
-
-
-
Constructor Detail
-
XBasicGT1
public XBasicGT1(GT gl, int sample)
Constructs aXBasicGL1instance from the specified data.- Parameters:
gl- the genotype likelihoodssample- the sample index- Throws:
java.lang.IndexOutOfBoundsException- ifsamples < 0 || sample >= gl.nSamples()java.lang.NullPointerException- ifgl == null
-
XBasicGT1
public XBasicGT1(GT gt, int sample, int father, int mother)
Constructs aXBasicGL1instance from the specified data.- Parameters:
gt- the genotype datasample- the sample indexfather- the sample index of the sample's father, or -1 if the father is not genotypedmother- the sample index of the sample's mother, or -1 if the mother is not genotyped- Throws:
java.lang.IndexOutOfBoundsException- ifsamples < 0 || sample >= gl.nSamples()java.lang.NullPointerException- ifgl == null
-
-
Method Detail
-
isRefSample
public boolean isRefSample()
Description copied from interface:XGT1Returnstrueif the observed data for each marker includes a phased genotype that has no missing alleles, and returnsfalseotherwise.- Specified by:
isRefSamplein interfaceXGT1- Returns:
trueif the observed data for each marker includes a phased genotype that has no missing alleles, andfalseotherwise
-
gl
public float gl(int marker, int a1, int a2)Description copied from interface:XGT1Returns the probability of the observed data for the specified marker if the specified pair of ordered alleles is the true ordered genotype.
-
isPhased
public boolean isPhased(int marker)
Description copied from interface:XGT1Returnstrueif the observed data for the specified marker includes a phased genotype, and returnsfalseotherwise.
-
allele1
public int allele1(int marker)
Description copied from interface:XGT1Returns the first allele for the specified marker if the observed data include a non-missing allele, and returns -1 otherwise. Alleles are arbitrarily ordered if the genotype is unphased.
-
allele2
public int allele2(int marker)
Description copied from interface:XGT1Returns the second allele for the specified marker if the observed data include a non-missing allele, and returns -1 otherwise. Alleles are arbitrarily ordered if the genotype is unphased.
-
nMarkers
public int nMarkers()
Description copied from interface:XGT1Returns the number of markers.
-
marker
public Marker marker(int markerIndex)
Description copied from interface:XGT1Returns the specified marker.
-
markers
public Markers markers()
Description copied from interface:XGT1Returns the list of markers.
-
idIndex
public int idIndex()
Description copied from interface:XGT1Returns the sample identifier index.
-
toString
public java.lang.String toString()
Description copied from interface:XGT1Returns a string representation ofthis. The exact details of the representation are unspecified and subject to change.
-
-