code: def precursor_sequence(loci, reference):
      
      region = "%s\t%s\t%s\t.\t.\t%s" % (loci[1], loci[2], loci[3], loci[4])
      precursor = pybedtools.BedTool(str(region), from_string=True).sequence(fi=reference, s=True)
      return open(precursor.seqfn).read().split("\n")[1]
docs: Get sequence from genome