Thomas 7 mesi fa
parent
commit
93ee5d1c5e
4 ha cambiato i file con 36 aggiunte e 1 eliminazioni
  1. 3 0
      src/commands/mod.rs
  2. 23 0
      src/commands/tests.rs
  3. 1 1
      src/config.rs
  4. 9 0
      src/helpers.rs

+ 3 - 0
src/commands/mod.rs

@@ -3,3 +3,6 @@ pub mod bcftools;
 pub mod modkit;
 pub mod longphase;
 pub mod wakhan;
+
+#[cfg(test)]
+mod tests;

+ 23 - 0
src/commands/tests.rs

@@ -0,0 +1,23 @@
+use crate::{collection::pod5::FlowCellCase, config::Config, helpers::test_init};
+
+use super::dorado::Dorado;
+
+#[test]
+fn basecall_muxed() -> anyhow::Result<()> {
+    test_init();
+
+    Dorado::from_mux(vec![
+        FlowCellCase {
+            id: "LUCAS".to_string(),
+            time_point: "diag".to_string(),
+            barcode: "NB05".to_string(),
+            pod_dir: "/data/unarchived/mnt/banana-pool/run_data/20250224-AgC/LUCRO-DG-N05_LUCRO-MR-N06/20250224_1416_1E_PBA93892_9921ba67/pod5/".into(),
+        },
+        FlowCellCase {
+            id: "LUCAS".to_string(),
+            time_point: "mrd".to_string(),
+            barcode: "NB06".to_string(),
+            pod_dir: "/data/unarchived/mnt/banana-pool/run_data/20250224-AgC/LUCRO-DG-N05_LUCRO-MR-N06/20250224_1416_1E_PBA93892_9921ba67/pod5/".into(),
+        },
+    ], Config::default())
+}

+ 1 - 1
src/config.rs

@@ -234,7 +234,7 @@ pub struct AlignConfig {
 impl Default for AlignConfig {
     fn default() -> Self {
         Self {
-            dorado_bin: "/data/tools/dorado-1.0.2-linux-x64/bin/dorado".to_string(),
+            dorado_bin: "/data/tools/dorado-1.1.0-linux-x64/bin/dorado".to_string(),
             dorado_basecall_arg: "-x 'cuda:0,1,2,3' sup,5mC_5hmC".to_string(),
             ref_fa: "/data/ref/hs1/chm13v2.0.fa".to_string(),
             ref_mmi: "/data/ref/chm13v2.0.mmi".to_string(),

+ 9 - 0
src/helpers.rs

@@ -673,3 +673,12 @@ pub fn detect_repetition(s: &str) -> Repeat {
 
     Repeat::None
 }
+
+
+pub fn test_init() {
+    let _ = env_logger::Builder::from_env(env_logger::Env::default().default_filter_or("info"))
+        .is_test(true)
+        .try_init();
+}
+
+