There is code in PrimerProspector (analyze_primers.py library) for finding
the local alignment of primers. I'm not sure if you want this though,
rather than assuming that primer is at the beginning of the read, and even
if it's in the read, unless you want to handle indels, it still is probably
going to be faster to do regular expression searches for the primer (and
degenerate possibilities) than to do the local alignment.


On Tue, May 6, 2014 at 10:47 PM, josenavas <notifications@github.com> wrote:

> In qiime/split_libraries_lea_seq.py:
>
> > @@ -0,0 +1,388 @@
> > +from collections import defaultdict
> > +from itertools import izip
> > +from qiime.golay import decode_golay_12, get_invalid_golay_barcodes
> > +from qiime.parse import  parse_mapping_file_to_dict
> > +from qiime.split_libraries import check_map, expand_degeneracies
> > +from qiime.split_libraries_fastq import correct_barcode, FastqParseError
> > +from qiime.util import create_dir, qiime_system_call, get_qiime_temp_dir
> > +import re
> > +import tempfile
> > +import skbio.parse.sequences.parse_fastq
> > +
> > +def extract_primer(seq, possible_primers, min_idx=None, max_idx=None):
>
> Is this something that PrimerProspector can do, @walterst<https://github.com/walterst>
> ?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/biocore/qiime/pull/1514/files#r12361376>
> .
>