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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
//!
//! []()
//! [](https://github.com/bio-here/seq-here)
//! [](https://travis-ci.org/bio-here/seq-here)
//! [](https://crates.io/crates/seq-here)
//! [](https://docs.rs/seq-here)
//! []()!
//!
//! This crate provides several functions for bio-sequence file processing. It is designed to be fast and easy to use.
//!
//! Use the crate in your project by adding the following to your `Cargo.toml`:
//! ```toml
//! seq-here = "0.1.0"
//! ```
//!
//! There are 3 modules in this crate for different purposes:
//! - **info**: Get basic information about the input sequence file(s).
//! - **process**: Process incoming sequence file(s).
//! - **extract**: Extract specified sequence segment or file data.
//!
//! ## Examples
//!
//! - Info module:
//!
//! ```rust
//! use seq_here::info::{self, InfoOutput};
//! use std::path::{Path, PathBuf};
//!
//! let paths = vec![PathBuf::from("tests/test.fa")];
//! info::InfoFa::by_println(paths.clone());
//! info::InfoFa::by_file(paths);
//! ```
//!
//! - Process module:
//!
//! ```rust
//! use seq_here::process::{self};
//! use std::path::PathBuf;
//!
//! // Combine multiple files into one
//! let input_files = vec![PathBuf::from("file1.txt"), PathBuf::from("file2.txt")];
//! let output_file = PathBuf::from("combined.txt");
//! seq_here::process::ConvertCombine::combine_all(input_files, output_file);
//! ```
//!
//! - Extract module:
//!
//! ```rust
//! use seq_here::extract::{ExtractSegment, ExtractExplain};
//! use std::path::PathBuf;
//!
//! // Extract sequence by ID
//! let input_files = vec![PathBuf::from("sequence.fasta")];
//! let output_file = PathBuf::from("extracted.fasta");
//! let id = "sequence_id".to_string();
//!
//! // Extract full sequence matching the ID
//! ExtractSegment::extract_id(input_files.clone(), id.clone(), output_file.clone(), None, None);
//!
//! // Extract a specific segment (positions 10 to 50) from the sequence
//! ExtractSegment::extract_id(input_files, id, output_file, Some(10), Some(50));
//!
//! // Extract features from annotation files
//! let seq_files = vec![PathBuf::from("genome.fasta")];
//! let anno_files = vec![PathBuf::from("annotations.gff")];
//! let output_dir = PathBuf::from("extracted_features");
//!
//! // Extract all annotated features
//! ExtractExplain::extract(seq_files.clone(), anno_files.clone(), output_dir.clone(), None);
//!
//! // Extract only CDS and gene features
//! let feature_types = Some(vec!["CDS".to_string(), "gene".to_string()]);
//! ExtractExplain::extract(seq_files, anno_files, output_dir, feature_types);
//! ```
//!