code: def _add_config_regions(nblock_regions, ref_regions, data):
      
      input_regions_bed = dd.get_variant_regions(data)
      if input_regions_bed:
          input_regions = pybedtools.BedTool(input_regions_bed)
          # work around problem with single region not subtracted correctly.
          if len(input_regions) == 1:
              str_regions = str(input_regions[0]).strip()
              input_regions = pybedtools.BedTool("%s\n%s" % (str_regions, str_regions),
                                                 from_string=True)
          input_nblock = ref_regions.subtract(input_regions, nonamecheck=True)
          if input_nblock == ref_regions:
              raise ValueError("Input variant_region file (%s) "
                               "excludes all genomic regions. Do the chromosome names "
                               "in the BED file match your genome (chr1 vs 1)?" % input_regions_bed)
          all_intervals = _combine_regions([input_nblock, nblock_regions], ref_regions)
      else:
          all_intervals = nblock_regions
      if "noalt_calling" in dd.get_tools_on(data) or "altcontigs" in dd.get_exclude_regions(data):
          from bcbio.heterogeneity import chromhacks
          remove_intervals = ref_regions.filter(lambda r: not chromhacks.is_nonalt(r.chrom))
          all_intervals = _combine_regions([all_intervals, remove_intervals], ref_regions)
      return all_intervals.merge()
docs: Add additional nblock regions based on configured regions to call.
      Identifies user defined regions which we should not be analyzing.