code: function parseHeader(headers) {
    // Returns a header object with keys header line types (.e.g format, info,
    // sample) and values arrays of objects containing the key-value information
    // stored therein.
    if (headers.length === 0) {
      throw new Error('Invalid VCF File: missing header.');
    }
  
    var header = {};
    header.__RAW__ = headers;
    // VCF header lines always start with either one or two # signs.
    headers = U.map(headers, function(h) { return h.replace(/^##?/, ""); });
  
    header.columns = headers[headers.length-1].split('\t');
    header.sampleNames = header.columns.slice(NUM_STANDARD_HEADER_COLUMNS);
  
    // TODO(ihodes): parse other, less frequently used, header lines like
    //               'assembly'
    header.VERSION = parseVCFVersion(headers);
    header.ALT = parseHeadersOf('ALT', headers);
    header.INFO = parseHeadersOf('INFO', headers);
    header.FORMAT = parseHeadersOf('FORMAT', headers);
    header.SAMPL = parseHeadersOf('SAMPLE', headers);
    header.PEDIGREE = parseHeadersOf('PEDIGREE', headers);
    header.contig = parseHeadersOf('contig', headers);
  
    return header;
  }
docs: ////////////////////////////////////////////////////// Below: parsing the header metadata of a VCF file.  // //////////////////////////////////////////////////////