View Source Bio.Restriction (bio_elixir v0.3.0)

Interaction between Bio.Sequence objects and Bio.Restriction.Enzymes.

The primary function is digest/2. The digest/2 function works by recursively breaking down a binary and checking to see if the pattern for a given enzyme exists within it.

Redesign Incoming

Initially I had thought to just get the data and apply it. Having only been familiar with quite a small sub-set of the possible digestion outcomes. That said, I did some reading and it seems that having digest/2 be type specific to the type and sub-type of the enzyme is the best approach. That means that I need to re-write the parser for the REBASE data. Which means that there's more work to be done! When is that ever not true... Anyway you probably don't want to use this until then.

Missing Functionality

Currently we don't support enzymes that have two cut sites, or enzymes with ambiguous DNA recognition.

Missing Data

The enzyme HpyUM037X is removed from the set, since it has two conflicting entries in the emboss data. If you can resolve this distinction, please feel free to either contribute a fix, or open an issue that explains how one would be implemented.

Link to this section Summary

Functions

Digest takes in a string, anticipated to be a DNA sequence, and extracts the components of the string as a tuple that would remain after digestion with a given restriction enzyme.

Link to this section Functions

@spec digest(dna :: String.t(), enzyme :: struct()) :: [String.t(), ...]

Digest takes in a string, anticipated to be a DNA sequence, and extracts the components of the string as a tuple that would remain after digestion with a given restriction enzyme.

examples

Examples

iex> Bio.Restriction.digest("ttagatgacgtctcgattagagt", Bio.Restriction.Enzyme.bsmbi)
["ttagatgacgtctcg", "attagagt"]

Currently this will work for enzymes that look back as well:

iex> Bio.Restriction.digest("ggatgcagatcagacgaggattga", Bio.Restriction.Enzyme.bsp143i)
["ggatgc", "agatcagacgaggattga"]

It does not yet work on enzymes that would produce digestions with three parts such as NmeDI, nor will it work on enzymes whose recognition pattern is defined using ambiguous DNA (even simply N).