code: def prepare(bedfile):
      
      pf = bedfile.rsplit(".", 1)[0]
      abedfile = pf + ".a.bed"
      bbedfile = pf + ".b.bed"
      fwa = open(abedfile, "w")
      fwb = open(bbedfile, "w")
  
      bed = Bed(bedfile)
      seen = set()
      for b in bed:
          accns = b.accn.split(";")
          new_accns = []
          for accn in accns:
              if ":" in accn:
                  method, a = accn.split(":", 1)
                  if method in ("liftOver", "GMAP", ""):
                      accn = a
              if accn in seen:
                  logging.error("Duplicate id {0} found. Ignored.".format(accn))
                  continue
  
              new_accns.append(accn)
              b.accn = accn
              print(b, file=fwa)
              seen.add(accn)
  
          b.accn = ";".join(new_accns)
          print(b, file=fwb)
      fwa.close()
      fwb.close()
docs: Remove prepended tags in gene names.