Module bio::seq_analysis::orf

source ·
Expand description

One-way open reading frame (ORF) finder algorithm.

Complexity: O(n).

§Example

use bio::seq_analysis::orf::{Finder, Orf};
let start_codons = vec![b"ATG"];
let stop_codons = vec![b"TGA", b"TAG", b"TAA"];
let min_len = 50;
let finder = Finder::new(start_codons, stop_codons, min_len);

let sequence = b"ACGGCTAGAAAAGGCTAGAAAA";

for Orf { start, end, offset } in finder.find_all(sequence) {
    let orf = &sequence[start..end];
    //...do something with orf sequence...
}

Right now the only way to check the reverse strand for ORF is to use the alphabet::dna::RevComp struct and to check for both sequences. But that’s not so performance friendly, as the reverse complementation and the ORF research could go on at the same time.

Structs§

  • An implementation of a naive algorithm finder
  • Iterator over offset, start position, end position and sequence of matched ORFs.
  • An ORF representation with start and end position of said ORF, as well as offset of the reading frame (1,2,3) and strand location