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

Method isDiploid

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

Tests if the given sample genotype in a record is diploid or not. @param rec record to check @param sample sample number @return true iff diploid @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

704 * @throws NoTalkbackSlimException if the sample is missing GT filed or invalid sample number
705 */
706 public static boolean isDiploid(VcfRecord rec, int sample) {
707 final int[] gtArray = getValidGt(rec, sample);
708 return gtArray.length == 2;
709 }
710
711 /**
712 * @param gt the genotype allele ids

Callers

nothing calls this directly

Calls 1

getValidGtMethod · 0.95

Tested by

no test coverage detected