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
//! Pipeline module for coordinating processing stages.
//!
//! This module provides the main pipeline executor that
//! coordinates reading, QC, trimming, filtering, and writing
//! using a multi-threaded producer-consumer architecture.
//!
//! ## Architecture
//!
//! The pipeline uses crossbeam channels for communication:
//!
//! - **Reader thread**: Reads batches from FASTQ files
//! - **Worker pool (N threads)**: Perform QC, trimming, and filtering in parallel
//! - **Aggregator thread**: Merges QC statistics from all workers
//! - **Writer thread**: Writes filtered reads to output files
//!
//! ## Example
//!
//! ```no_run
//! use std::path::PathBuf;
//! use fastars::pipeline::{PipelineConfig, PipelineExecutor};
//! use fastars::trim::TrimConfig;
//! use fastars::filter::FilterConfig;
//!
//! let config = PipelineConfig::short_read()
//! .with_threads(4)
//! .with_batch_size(1000)
//! .with_input(PathBuf::from("reads.fastq.gz"))
//! .with_output_prefix(PathBuf::from("output/filtered"));
//!
//! let executor = PipelineExecutor::new(config);
//! let result = executor.run().expect("Pipeline failed");
//!
//! println!("Processed {} reads", result.qc_before.total_reads);
//! println!("Pass rate: {:.1}%", result.pass_rate());
//! ```
pub use ;
pub use ;
pub use ;