Crate placecare

Crate placecare 

Source
Expand description

§Placecare

This is a fast toolkit to search for cis-acting regulatory elements using the PLACE database.

Here is the library crate for placecare, which provides the core functionality for searching and querying the PLACE database.

§Usage

§Searching for elements

We provide multiple ways to input sequences, as shown below:

use placecare::io::RecordDesc;

let input = vec![RecordDesc::new("Gh_01", "TTATAGACTCGATGGCCGCGCGG")];
let input = RecordDesc::from_file("./input.fasta");
let input = RecordDesc::from_string("\
>Gh_01
ATATCCGGATGGCATGCTGATC
");
let input = RecordDesc::from_records(bio::io::fasta::Reader::new("./input.fasta"));

let mut f = File::open("input.txt").unwrap();
let input = RecordDesc::from_reader(f);

Then we can search:

use placecare::place_search::Search;

// Search for a single element
let result = Search::search_elements_single_seq(input).unwrap();

// Search for multiple elements
let result = Search::search_elements(input).unwrap();

§Query

We can query the PLACE databse using the following methods:

use placecare::place_search::Search;

// The function will return a vector of Option<SeqDesc>
// for which is a result of the input sequence.
let e1: Vec<Option<SeqDesc>> = Search::query_elements_by_id(&vec!["TATABOX1", "TATABOX2"]);
let e2: Vec<Option<SeqDesc>> = Search::query_elements_by_ac(&vec!["S000023", "S000260"]);

Modules§

db
Maintains the PLACE database.
io
I/O Format
place_desc
Description structure of PLACE database.
place_search
Ways to search PLACE database.