Package vcf
Class VcfRecGTParser.HapListRep
- java.lang.Object
-
- vcf.VcfRecGTParser.HapListRep
-
- Enclosing class:
- VcfRecGTParser
public static class VcfRecGTParser.HapListRep extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int[][]
hapLists(boolean setMajorToNull)
Returns an array of lengththis.marker().nAlleles()
that contains lists of haplotypes carrying each allele.boolean
isPhased()
Returnstrue
if all genotypes are phased and there are no missing alleles, and returnsfalse
otherwise.int
majorAllele()
Returns the major allele.Marker
marker()
Returns the marker.int[]
missingSamples()
Returns a list of samples with missing indicesint
nonmajorAlleleCnt()
Returns the non-major allele count.Samples
samples()
Returns the samples.
-
-
-
Method Detail
-
nonmajorAlleleCnt
public int nonmajorAlleleCnt()
Returns the non-major allele count.- Returns:
- the non-major allele count
-
missingSamples
public int[] missingSamples()
Returns a list of samples with missing indices- Returns:
- a list of samples with missing indices
-
majorAllele
public int majorAllele()
Returns the major allele. The major allele is the allele with largest number of copies. If there are multiple major alleles the major allele with smallest index is returned.- Returns:
- the major allele
-
hapLists
public int[][] hapLists(boolean setMajorToNull)
Returns an array of lengththis.marker().nAlleles()
that contains lists of haplotypes carrying each allele. The increasing list of haplotype indices carrying non-major allelej
is stored in thej-th
element of the returned array. if (@code setMajorToNull == true} then element of the returned array corresponding tothis.majorAllele()
will benull
- Parameters:
setMajorToNull
-true
if the element of the returned array corresponding tothis.majorAllele()
will benull
- Returns:
- list of haplotypes carrying each allele.
-
marker
public Marker marker()
Returns the marker.- Returns:
- the marker
-
samples
public Samples samples()
Returns the samples.- Returns:
- the samples
-
isPhased
public boolean isPhased()
Returnstrue
if all genotypes are phased and there are no missing alleles, and returnsfalse
otherwise.- Returns:
true
if all genotypes are phased and nonomissing
-
-