|
|
@@ -1,17 +1,15 @@
|
|
|
pub mod progs;
|
|
|
// pub mod runners;
|
|
|
-pub mod utils;
|
|
|
pub mod runn;
|
|
|
+pub mod utils;
|
|
|
|
|
|
#[cfg(test)]
|
|
|
mod tests {
|
|
|
- use std::time;
|
|
|
|
|
|
- use crate::{runn::{BasicProgress, Inc}, utils::Run};
|
|
|
+ use crate::utils::Run;
|
|
|
use anyhow::anyhow;
|
|
|
use env_logger::Env;
|
|
|
use log::info;
|
|
|
- use tokio::sync::mpsc::Sender;
|
|
|
|
|
|
use self::{progs::cramino::Cramino, runn::TaskManager};
|
|
|
|
|
|
@@ -46,15 +44,14 @@ mod tests {
|
|
|
|
|
|
let mut cramino = Cramino::default()
|
|
|
.with_threads(150)
|
|
|
- .with_result_path(
|
|
|
- "/data/longreads_basic_pipe/CAMARA/diag/CAMARA_diag_hs1_cramino.txt",
|
|
|
- )
|
|
|
- .with_bam("/data/longreads_basic_pipe/CAMARA/diag/CAMARA_diag_hs1.bam").unwrap();
|
|
|
+ .with_result_path("/data/longreads_basic_pipe/CAMARA/diag/CAMARA_diag_hs1_cramino.txt")
|
|
|
+ .with_bam("/data/longreads_basic_pipe/CAMARA/diag/CAMARA_diag_hs1.bam")
|
|
|
+ .unwrap();
|
|
|
|
|
|
let _ = task_manager
|
|
|
.spawn(|sender| async move {
|
|
|
cramino.run()?;
|
|
|
- if let Err(_) = sender.send(cramino) {
|
|
|
+ if sender.send(cramino).is_err() {
|
|
|
return Err(anyhow!("the receiver dropped"));
|
|
|
}
|
|
|
Ok(())
|
|
|
@@ -75,6 +72,5 @@ mod tests {
|
|
|
if let Some(r) = task_manager.try_recv().await {
|
|
|
println!("{r:?}");
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
}
|