1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
//!
//! # 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:
//! ```rust
//! 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:
//! ```rust
//! 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:
//!
//! ```rust
//! 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"]);
//! ```
/// Description structure of PLACE database.
/// I/O Format
/// Ways to search PLACE database.
/// Maintains the PLACE database.