Package vcf
Class VcfRecGTParser.HapListRep
java.lang.Object
vcf.VcfRecGTParser.HapListRep
- Enclosing class:
VcfRecGTParser
-
Method Summary
Modifier and TypeMethodDescriptionint[][]hapLists(boolean setMajorToNull) Returns an array of lengththis.marker().nAlleles()that contains lists of haplotypes carrying each allele.booleanisPhased()Returnstrueif all genotypes are phased and there are no missing alleles, and returnsfalseotherwise.intReturns the major allele.marker()Returns the marker.int[]Returns a list of samples with missing indicesintReturns the non-major allele count.samples()Returns the samples.
-
Method Details
-
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 allelejis stored in thej-thelement of the returned array. if (@code setMajorToNull == true} then element of the returned array corresponding tothis.majorAllele()will benull- Parameters:
setMajorToNull-trueif the element of the returned array corresponding tothis.majorAllele()will benull- Returns:
- list of haplotypes carrying each allele.
-
marker
Returns the marker.- Returns:
- the marker
-
samples
Returns the samples.- Returns:
- the samples
-
isPhased
public boolean isPhased()Returnstrueif all genotypes are phased and there are no missing alleles, and returnsfalseotherwise.- Returns:
trueif all genotypes are phased and nonomissing
-