code: public static String getChromosome(String headerLine) throws InvalidObjectException {
          String chromosome = getHeaderInfo("chrom", headerLine);
          if (chromosome == null) {
              throw new InvalidObjectException("WigFile format, it could not find 'chrom' in the header line");
          }
          return chromosome;
      }
docs: Extract the chromosome value from the given Wig header line.
  
  @param headerLine    Header line where to look for the chromosome
  @return              Chromosome value