code: private boolean shouldAddSampleToVariant(String genotype, int alleleIdx) {
          if (genotype.contains(String.valueOf(alleleIdx))) {
              return true;
          }
          
          if (!genotype.contains("0") && !genotype.contains(".")) {
              return false;
          }
          
          String[] alleles = genotype.split("[/|]");
          for (String allele : alleles) {
              if (!allele.equals("0") && !allele.equals(".")) {
                  return false;
              }
          }
          
          return true;
      }
docs: Checks whether a sample should be included in a variant's list of
  samples. If current allele index is not found in the genotype and not all
  alleles are references/missing, then the sample must not be included.
  
  @param genotype The genotype
  @param alleleIdx The index of the allele
  @return If the sample should be associated to the variant