code: def targets_from_background(back_cnn, work_dir, data):
      
      target_file = os.path.join(work_dir, "%s.target.bed" % dd.get_sample_name(data))
      anti_file = os.path.join(work_dir, "%s.antitarget.bed" % dd.get_sample_name(data))
      if not utils.file_exists(target_file):
          with file_transaction(data, target_file) as tx_out_file:
              out_base = tx_out_file.replace(".target.bed", "")
              cmd = [_get_cmd("reference2targets.py"), "-o", out_base, back_cnn]
              do.run(_prep_cmd(cmd, tx_out_file), "CNVkit targets from background")
              shutil.copy(out_base + ".antitarget.bed", anti_file)
      return target_file, anti_file
docs: Retrieve target and antitarget BEDs from background CNN file.