Ejemplo n.º 1
0
genome_str, ref_genome_str, idx_lut, edge_lut, mismatch_lut, \
    border_lut = mascpcr.generateLUTs(
        genome_fp=RECODED_GENOME_FP,
        ref_genome_fp=REFERENCE_GENOME_FP,
        start_idx=start_idx,
        end_idx=end_idx,          
        # We want our primers to span "synth_fragment" junctions, if possible 
        # to insure that our subassemblies all worked properly 
        border_feature_types=['synth_fragment'],
        # We won't cache the lookup tables for this demonstration, but if you
        # are planning on running the pipeline against a single recoded 
        # genome multiple times it's worth the ~20 mb or so to cache the 
        # lookup tables and save a couple of minutes per call
        # cache_luts=False
)

# This call runs the actual pipeline with the data structures that we just
# generated. Note that it requires the genome string and reference genome
# string, which we get from the SeqRecord object (need to cast it to a str)
mascpcr.findMascPrimers(
    idx_lut=idx_lut,
    genome_str=genome_str,
    ref_genome_str=ref_genome_str,
    start_idx=start_idx,
    end_idx=end_idx,
    edge_lut=edge_lut,
    mismatch_lut=mismatch_lut,
    border_lut=border_lut,
    params=params
)
Ejemplo n.º 2
0
        end_idx=end_idx,          
        # We want our primers to span "synth_fragment" junctions, if possible 
        # to insure that our subassemblies all worked properly 
        border_feature_types=['synth_fragment'],
        # We won't cache the lookup tables for this demonstration, but if you
        # are planning on running the pipeline against a single recoded 
        # genome multiple times it's worth the ~20 mb or so to cache the 
        # lookup tables and save a couple of minutes per call
        cache_luts=False
)

# Now let's call the actual pipeline for each of the respective segments. We 
# will modify the `output_basename` argument of `params` so that each output
# file has an appropriate, respective name

for seg_num in range(23, 31):

    params = {'output_basename': 'example_seg%d' % seg_num}

    mascpcr.findMascPrimers(
        idx_lut=idx_lut,
        genome_str=genome_str,
        ref_genome_str=ref_genome_str,
        start_idx=seg_indices[seg_num][0],
        end_idx=seg_indices[seg_num][1],
        edge_lut=edge_lut,
        mismatch_lut=mismatch_lut,
        border_lut=border_lut,
        params=params
    )