ENH: Add iter_regex and find_features

Fixes #612. Adds iter_regex to skbio._sequence.BiologicalSequence and
find_features to skbio._sequence.NucleotideSequence. Supported features are
currently purine_run and pyrimidine run, but more can be added by specifying
additional regular expressions.
The original issue suggested being able to cast from a NucleotideSequence
to a PurinePyrmidineSequence though. Perhaps this should be discussed
further within the issues before moving to much further on the PR?


On Tue, Aug 12, 2014 at 5:02 PM, adamrp <notifications@github.com> wrote:

> In skbio/sequence/_sequence.py:
>
> > @@ -1324,6 +1350,34 @@ def reverse_complement(self):
> >          return self._complement(reversed(self))
> >      rc = reverse_complement
> >
> > +    def find_features(self, feature_type, min_length=1):
> > +        """Search the sequence for features
> > +
> > +        Parameters
> > +        ----------
> > +        feature_type : {'purine_run', 'pyrimidine_run'}
>
> Hmm I'm not sure I understand the request. Without those things
> hard-coded, how would the caller specify what features should be retrieved?
> I suppose each could be its own instance method (e.g., have a method for def
> iter_purine_runs(self, allow_gaps=False) and likewise for
> iter_pyrimidine_runs). If I'm still not understanding, I'm sorry. Can you
> (or others @gregcaporaso <https://github.com/gregcaporaso> @jairideout
> <https://github.com/jairideout> @ElDeveloper
> <https://github.com/ElDeveloper>) suggest an alternative implementation?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/biocore/scikit-bio/pull/613/files#r16148867>.
>