MCPcopy Create free account
hub / github.com/RealTimeGenomics/rtg-tools / isHeterozygous

Method isHeterozygous

src/main/java/com/rtg/vcf/VcfUtils.java:682–685  ·  view source on GitHub ↗

Tests if the given sample genotype in a record is heterozygous or not. @param rec record to check @param sample sample number @return true iff heterozygous @throws NoTalkbackSlimException if the sample is missing GT filed or invalid sample number

(VcfRecord rec, int sample)

Source from the content-addressed store, hash-verified

680 * @throws NoTalkbackSlimException if the sample is missing GT filed or invalid sample number
681 */
682 public static boolean isHeterozygous(VcfRecord rec, int sample) {
683 final int[] gtArray = getValidGt(rec, sample);
684 return isHeterozygous(gtArray);
685 }
686
687 /**
688 * Tests if the given sample genotype in a record is haploid or not.

Callers 7

testGtPropertiesMethod · 0.95
getValueMethod · 0.95
acceptMethod · 0.95
testSquashGtMethod · 0.45
testPhasedGtMethod · 0.45
testSquashAltsMethod · 0.45

Calls 1

getValidGtMethod · 0.95

Tested by 5

testGtPropertiesMethod · 0.76
testSquashGtMethod · 0.36
testPhasedGtMethod · 0.36
testSquashAltsMethod · 0.36