code: def prep_seq2c_bed(data):
      
      if dd.get_background_cnv_reference(data, "seq2c"):
          bed_file = _background_to_bed(dd.get_background_cnv_reference(data, "seq2c"), data)
      else:
          bed_file = regions.get_sv_bed(data)
      if bed_file:
          bed_file = bedutils.clean_file(bed_file, data, prefix="svregions-")
      else:
          bed_file = bedutils.clean_file(dd.get_variant_regions(data), data)
      if not bed_file:
          return None
  
      col_num = bt.BedTool(bed_file).field_count()
      if col_num < 4:
          annotated_file = annotate.add_genes(bed_file, data, max_distance=0)
          if annotated_file == bed_file:
              raise ValueError("BED file for Seq2C must be annotated with gene names, "
                               "however the input BED is 3-columns and we have no transcript "
                               "data to annotate with " + bed_file)
          annotated_file = annotate.gene_one_per_line(annotated_file, data)
      else:
          annotated_file = bed_file
  
      ready_file = "%s-seq2cclean.bed" % (utils.splitext_plus(annotated_file)[0])
      if not utils.file_uptodate(ready_file, annotated_file):
          bed = bt.BedTool(annotated_file)
          if col_num > 4 and col_num != 8:
              bed = bed.cut(range(4))
          bed = bed.filter(lambda x: x.name not in ["", ".", "-"])
          with file_transaction(data, ready_file) as tx_out_file:
              bed.saveas(tx_out_file)
          logger.debug("Saved Seq2C clean annotated ready input BED into " + ready_file)
  
      return ready_file
docs: Selecting the bed file, cleaning, and properly annotating for Seq2C