예제 #1
0
internal_oligo_tm = Martel.Group("internal_tm", any_float)
internal_oligo_gc = Martel.Group("internal_gc", any_float)
internal_oligo_seq = Martel.Group("internal_seq", sequence)
internal_line = Martel.Group(
    "internal_line", primer_space + Martel.Str("INTERNAL OLIGO") + any_space +
    internal_oligo_start + any_space + internal_oligo_length + any_space +
    internal_oligo_tm + any_space + internal_oligo_gc + any_space +
    internal_oligo_seq + Martel.AnyEol())

# XXX This record definition is ugly. But it works :-)
record = Martel.Group("primer3_record",
                      comments + \
                        Martel.Alt(
                         # case 1. primer file with nothing
                         Martel.Str("\n" * 3) +
                         Martel.Opt(Martel.Str("\n" * 4)),
                         # case 2. some primers have been picked
                         Martel.Rep(
                           # case 2a. we are designing a primer pair
                           Martel.Alt(blank_line + primer_start_line,
                           # case 2b. we are designing a single primer
                                      single_primer_line) +
                           # case 2a. both primer pairs
                           Martel.Alt(forward_line + blank_line +
                                      reverse_line + blank_line,
                           # case 2b1. Reverse primer
                                      reverse_line + blank_line,
                           # case 2b2, Forward primer
                                      forward_line + blank_line,
                           # case 2b3, Internal oligo
                                      internal_line + blank_line)) +
예제 #2
0
# 0 or more
RT = Simple("RT", "reference_title")
RT_block = Martel.Group("RT_block", Martel.Rep1(RT))

#--- RL

# 1 or more

RL = Simple("RL", "reference_location")
RL_block = Martel.Group("RL_block", Martel.Rep1(RL))

reference = Martel.Group("reference",
                         RN + \
                         RP + \
                         Martel.Opt(RC_block) + \
                         Martel.Opt(RX) + \
                         RA_block + \
                         Martel.Opt(RT_block) + \
                         RL_block
                         )

############

#--- CC

CC_begin = Martel.Group("CC",
                        Martel.Re("CC   -!- ") + \
                        Martel.ToEol("comment_text"))
CC =       Martel.Group("CC",
                        Martel.Re("CC       ") + \