backbone = ('gaattctaaagatctttgacagctagctcagtcctaggtataatactagt' '{}' 'gttttagtactctggaaacagaatctactaaaacaaggcaaaatgccgtg') spacers = [ #'g1', 'g2', 'g3', 'g4', 'g5', 'r1', 'r2', 'r3', 'r4', ] results = {} args = docopt.docopt(__doc__) dna = lambda x: backbone.format(sgrna_sensor.spacer(x, species='sa').dna) for spacer in spacers: designer = primers.PrimerDesigner() designer.name = 'sa_' + spacer designer.backbone = dna('n21') designer.construct = dna(spacer) designer.verbose = args['--verbose'] results.update(designer.design_primers()) results = primers.consolidate_duplicate_primers(results) primers.report_primers_to_table(results)
""" import docopt import shlex import sgrna_sensor import sgrna_sensor.primers as mut args = docopt.docopt(__doc__) primers = {} context = "gatctttgacagctagctcagtcctaggtataatactagt{}gtttcagagctatgctggaaacagcatagcaagttgaaat" for name in args['<spacers>']: designer = mut.PrimerDesigner() designer.name = name designer.tm = args['--tm'] designer.verbose = args['--verbose'] spacer = sgrna_sensor.spacer(name) designer.construct = context.format(spacer.dna) designer.backbone = context.format("") primers.update(designer.design_primers()) primers = mut.consolidate_duplicate_primers(primers) if args['--table']: mut.report_primers_to_table(primers) else: mut.report_primers_for_elim(primers)