[][src]Struct rust_genomics::Sequence

pub struct Sequence {
    pub seq: String,
}

A genomic sequence is represented here.

Fields

seq: String

Implementations

impl Sequence[src]

pub fn new(seq: String) -> Sequence[src]

Returns a Sequence with the seq given to them

Arguments

  • seq - A String that holds the sequence itself. Must have no white space or special characters.

Examples

use rust_genomics::Sequence;
let epic_seq = Sequence::new("ATGATGATG".to_string());

pub fn find_at_index(&self, index: usize) -> Result<&str, Error>[src]

Returns a Result type containing the nucleotide at a given index

Arguments

  • index - should be within the length of the Sequence, or an Error is returned

pub fn return_reading_frames(&self) -> Vec<Vec<&str>>[src]

Takes the current sequence and returns a vector of codons at 3 reading frames.

Examples

For sequence ATCAGGCAT, there are 3 frames. By calling this function on that sequence, it returns

[["ATC", "AGG", "CAT"],

["A", "TCA", "GGC", "AT"],

["AT", "CAG", "GCA", "T"]]

pub fn find_lorf(&self) -> LORF[src]

Given a sequence, return the longest open reading frame (section of sequence beginning with start codon and ending with stop codon)

pub fn concurrent_find_lorf(&self) -> LORF[src]

Given a sequence, return the longest open reading frame (section of sequence beginning with start codon and ending with stop codon). Uses threads and concurrency.

pub fn gen_random_seq(len: i64) -> Sequence[src]

Returns a randomly generated Sequence with the given length attribute

Arguments

  • len - the length of that sequence

Examples

use rust_genomics::Sequence;
let epic_seq = Sequence::gen_random_seq(500);

Trait Implementations

impl Debug for Sequence[src]

impl Display for Sequence[src]

Auto Trait Implementations

impl RefUnwindSafe for Sequence

impl Send for Sequence

impl Sync for Sequence

impl Unpin for Sequence

impl UnwindSafe for Sequence

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]