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.booleanisPhased()Returnstrueif all genotypes are phased and there are no missing alleles, and returnsfalseotherwise.intmajorAllele()Returns the major allele.Markermarker()Returns the marker.int[]missingSamples()Returns a list of samples with missing indicesintnonmajorAlleleCnt()Returns the non-major allele count.Samplessamples()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 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
public Marker marker()
Returns the marker.- Returns:
- the marker
-
samples
public Samples 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
-
-