/** Fill values for INFO fields requiring 'REF' value */ protected void findDbInfoRef(Map<String, String> info, Set<VcfEntry> uniqueVcfEntries) { if (!useInfoFields || !hasVcfInfoPerAlleleRef) return; // Nothing to do for (String infoFieldName : infoFields) { // Does this field require 'REF' annotation? if (!isVcfInfoPerAlleleRef(infoFieldName)) continue; // Try to find 'REF' information in any entry String val = null; for (VcfEntry dbVcfEntry : uniqueVcfEntries) { val = dbVcfEntry.getInfo(infoFieldName, dbVcfEntry.getRef()); if (VcfEntry.isEmpty(val)) val = null; // Only add non-empty else break; // We need only one value } // Nothing found? Use 'MISSING' value if (val == null) val = VcfFileIterator.MISSING; // Store value info.put(infoFieldName, val); } }